This change is bogus and breaks the USB connection mode UX.
There is no reason to change the current USB connection
behaviour, hence revert to AOSP behaviour for this.
This commit also depends on the Settings commit with
the change-id Iad7d0811b7dcffe78c734c073dceb6c054fcea11.
This reverts commit
a694b103f43a3570fb18a92614d6d6585ac3c493.
Change-Id: Ia61b341d5cd403f165d24257bab4148b1d9f4193
public static final String USB_FUNCTION_ACCESSORY = "accessory";
/**
- * Name of the charging USB function.
- * Used in extras for the {@link #ACTION_USB_STATE} broadcast
- *
- * {@hide}
- */
- public static final String USB_FUNCTION_CHARGING = "charging";
-
- /**
* Name of extra for {@link #ACTION_USB_PORT_CHANGED}
* containing the {@link UsbPort} object for the port.
*
}
private String applyAdbFunction(String functions) {
- //Not enable adb when it s charging mode
- if (mAdbEnabled &&
- !UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_CHARGING)) {
+ if (mAdbEnabled) {
functions = UsbManager.addFunction(functions, UsbManager.USB_FUNCTION_ADB);
} else {
functions = UsbManager.removeFunction(functions, UsbManager.USB_FUNCTION_ADB);
case UsbManager.USB_FUNCTION_MTP:
case UsbManager.USB_FUNCTION_PTP:
case UsbManager.USB_FUNCTION_RNDIS:
- case UsbManager.USB_FUNCTION_CHARGING:
return true;
}