diff options
author | Danny Baumann <dannybaumann@web.de> | 2015-03-27 09:10:33 +0100 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-26 16:11:15 -0700 |
commit | d5f597f077eb728f66aa4befd99c66b870dd05c1 (patch) | |
tree | efdb5c9067e96685534b6dd49c9462e1cbe147f9 /src/com/android/settings/profiles | |
parent | 3fb254ec672d607d9bf9b5cae3356312a24de053 (diff) | |
download | packages_apps_Settings-d5f597f077eb728f66aa4befd99c66b870dd05c1.zip packages_apps_Settings-d5f597f077eb728f66aa4befd99c66b870dd05c1.tar.gz packages_apps_Settings-d5f597f077eb728f66aa4befd99c66b870dd05c1.tar.bz2 |
Don't save dialog changes when hitting 'cancel'.
Change-Id: I202007c1558a981cec467d7258b699b39beec51f
Diffstat (limited to 'src/com/android/settings/profiles')
-rw-r--r-- | src/com/android/settings/profiles/SetupActionsFragment.java | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/com/android/settings/profiles/SetupActionsFragment.java b/src/com/android/settings/profiles/SetupActionsFragment.java index af90304..a2f41fe 100644 --- a/src/com/android/settings/profiles/SetupActionsFragment.java +++ b/src/com/android/settings/profiles/SetupActionsFragment.java @@ -687,12 +687,7 @@ public class SetupActionsFragment extends SettingsPreferenceFragment override.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - streamSettings.setOverride(isChecked); seekBar.setEnabled(isChecked); - - mProfile.setStreamSettings(streamSettings); - mAdapter.notifyDataSetChanged(); - updateProfile(); } }); seekBar.setEnabled(streamSettings.isOverride()); @@ -703,19 +698,14 @@ public class SetupActionsFragment extends SettingsPreferenceFragment @Override public void onClick(DialogInterface dialog, int which) { int value = seekBar.getProgress(); + streamSettings.setOverride(override.isChecked()); streamSettings.setValue(value); mProfile.setStreamSettings(streamSettings); mAdapter.notifyDataSetChanged(); updateProfile(); - dialog.dismiss(); - } - }); - builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); } }); + builder.setNegativeButton(android.R.string.cancel, null); builder.show(); } |