Loading services/usb/java/com/android/server/usb/UsbDeviceManager.java +9 −4 Original line number Diff line number Diff line Loading @@ -80,9 +80,9 @@ import android.os.storage.StorageVolume; import android.provider.Settings; import android.service.usb.UsbDeviceManagerProto; import android.service.usb.UsbHandlerProto; import android.text.TextUtils; import android.util.Pair; import android.util.Slog; import android.text.TextUtils; import com.android.internal.R; import com.android.internal.annotations.GuardedBy; Loading Loading @@ -880,7 +880,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"); Loading Loading @@ -2313,9 +2313,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; Loading Loading
services/usb/java/com/android/server/usb/UsbDeviceManager.java +9 −4 Original line number Diff line number Diff line Loading @@ -80,9 +80,9 @@ import android.os.storage.StorageVolume; import android.provider.Settings; import android.service.usb.UsbDeviceManagerProto; import android.service.usb.UsbHandlerProto; import android.text.TextUtils; import android.util.Pair; import android.util.Slog; import android.text.TextUtils; import com.android.internal.R; import com.android.internal.annotations.GuardedBy; Loading Loading @@ -880,7 +880,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"); Loading Loading @@ -2313,9 +2313,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; Loading