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

Commit 975608fa authored by Ricky Niu's avatar Ricky Niu Committed by Chien Kun Niu
Browse files

usb: Fixed the null pointer issue



Bug: 200323450
Test: Function work with reboot connect to PC and HU

Signed-off-by: default avatarRicky Niu <rickyniu@google.com>
Change-Id: I9bdfcda195c30d71d9d39e1170bbf66a7021c39b
parent 7038aedd
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -237,7 +237,12 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
        @Override
        public void onUEvent(UEventObserver.UEvent event) {
            if (DEBUG) Slog.v(TAG, "USB UEVENT: " + event.toString());
            sEventLogger.log(new UsbDeviceLogger.StringEvent("USB UEVENT: " + event.toString()));
            if (sEventLogger != null) {
                sEventLogger.log(new UsbDeviceLogger.StringEvent("USB UEVENT: "
                        + event.toString()));
            } else {
                if (DEBUG) Slog.d(TAG, "sEventLogger == null");
            }

            String state = event.get("USB_STATE");
            String accessory = event.get("ACCESSORY");