Camera lift preference now saves correctly

Bug: 37751057
Test: manual + make RunSettingsRoboTests

Fixed issue where camera lift preference was saving the opposite value
of what it was supposed to. Added test to cover saving of value on
preference change.

Change-Id: I2d2c454eb478afb7f73519f9f05c9a9a1933938b
This commit is contained in:
Daniel Sheng
2017-05-04 15:14:39 -07:00
parent 5c5830f865
commit 7b9e3fdd08
2 changed files with 23 additions and 1 deletions

View File

@@ -57,7 +57,7 @@ public class CameraLiftTriggerPreferenceController extends GesturePreferenceCont
public boolean onPreferenceChange(Preference preference, Object newValue) {
boolean enabled = (boolean) newValue;
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.CAMERA_LIFT_TRIGGER_ENABLED, enabled ? 0 : 1);
Settings.Secure.CAMERA_LIFT_TRIGGER_ENABLED, enabled ? 1 : 0);
return true;
}