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

Commit c5bd3d3b authored by Selim Gurun's avatar Selim Gurun
Browse files

Respect Accessory timeout value when restoring defaults

Android accessory mode timeout value is a lot larger than default
timeout value (10 seconds vs. 1 second). The large timeout
value is needed to accomodate for HUs that are not quick
to respond after MTP to Accessory mode change.

Bug: 68819844
Test: Manual
Change-Id: I665e1001f8df66fb00cbfcbf6c58d97c372797fc
parent a7c51a3d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -902,7 +902,7 @@ public class UsbDeviceManager {
                        updateCurrentAccessory();
                    }
                    if (mBootCompleted) {
                        if (!mConnected) {
                        if (!mConnected && !hasMessages(MSG_ACCESSORY_MODE_ENTER_TIMEOUT)) {
                            // restore defaults when USB is disconnected
                            setEnabledFunctions(null, !mAdbEnabled, false);
                        }