Don't skip intents where config changed.

Since we are adding ffs.mtp.ready to the init
scripts, we can no longer skip intents that cause
that property to be set.

This fixes the case where device is disconnected
and adb is repeatedly enabled/disabled.

Test: enable/disable adb, usb mtp
Bug: 33220530
Change-Id: I48e687c1af3f9da9e522ebe879285877c0168da8
This commit is contained in:
Jerry Zhang
2017-04-20 13:46:29 -07:00
parent af5f00ee5e
commit ecf906ed67

View File

@@ -682,7 +682,7 @@ public class UsbDeviceManager {
}
// send broadcast intent only if the USB state has changed
if (!isUsbStateChanged(intent)) {
if (!isUsbStateChanged(intent) && !configChanged) {
if (DEBUG) {
Slog.d(TAG, "skip broadcasting " + intent + " extras: " + intent.getExtras());
}