Merge changes I9acb1145,Ie1bc4a92 into rvc-dev am: 2ca72c4756

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

Change-Id: I65bee078e69c16655c972eb21fbd7bb2178c832d
This commit is contained in:
Josh Gao
2020-06-26 21:09:04 +00:00
committed by Automerger Merge Worker
2 changed files with 8 additions and 2 deletions

View File

@@ -139,13 +139,18 @@ public class UsbDebuggingActivity extends AlertActivity
if (mDisconnectedReceiver != null) {
mBroadcastDispatcher.unregisterReceiver(mDisconnectedReceiver);
}
super.onStop();
}
@Override
protected void onDestroy() {
// If the ADB service has not yet been notified due to this dialog being closed in some
// other way then notify the service to deny the connection to ensure system_server sends
// a response to adbd.
if (!mServiceNotified) {
notifyService(false);
}
super.onStop();
super.onDestroy();
}
@Override

View File

@@ -878,6 +878,7 @@ public class AdbDebuggingManager {
case MESSAGE_ADB_DENY:
if (mThread != null) {
Slog.w(TAG, "Denying adb confirmation");
mThread.sendResponse("NO");
logAdbConnectionChanged(null, AdbProtoEnums.USER_DENIED, false);
}
@@ -887,7 +888,7 @@ public class AdbDebuggingManager {
String key = (String) msg.obj;
if ("trigger_restart_min_framework".equals(
SystemProperties.get("vold.decrypt"))) {
Slog.d(TAG, "Deferring adb confirmation until after vold decrypt");
Slog.w(TAG, "Deferring adb confirmation until after vold decrypt");
if (mThread != null) {
mThread.sendResponse("NO");
logAdbConnectionChanged(key, AdbProtoEnums.DENIED_VOLD_DECRYPT, false);