am 4db6a46e
: am f1fd6937
: am 17224826
: Cannot cancel in the "Warn app installation" dialog in security settings.
* commit '4db6a46ef8f7d2d28a798e8ba12de0a54d6fc2b1': Cannot cancel in the "Warn app installation" dialog in security settings.
This commit is contained in:
@@ -404,16 +404,17 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
.setIcon(com.android.internal.R.drawable.ic_dialog_alert)
|
.setIcon(com.android.internal.R.drawable.ic_dialog_alert)
|
||||||
.setMessage(getResources().getString(R.string.install_all_warning))
|
.setMessage(getResources().getString(R.string.install_all_warning))
|
||||||
.setPositiveButton(android.R.string.yes, this)
|
.setPositiveButton(android.R.string.yes, this)
|
||||||
.setNegativeButton(android.R.string.no, null)
|
.setNegativeButton(android.R.string.no, this)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
if (dialog == mWarnInstallApps && which == DialogInterface.BUTTON_POSITIVE) {
|
if (dialog == mWarnInstallApps) {
|
||||||
setNonMarketAppsAllowed(true);
|
boolean turnOn = which == DialogInterface.BUTTON_POSITIVE;
|
||||||
|
setNonMarketAppsAllowed(turnOn);
|
||||||
if (mToggleAppInstallation != null) {
|
if (mToggleAppInstallation != null) {
|
||||||
mToggleAppInstallation.setChecked(true);
|
mToggleAppInstallation.setChecked(turnOn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user