summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/profiles
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2015-03-27 09:10:33 +0100
committerAdnan Begovic <adnan@cyngn.com>2015-10-26 16:11:15 -0700
commitd5f597f077eb728f66aa4befd99c66b870dd05c1 (patch)
treeefdb5c9067e96685534b6dd49c9462e1cbe147f9 /src/com/android/settings/profiles
parent3fb254ec672d607d9bf9b5cae3356312a24de053 (diff)
downloadpackages_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.java14
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();
}