diff options
author | Danesh M <daneshm90@gmail.com> | 2015-09-30 18:30:17 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-27 14:10:07 -0700 |
commit | 037b0f8ad43d570f97dbf49848dab7c8b6b38513 (patch) | |
tree | 090f328fa996991839f5370f736e1d36c4356afa /src/com/android/settings/profiles | |
parent | 999c4022c408e2a3c6c37fa3a47d09a6eec282fc (diff) | |
download | packages_apps_Settings-037b0f8ad43d570f97dbf49848dab7c8b6b38513.zip packages_apps_Settings-037b0f8ad43d570f97dbf49848dab7c8b6b38513.tar.gz packages_apps_Settings-037b0f8ad43d570f97dbf49848dab7c8b6b38513.tar.bz2 |
ProfileSettings : Ensure brightness settings only apply on accept
If the user clicks cancel, changes should not persist.
Repro:
1) Edit current profile
2) Change brightness via override
3) Press cancel
issue-id: CYNGNOS-1174
Change-Id: I6a09c642cd22509161efa5565276ea9c06973f5e
Diffstat (limited to 'src/com/android/settings/profiles')
-rw-r--r-- | src/com/android/settings/profiles/SetupActionsFragment.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/com/android/settings/profiles/SetupActionsFragment.java b/src/com/android/settings/profiles/SetupActionsFragment.java index e9f0076..7a433b4 100644 --- a/src/com/android/settings/profiles/SetupActionsFragment.java +++ b/src/com/android/settings/profiles/SetupActionsFragment.java @@ -895,12 +895,7 @@ public class SetupActionsFragment extends SettingsPreferenceFragment override.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - brightnessSettings.setOverride(isChecked); seekBar.setEnabled(isChecked); - - mProfile.setBrightness(brightnessSettings); - mAdapter.notifyDataSetChanged(); - updateProfile(); } }); seekBar.setEnabled(brightnessSettings.isOverride()); @@ -912,6 +907,7 @@ public class SetupActionsFragment extends SettingsPreferenceFragment public void onClick(DialogInterface dialog, int which) { int value = seekBar.getProgress(); brightnessSettings.setValue(value); + brightnessSettings.setOverride(override.isChecked()); mProfile.setBrightness(brightnessSettings); mAdapter.notifyDataSetChanged(); updateProfile(); |