Exit enteringAccessoryMode when entered.

... so that a quick usb plug -> unplug actually causes both enter and
exit. Before the second update was treated as another enter.

Admittedly treating any first update as connect and any second update as
disconnect is sketchy, but this was the intention of the current code,
so just fix that for now.

Fixes: 29377436
Change-Id: Ib6bcc23ce5ec9979edcc38952a9414683513ca0c
This commit is contained in:
Philip P. Moltmann
2016-08-09 17:23:44 -07:00
parent 17eaac06bf
commit a025c89858

View File

@@ -563,6 +563,7 @@ public class UsbDeviceManager {
mAccessoryModeRequestTime + ACCESSORY_REQUEST_TIMEOUT;
if (mConfigured && enteringAccessoryMode) {
mAccessoryModeRequestTime = 0;
// successfully entered accessory mode
if (mAccessoryStrings != null) {