From 6783c309798c0cbd1c7da150419ff0eaf30668ab Mon Sep 17 00:00:00 2001 From: Tobias Thierer Date: Fri, 24 May 2019 19:55:02 +0100 Subject: [PATCH] Stop USB Debugging authorization window dismissing on tap outside. This dialog is onerous to trigger (requires disconnecting and reconnecting the device), and is too easy to dismiss accidentally by slightly mis-tapping (happens to me all the time). This code is mostly abandoned - it has barely been touched at all since it was introduced in 2012. This CL makes it not dismiss when the user clicks outside the dialog. To dismiss, the user now has to click either CANCEL or ALLOW. Test: Manually checked that clicking outside the dialog dismissed it before but not after this CL. Change-Id: I603bba9c79e0df8a52ba7db323fea3a13acaa0a5 --- .../src/com/android/systemui/usb/UsbDebuggingActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java index b0e1c56aec301..c1931f0133bef 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java +++ b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java @@ -86,6 +86,7 @@ public class UsbDebuggingActivity extends AlertActivity mAlwaysAllow = (CheckBox)checkbox.findViewById(com.android.internal.R.id.alwaysUse); mAlwaysAllow.setText(getString(R.string.usb_debugging_always)); ap.mView = checkbox; + window.setCloseOnTouchOutside(false); setupAlert();