Merge "Fix USB mode development setting" into mnc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b8b20a5032
@@ -1326,7 +1326,13 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
private void writeUsbConfigurationOption(Object newValue) {
|
private void writeUsbConfigurationOption(Object newValue) {
|
||||||
UsbManager manager = (UsbManager)getActivity().getSystemService(Context.USB_SERVICE);
|
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() {
|
private void updateCpuUsageOptions() {
|
||||||
|
Reference in New Issue
Block a user