diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt | 9 |
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) |