summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2015-06-12 17:16:32 -0700
committerNick Kralevich <nnk@google.com>2015-06-12 17:18:05 -0700
commit2d0f6a9d360f4ac2de9473d1d0d9dd736aa408ff (patch)
tree3d8c1ecfda8e5e4feedddae5b8a8cba92d21395e
parentda6e4c47aa0e4319ada376d2917aafb2c2c27734 (diff)
downloadpackages_apps_Settings-2d0f6a9d360f4ac2de9473d1d0d9dd736aa408ff.zip
packages_apps_Settings-2d0f6a9d360f4ac2de9473d1d0d9dd736aa408ff.tar.gz
packages_apps_Settings-2d0f6a9d360f4ac2de9473d1d0d9dd736aa408ff.tar.bz2
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
-rw-r--r--src/com/android/settings/deviceinfo/UsbModeChooserActivity.java2
1 files changed, 1 insertions, 1 deletions
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: