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

Commit 86813d40 authored by RD's avatar RD
Browse files

Swap hal query order

USBPortManager now checks for AIDL post-migration, stops redundant error message for HIDL checks

Bug: 241042174
Test: Checked to see USBPortManager Error no longer present in System Logcat after order swap
Change-Id: I4f0092a68e0cc0dd42dcf2d16f4cdfa646cb72f4
parent 0dfdd607
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -31,15 +31,14 @@ public final class UsbPortHalInstance {
    public static UsbPortHal getInstance(UsbPortManager portManager, IndentingPrintWriter pw) {

        logAndPrint(Log.DEBUG, null, "Querying USB HAL version");
        if (UsbPortHidl.isServicePresent(null)) {
            logAndPrint(Log.INFO, null, "USB HAL HIDL present");
            return new UsbPortHidl(portManager, pw);
        }
        if (UsbPortAidl.isServicePresent(null)) {
            logAndPrint(Log.INFO, null, "USB HAL AIDL present");
            return new UsbPortAidl(portManager, pw);
        }

        if (UsbPortHidl.isServicePresent(null)) {
            logAndPrint(Log.INFO, null, "USB HAL HIDL present");
            return new UsbPortHidl(portManager, pw);
        }
        return null;
    }
}