summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt
index 4fb99c24c8ca..0c7ae3629a44 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt
@@ -325,8 +325,13 @@ class MobileConnectionRepositoryImpl(
override val cdmaRoaming: StateFlow<Boolean> =
telephonyPollingEvent
.mapLatest {
- val cdmaEri = telephonyManager.cdmaEnhancedRoamingIndicatorDisplayNumber
- cdmaEri == ERI_ON || cdmaEri == ERI_FLASH
+ try {
+ val cdmaEri = telephonyManager.cdmaEnhancedRoamingIndicatorDisplayNumber
+ cdmaEri == ERI_ON || cdmaEri == ERI_FLASH
+ } catch (e: UnsupportedOperationException) {
+ // Handles the same as a function call failure
+ false
+ }
}
.stateIn(scope, SharingStarted.WhileSubscribed(), false)