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

Commit f1ba8797 authored by Haijie Hong's avatar Haijie Hong
Browse files

Fallback to old UI when DeadObjectException is thrown

BUG: 343317785
Test: local tested
Flag: com.android.settings.flags.enable_bluetooth_device_details_polish
Change-Id: Ide144818b71d79d26b25b33e0e2710b5553ba305
parent a76332da
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -121,6 +121,14 @@ class DeviceSettingServiceConnection(
                        null
                    }
                }
                .catch { e ->
                    if (e is DeadObjectException) {
                        Log.e(TAG, "DeadObjectException happens when try to get service status.", e)
                        emit(false)
                    } else {
                        throw e
                    }
                }
                .firstOrNull() ?: false
        }