UsbDeviceManager: Don't start UsbDebuggingManager when data is encrypted

This avoids showing the confirmation dialog from the decryption screen

Bug: 8019508
Change-Id: I7ff364437f6b8aeea26fa8308aa4fe35b7ede5d7
This commit is contained in:
Benoit Goby
2013-01-25 16:58:13 -08:00
parent b9781fe08c
commit 78a9687fc2

View File

@@ -169,7 +169,9 @@ public class UsbDeviceManager {
startAccessoryMode();
}
if ("1".equals(SystemProperties.get("ro.adb.secure"))) {
boolean secureAdbEnabled = SystemProperties.getBoolean("ro.adb.secure", false);
boolean dataEncrypted = "1".equals(SystemProperties.get("vold.decrypt"));
if (secureAdbEnabled && !dataEncrypted) {
mDebuggingManager = new UsbDebuggingManager(context);
}
}