Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a025c898 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

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
parent 17eaac06
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -563,6 +563,7 @@ public class UsbDeviceManager {
                            mAccessoryModeRequestTime + ACCESSORY_REQUEST_TIMEOUT;
                            mAccessoryModeRequestTime + ACCESSORY_REQUEST_TIMEOUT;


            if (mConfigured && enteringAccessoryMode) {
            if (mConfigured && enteringAccessoryMode) {
                mAccessoryModeRequestTime = 0;
                // successfully entered accessory mode
                // successfully entered accessory mode


                if (mAccessoryStrings != null) {
                if (mAccessoryStrings != null) {