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

Commit 1a2bdf29 authored by Ashish Kumar Gupta's avatar Ashish Kumar Gupta Committed by Automerger Merge Worker
Browse files

Merge "Set no data transfer on function switch timeout for accessory mode"...

Merge "Set no data transfer on function switch timeout for accessory mode" into sc-dev am: e3d46f40

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/28696280



Change-Id: I875ee25d37fd7ce613c2fc54eed3de19836251cc
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2fdf4be6 e3d46f40
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -719,7 +719,7 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
            }
        }

        private void notifyAccessoryModeExit() {
        protected void notifyAccessoryModeExit() {
            // make sure accessory mode is off
            // and restore default functions
            Slog.d(TAG, "exited USB accessory mode");
@@ -1957,9 +1957,14 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
                     * Dont force to default when the configuration is already set to default.
                     */
                    if (msg.arg1 != 1) {
                        // Set this since default function may be selected from Developer options
                        if (mCurrentFunctions == UsbManager.FUNCTION_ACCESSORY) {
                            notifyAccessoryModeExit();
                        } else {
                            // Set this since default function may be selected from Developer
                            // options
                            setEnabledFunctions(mScreenUnlockedFunctions, false);
                        }
                    }
                    break;
                case MSG_GADGET_HAL_REGISTERED:
                    boolean preexisting = msg.arg1 == 1;