Update core-telecom dependency and add CALL_BACK intent filter#405
Update core-telecom dependency and add CALL_BACK intent filter#405natarajkr007 wants to merge 4 commits intoandroid:mainfrom
Conversation
- Update `androidx.core:core-telecom` from `1.0.0-alpha02` to `1.0.1` (latest stable). - Add `android.telecom.action.CALL_BACK` intent filter to the main activity to support integrated call logging.
…ge' into telecom-integrated-call-log-change
- Update: `androidx.core:core-telecom` to `1.1.0-alpha04`. - Add: a UI option to the Telecom sample to exclude calls from the system call log using the `isLogExcluded` property in `CallAttributesCompat`. - Implement handling for `TelecomManager.ACTION_CALL_BACK` in `TelecomCallActivity` to support re-initiating calls from the system UI. - Update Android Gradle Plugin to `8.13.2` and Gradle wrapper to `8.13` to compile against 36.1. - Refactor URI creation to use the `toUri()` extension function. - Update `compileSdk` configuration and add the Foojay toolchain resolver plugin.
There was a problem hiding this comment.
Code Review
This pull request updates the project to Gradle 8.13 and Android Gradle Plugin 8.13.2, while introducing a feature to exclude calls from system logs in the Telecom sample. It also adds initial support for handling call-back intents in TelecomCallActivity. Feedback highlights the need to use intent data for call-backs instead of hardcoded URIs, the importance of overriding onNewIntent to handle activity reuse, and the removal of a stale TODO comment in the repository.
.../telecom/src/main/java/com/example/platform/connectivity/telecom/call/TelecomCallActivity.kt
Show resolved
Hide resolved
.../telecom/src/main/java/com/example/platform/connectivity/telecom/call/TelecomCallActivity.kt
Show resolved
Hide resolved
...lecom/src/main/java/com/example/platform/connectivity/telecom/model/TelecomCallRepository.kt
Outdated
Show resolved
Hide resolved
- Add `onNewIntent` to `TelecomCallActivity` to handle call-back intents when the activity is already running.
- Remove obsolete TODO regarding `isLogExcluded` in `TelecomCallRepository`.
- Add `@SuppressLint("RequiresWindowSdk")` to `ExampleWindowInitializer.create` to suppress false positive lint warning.
Change-Id: I66df7227042f72d20cd328cac16a8a802385781b
| action = TelecomCallService.ACTION_OUTGOING_CALL, | ||
| name = "Bob", | ||
| uri = "tel:54321".toUri(), | ||
| false |
There was a problem hiding this comment.
nit as per gemini review, readability improvement if we include argument name
excludeCallLogging = false
but the hardcoded values is fine, given that it's just a sample
| } | ||
| } | ||
| plugins { | ||
| id("org.gradle.toolchains.foojay-resolver-convention") version "0.10.0" |
There was a problem hiding this comment.
Why this plugin has been added?
|
|
||
| private val mDemoActivityEmbeddingController = DemoActivityEmbeddingController.getInstance() | ||
|
|
||
| @SuppressLint("RequiresWindowSdk") |
There was a problem hiding this comment.
Move these changes to a different PR
| name = "Alice", | ||
| uri = Uri.parse("tel:12345"), | ||
| uri = "tel:12345".toUri(), | ||
| excludeCallLogging |
There was a problem hiding this comment.
Use parameter naming here for consistency
| name = "Bob", | ||
| uri = Uri.parse("tel:54321"), | ||
| uri = "tel:54321".toUri(), | ||
| excludeCallLogging |
There was a problem hiding this comment.
Use parameter naming here for consistency
This pull request updates dependencies, adds new features, and refactors the Telecom sample to support excluding calls from call logs.
Dependency and Build System Updates:
8.13.2and Gradle to8.13to compile sample for 36.1Feature: Exclude Calls from Call Logs
TelecomCallServiceandTelecomCallRepositoryto accept and propagate theexcludeCallLoggingparameter, using theisLogExcludedattribute inCallAttributesCompat.Telecom Sample Enhancements
TelecomManager.ACTION_CALL_BACKintent inTelecomCallActivityto support call-back actions.