Merge "Ignore ACTION_PRIMARY_SUBSCRIPTION_LIST_CHANGED event if satellite session is started" into 24D1-dev am: fea80bf236
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27071155 Change-Id: Idcbc71555ddbebbd28553530ca8ddd6e364635ae Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -82,6 +82,8 @@ class SatelliteRepository(
|
||||
* `false` otherwise.
|
||||
*/
|
||||
fun requestIsSessionStarted(executor: Executor): ListenableFuture<Boolean> {
|
||||
isSessionStarted?.let { return immediateFuture(it) }
|
||||
|
||||
val satelliteManager: SatelliteManager? =
|
||||
context.getSystemService(SatelliteManager::class.java)
|
||||
if (satelliteManager == null) {
|
||||
@@ -166,10 +168,6 @@ class SatelliteRepository(
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG: String = "SatelliteRepository"
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the modem is in a satellite session.
|
||||
*
|
||||
@@ -184,4 +182,15 @@ class SatelliteRepository(
|
||||
else -> true
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG: String = "SatelliteRepository"
|
||||
|
||||
private var isSessionStarted: Boolean? = null
|
||||
|
||||
@VisibleForTesting
|
||||
fun setIsSessionStartedForTesting(isEnabled: Boolean) {
|
||||
this.isSessionStarted = isEnabled
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user