Merge "Don't destroy usb debugging dialog for emulator if usb is not connected." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b485b356fb
@@ -68,7 +68,9 @@ public class UsbDebuggingActivity extends AlertActivity
|
|||||||
|
|
||||||
super.onCreate(icicle);
|
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);
|
mDisconnectedReceiver = new UsbDisconnectedReceiver(this);
|
||||||
IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE);
|
IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE);
|
||||||
mBroadcastDispatcher.registerReceiver(mDisconnectedReceiver, filter);
|
mBroadcastDispatcher.registerReceiver(mDisconnectedReceiver, filter);
|
||||||
|
|||||||
Reference in New Issue
Block a user