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

Commit 1e87ae5c authored by David Stevens's avatar David Stevens Committed by Android (Google) Code Review
Browse files

Merge "Exit accessory mode more aggressively"

parents 04b2be42 4f9e88a4
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -606,8 +606,12 @@ public class UsbDeviceManager {
                } else {
                } else {
                    Slog.e(TAG, "nativeGetAccessoryStrings failed");
                    Slog.e(TAG, "nativeGetAccessoryStrings failed");
                }
                }
            } else if (!mConnected && !enteringAccessoryMode) {
            } else {
                if (!enteringAccessoryMode) {
                    notifyAccessoryModeExit();
                    notifyAccessoryModeExit();
                } else if (DEBUG) {
                    Slog.v(TAG, "Debouncing accessory mode exit");
                }
            }
            }
        }
        }


@@ -813,6 +817,9 @@ public class UsbDeviceManager {
                    break;
                    break;
                }
                }
                case MSG_ACCESSORY_MODE_ENTER_TIMEOUT: {
                case MSG_ACCESSORY_MODE_ENTER_TIMEOUT: {
                    if (DEBUG) {
                        Slog.v(TAG, "Accessory mode enter timeout: " + mConnected);
                    }
                    if (!mConnected) {
                    if (!mConnected) {
                        notifyAccessoryModeExit();
                        notifyAccessoryModeExit();
                    }
                    }