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

Commit 4f506de1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix CTS issue in BootControl HIDL" into main am: bf041be9 am:...

Merge "Fix CTS issue in BootControl HIDL" into main am: bf041be9 am: 4fe75f75 am: 6014b691 am: ee744e0b am: ea2a5758

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2725594



Change-Id: Ibafecc0bd4c602f9c02196476d0c92e97f429060
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2adba512 ea2a5758
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -22,6 +22,8 @@ import android.os.IBinder;
import android.os.RemoteException;
import android.os.RemoteException;
import android.util.Slog;
import android.util.Slog;


import java.util.NoSuchElementException;

public class BootControlHIDL implements IBootControl {
public class BootControlHIDL implements IBootControl {
    private static final String TAG = "BootControlHIDL";
    private static final String TAG = "BootControlHIDL";


@@ -32,7 +34,7 @@ public class BootControlHIDL implements IBootControl {
    public static boolean isServicePresent() {
    public static boolean isServicePresent() {
        try {
        try {
            android.hardware.boot.V1_0.IBootControl.getService(true);
            android.hardware.boot.V1_0.IBootControl.getService(true);
        } catch (RemoteException e) {
        } catch (RemoteException | NoSuchElementException e) {
            return false;
            return false;
        }
        }
        return true;
        return true;
@@ -41,7 +43,7 @@ public class BootControlHIDL implements IBootControl {
    public static boolean isV1_2ServicePresent() {
    public static boolean isV1_2ServicePresent() {
        try {
        try {
            android.hardware.boot.V1_2.IBootControl.getService(true);
            android.hardware.boot.V1_2.IBootControl.getService(true);
        } catch (RemoteException e) {
        } catch (RemoteException | NoSuchElementException e) {
            return false;
            return false;
        }
        }
        return true;
        return true;