-
Notifications
You must be signed in to change notification settings - Fork 506
Revert "Update core-telecom dependency and add CALL_BACK intent filte… #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |
| # limitations under the License. | ||
| # | ||
| [versions] | ||
| agp = "8.13.2" | ||
| agp = "8.9.1" | ||
| fragmentCompose = "1.8.6" | ||
| kotlin = "2.1.10" | ||
| coreKtx = "1.17.0" | ||
|
|
@@ -66,7 +66,6 @@ playServicesMlkitBarcodeScanning = "18.3.1" | |
| protobuf = "0.9.4" | ||
| firebaseCrashlyticsBuildtools = "3.0.5" | ||
| uwb = "1.0.0-alpha10" | ||
| telecom = "1.1.0-alpha04" | ||
|
|
||
|
|
||
| [libraries] | ||
|
|
@@ -100,7 +99,6 @@ coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" } | |
| coil-video = { module = "io.coil-kt:coil-video", version.ref = "coil" } | ||
| kotlin-coroutines-play = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-play-services", version.ref = "coroutines" } | ||
| play-services-location = { module = "com.google.android.gms:play-services-location", version.ref = "play-services-location" } | ||
| androidx-core-telecom = { module = "androidx.core:core-telecom", version.ref = "telecom" } | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| # Core dependencies | ||
| android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "agp" } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,14 +25,11 @@ plugins { | |
|
|
||
| android { | ||
| namespace = "com.example.platform.connectivity.telecom" | ||
| compileSdk { | ||
| version = release(version = 36) { | ||
| minorApiLevel = 1 | ||
| } | ||
| } | ||
| compileSdk = 36 | ||
|
|
||
| defaultConfig { | ||
| minSdk = 23 | ||
| targetSdk = 35 | ||
|
|
||
| testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
| } | ||
|
|
@@ -42,6 +39,7 @@ android { | |
| } | ||
|
|
||
| dependencies { | ||
| implementation("androidx.core:core-telecom:1.0.1") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| implementation(project(mapOf("path" to ":samples:connectivity:audio"))) | ||
|
|
||
| implementation(libs.androidx.activity.compose) | ||
|
|
@@ -52,9 +50,6 @@ dependencies { | |
| implementation(libs.androidx.material3) | ||
| implementation(project(":shared")) | ||
|
|
||
| // Sample specific dependencies | ||
| implementation(libs.androidx.core.telecom) | ||
|
|
||
| implementation(libs.accompanist.permissions) | ||
|
|
||
| androidTestImplementation(libs.androidx.test.core) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -25,7 +25,11 @@ import androidx.annotation.RequiresApi | |||||||||||||
| import androidx.core.telecom.CallAttributesCompat | ||||||||||||||
| import androidx.core.telecom.CallControlResult | ||||||||||||||
| import androidx.core.telecom.CallControlScope | ||||||||||||||
| import androidx.core.telecom.CallException | ||||||||||||||
| import androidx.core.telecom.CallsManager | ||||||||||||||
| import kotlinx.coroutines.CoroutineScope | ||||||||||||||
| import kotlinx.coroutines.Dispatchers | ||||||||||||||
| import kotlinx.coroutines.SupervisorJob | ||||||||||||||
|
Comment on lines
+28
to
+32
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The imports for
Suggested change
|
||||||||||||||
| import kotlinx.coroutines.channels.Channel | ||||||||||||||
| import kotlinx.coroutines.flow.Flow | ||||||||||||||
| import kotlinx.coroutines.flow.MutableStateFlow | ||||||||||||||
|
|
@@ -83,13 +87,8 @@ class TelecomCallRepository(private val callsManager: CallsManager) { | |||||||||||||
| * Register a new call with the provided attributes. | ||||||||||||||
| * Use the [currentCall] StateFlow to receive status updates and process call related actions. | ||||||||||||||
| */ | ||||||||||||||
| suspend fun registerCall( | ||||||||||||||
| displayName: String, | ||||||||||||||
| address: Uri, | ||||||||||||||
| excludeCallLogging: Boolean, | ||||||||||||||
| isIncoming: Boolean | ||||||||||||||
| ) { | ||||||||||||||
| // For simplicity, we don't support multiple calls | ||||||||||||||
| suspend fun registerCall(displayName: String, address: Uri, isIncoming: Boolean) { | ||||||||||||||
| // For simplicity we don't support multiple calls | ||||||||||||||
| check(_currentCall.value !is TelecomCall.Registered) { | ||||||||||||||
| "There cannot be more than one call at the same time." | ||||||||||||||
| } | ||||||||||||||
|
|
@@ -98,7 +97,6 @@ class TelecomCallRepository(private val callsManager: CallsManager) { | |||||||||||||
| val attributes = CallAttributesCompat( | ||||||||||||||
| displayName = displayName, | ||||||||||||||
| address = address, | ||||||||||||||
| isLogExcluded = excludeCallLogging, | ||||||||||||||
| direction = if (isIncoming) { | ||||||||||||||
| CallAttributesCompat.DIRECTION_INCOMING | ||||||||||||||
| } else { | ||||||||||||||
|
|
@@ -223,7 +221,7 @@ class TelecomCallRepository(private val callsManager: CallsManager) { | |||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| is TelecomCallAction.ToggleMute -> { | ||||||||||||||
| // We cannot programmatically mute the telecom stack. Instead, we just update | ||||||||||||||
| // We cannot programmatically mute the telecom stack. Instead we just update | ||||||||||||||
| // the state of the call and this will start/stop audio capturing. | ||||||||||||||
| updateCurrentCall { | ||||||||||||||
| copy(isMuted = !isMuted) | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of removing the
telecomversion from the catalog, it should be updated to1.0.1. Centralizing dependency versions in the catalog is a best practice that should be maintained even during reverts.