Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17224826 authored by arete's avatar arete Committed by Di Wu
Browse files

Cannot cancel in the "Warn app installation" dialog in security settings.

Bug: 16900059
Change-Id: Ie4e335b000350632bffc5740939b46b21357e298
parent aa772c95
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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);
            }
        }
    }