Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10b0127b authored by Joonhun Shin's avatar Joonhun Shin Committed by Android (Google) Code Review
Browse files

Merge "Add try/catch to handle UnsupportedOperationException" into main

parents a2d5f0eb 1ed862da
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -325,8 +325,13 @@ class MobileConnectionRepositoryImpl(
    override val cdmaRoaming: StateFlow<Boolean> =
        telephonyPollingEvent
            .mapLatest {
                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)