Let UsbDeviceManager choose the appropriate function default
Rather than hardcoding MTP as the appropriate default when the user selects "Charger Only", call UsbDeviceManager.setCurrentFunction(null). Null is intended to restore the default function, which is appropriate for charging only. Bug: 21429947 Change-Id: I9ee633bcf2f95f9937861c234ab044873202d41b
This commit is contained in:
@@ -95,7 +95,7 @@ public class UsbModeChooserActivity extends Activity {
|
||||
private void setCurrentFunction(int which) {
|
||||
switch (which) {
|
||||
case 0:
|
||||
mUsbManager.setCurrentFunction(UsbManager.USB_FUNCTION_MTP);
|
||||
mUsbManager.setCurrentFunction(null);
|
||||
mUsbManager.setUsbDataUnlocked(false);
|
||||
break;
|
||||
case 1:
|
||||
|
Reference in New Issue
Block a user