diff options
| author | 2023-08-26 02:04:50 +0000 | |
|---|---|---|
| committer | 2023-08-26 02:04:50 +0000 | |
| commit | 4fe75f75fe05f3b02f2c628133e26db8e1db021d (patch) | |
| tree | 397d477fba59f87913cc6137178be6ee35673807 | |
| parent | a8a87bbca9162af7add830139198c4ee899fa123 (diff) | |
| parent | bf041be92ff27665c0b464c3e74d8fc0e6884f80 (diff) | |
Merge "Fix CTS issue in BootControl HIDL" into main am: bf041be92f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2725594
Change-Id: Ib43ac45857083c63d598181ae85f8e95952d81f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/core/java/com/android/server/recoverysystem/hal/BootControlHIDL.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/recoverysystem/hal/BootControlHIDL.java b/services/core/java/com/android/server/recoverysystem/hal/BootControlHIDL.java index 65325c297719..7c4d7875b76f 100644 --- a/services/core/java/com/android/server/recoverysystem/hal/BootControlHIDL.java +++ b/services/core/java/com/android/server/recoverysystem/hal/BootControlHIDL.java @@ -22,6 +22,8 @@ import android.os.IBinder; import android.os.RemoteException; import android.util.Slog; +import java.util.NoSuchElementException; + public class BootControlHIDL implements IBootControl { private static final String TAG = "BootControlHIDL"; @@ -32,7 +34,7 @@ public class BootControlHIDL implements IBootControl { public static boolean isServicePresent() { try { android.hardware.boot.V1_0.IBootControl.getService(true); - } catch (RemoteException e) { + } catch (RemoteException | NoSuchElementException e) { return false; } return true; @@ -41,7 +43,7 @@ public class BootControlHIDL implements IBootControl { public static boolean isV1_2ServicePresent() { try { android.hardware.boot.V1_2.IBootControl.getService(true); - } catch (RemoteException e) { + } catch (RemoteException | NoSuchElementException e) { return false; } return true; |