summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2015-07-01 19:13:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-01 19:13:44 +0000
commitb8b20a503255da8097d64a2f1554d118f8e3c424 (patch)
tree2c2ed5bce2e1abaf1d6a8ab8ae7d1fe93371aec9
parent85a71d6a622eef2cc5258e737c305227cebe2e95 (diff)
parente6ffe317547abc583742a02a9272e421c3fe4efb (diff)
downloadpackages_apps_Settings-b8b20a503255da8097d64a2f1554d118f8e3c424.zip
packages_apps_Settings-b8b20a503255da8097d64a2f1554d118f8e3c424.tar.gz
packages_apps_Settings-b8b20a503255da8097d64a2f1554d118f8e3c424.tar.bz2
Merge "Fix USB mode development setting" into mnc-dev
-rw-r--r--src/com/android/settings/DevelopmentSettings.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 5d9e2bd..f20728a 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -1326,7 +1326,13 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
private void writeUsbConfigurationOption(Object newValue) {
UsbManager manager = (UsbManager)getActivity().getSystemService(Context.USB_SERVICE);
- manager.setCurrentFunction(newValue.toString());
+ String function = newValue.toString();
+ manager.setCurrentFunction(function);
+ if (function.equals("none")) {
+ manager.setUsbDataUnlocked(false);
+ } else {
+ manager.setUsbDataUnlocked(true);
+ }
}
private void updateCpuUsageOptions() {