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

Commit 205c75f5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Don't destroy usb debugging dialog for emulator if usb is not...

Merge "Don't destroy usb debugging dialog for emulator if usb is not connected." into sc-dev am: b485b356 am: 2bac2746 am: 67fc2694

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

Change-Id: I96a5d8341344a2520a27ea068aaa939784c1a059
parents a7751dd7 67fc2694
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -68,7 +68,9 @@ public class UsbDebuggingActivity extends AlertActivity

        super.onCreate(icicle);

        if (SystemProperties.getInt("service.adb.tcp.port", 0) == 0) {
        // Emulator does not support reseating the usb cable to reshow the dialog.
        boolean isEmulator = SystemProperties.get("ro.boot.qemu").equals("1");
        if (SystemProperties.getInt("service.adb.tcp.port", 0) == 0 && !isEmulator) {
            mDisconnectedReceiver = new UsbDisconnectedReceiver(this);
            IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE);
            mBroadcastDispatcher.registerReceiver(mDisconnectedReceiver, filter);