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:
@@ -563,6 +563,7 @@ public class UsbDeviceManager {
|
||||
mAccessoryModeRequestTime + ACCESSORY_REQUEST_TIMEOUT;
|
||||
|
||||
if (mConfigured && enteringAccessoryMode) {
|
||||
mAccessoryModeRequestTime = 0;
|
||||
// successfully entered accessory mode
|
||||
|
||||
if (mAccessoryStrings != null) {
|
||||
|
||||
Reference in New Issue
Block a user