diff options
author | Nick Kralevich <nnk@google.com> | 2015-06-12 17:16:32 -0700 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2015-06-12 17:18:05 -0700 |
commit | 2d0f6a9d360f4ac2de9473d1d0d9dd736aa408ff (patch) | |
tree | 3d8c1ecfda8e5e4feedddae5b8a8cba92d21395e | |
parent | da6e4c47aa0e4319ada376d2917aafb2c2c27734 (diff) | |
download | packages_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.java | 2 |
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: |