Fix USB mode development setting
USB mode consists of the function (mtp, ptp, midi, etc) and the data locked/unlocked state. Developer settings was only setting the function, leaving data locked when it should be unlocked. Bug: 22165902 Change-Id: Ia1ae8dfaf3d2abc62034aa6aea1234bad04aaa2e
This commit is contained in:
@@ -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() {
|
||||
|
Reference in New Issue
Block a user