summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorarete <arete@google.com>2014-08-14 13:45:36 -0700
committerDi Wu <arete@google.com>2014-08-14 21:45:04 +0000
commit17224826f896278de0805e6a2fec321701bbb83d (patch)
treeba8f54187b77833825555bf0dd364179772d1833 /src
parentaa772c9521529d6235aa7be0fb81e75a334c4b82 (diff)
downloadpackages_apps_Settings-17224826f896278de0805e6a2fec321701bbb83d.zip
packages_apps_Settings-17224826f896278de0805e6a2fec321701bbb83d.tar.gz
packages_apps_Settings-17224826f896278de0805e6a2fec321701bbb83d.tar.bz2
Cannot cancel in the "Warn app installation" dialog in security settings.
Bug: 16900059 Change-Id: Ie4e335b000350632bffc5740939b46b21357e298
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/SecuritySettings.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 1b9f44c..f2a0bbb 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -404,16 +404,17 @@ public class SecuritySettings extends SettingsPreferenceFragment
.setIcon(com.android.internal.R.drawable.ic_dialog_alert)
.setMessage(getResources().getString(R.string.install_all_warning))
.setPositiveButton(android.R.string.yes, this)
- .setNegativeButton(android.R.string.no, null)
+ .setNegativeButton(android.R.string.no, this)
.show();
}
@Override
public void onClick(DialogInterface dialog, int which) {
- if (dialog == mWarnInstallApps && which == DialogInterface.BUTTON_POSITIVE) {
- setNonMarketAppsAllowed(true);
+ if (dialog == mWarnInstallApps) {
+ boolean turnOn = which == DialogInterface.BUTTON_POSITIVE;
+ setNonMarketAppsAllowed(turnOn);
if (mToggleAppInstallation != null) {
- mToggleAppInstallation.setChecked(true);
+ mToggleAppInstallation.setChecked(turnOn);
}
}
}