From 2d0f6a9d360f4ac2de9473d1d0d9dd736aa408ff Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Fri, 12 Jun 2015 17:16:32 -0700 Subject: 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 --- src/com/android/settings/deviceinfo/UsbModeChooserActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/deviceinfo/UsbModeChooserActivity.java b/src/com/android/settings/deviceinfo/UsbModeChooserActivity.java index a6af01a..268f87d 100644 --- a/src/com/android/settings/deviceinfo/UsbModeChooserActivity.java +++ b/src/com/android/settings/deviceinfo/UsbModeChooserActivity.java @@ -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: -- cgit v1.1