Set stay awake while wireless charging.

Now if you select "stay awake" in Developer options, the screen
will keep on when wireless charging.

Bug:31696030
Test: make SettingsTests
Change-Id: If88bf559519c19654822c70d7684be583d907e00
This commit is contained in:
jackqdyulei
2016-10-14 10:46:03 -07:00
parent 8358ac1ad3
commit b182ef3c77
2 changed files with 72 additions and 1 deletions

View File

@@ -1982,7 +1982,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
Settings.Global.putInt(getActivity().getContentResolver(),
Settings.Global.STAY_ON_WHILE_PLUGGED_IN,
mKeepScreenOn.isChecked() ?
(BatteryManager.BATTERY_PLUGGED_AC | BatteryManager.BATTERY_PLUGGED_USB) : 0);
(BatteryManager.BATTERY_PLUGGED_AC | BatteryManager.BATTERY_PLUGGED_USB
| BatteryManager.BATTERY_PLUGGED_WIRELESS) : 0);
} else if (preference == mBtHciSnoopLog) {
writeBtHciSnoopLogOptions();
} else if (preference == mEnableOemUnlock && mEnableOemUnlock.isEnabled()) {