From 29a4b7277eeadcf7ebdfae73da1e9acf0d371903 Mon Sep 17 00:00:00 2001 From: Benoit Goby Date: Wed, 17 Apr 2013 17:34:30 -0700 Subject: [PATCH] Fix UsbDebuggingActivity not shown in adb tcpip mode Bug: 8646772 Change-Id: If34c756bece903a0a452070bbc94ebc71d325bf6 --- .../src/com/android/systemui/usb/UsbDebuggingActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java index 9146ccd5b3fb7..2c252365f7535 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java +++ b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java @@ -30,6 +30,7 @@ import android.hardware.usb.UsbManager; import android.os.Bundle; import android.os.IBinder; import android.os.ServiceManager; +import android.os.SystemProperties; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -54,7 +55,10 @@ public class UsbDebuggingActivity extends AlertActivity public void onCreate(Bundle icicle) { super.onCreate(icicle); - mDisconnectedReceiver = new UsbDisconnectedReceiver(this); + if (SystemProperties.getInt("service.adb.tcp.port", 0) == 0) { + mDisconnectedReceiver = new UsbDisconnectedReceiver(this); + } + Intent intent = getIntent(); String fingerprints = intent.getStringExtra("fingerprints"); mKey = intent.getStringExtra("key");