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

Commit 471ead01 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 udc-dev am: 7a5265fb am: 20992dc6

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



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

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