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

Commit fc01bfd8 authored by Andrei Ciubotariu's avatar Andrei Ciubotariu Committed by Android (Google) Code Review
Browse files

Merge "UsbCommand: Print error and bail when failing to get USB service" into main

parents 7f8d6527 30835e95
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -89,6 +89,11 @@ public class UsbCommand extends Svc.Command {
            IUsbManager usbMgr = IUsbManager.Stub.asInterface(ServiceManager.getService(
                    Context.USB_SERVICE));

            if (usbMgr == null) {
                System.err.println("Could not obtain USB service. Try again later.");
                return;
            }

            Executor executor = context.getMainExecutor();
            Consumer<Integer> consumer = new Consumer<Integer>(){
                public void accept(Integer status){