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

Commit 8c73974b authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Android (Google) Code Review
Browse files

Merge "Show support dialog when admin disallows installs from unknown sources." into nyc-dev

parents 74b57b79 fca0a5ce
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -517,8 +517,10 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen
        // If the admin prohibits it, or we're running in a managed profile, just show error
        // and exit. Otherwise show an option to take the user to Settings to change the setting.
        final boolean isManagedProfile = mUserManager.isManagedProfile();
        if (!unknownSourcesAllowedByAdmin
                || (!unknownSourcesAllowedByUser && isManagedProfile)) {
        if (!unknownSourcesAllowedByAdmin) {
            startActivity(new Intent(Settings.ACTION_SHOW_ADMIN_SUPPORT_DETAILS));
            finish();
        } else if (!unknownSourcesAllowedByUser && isManagedProfile) {
            showDialogInner(DLG_ADMIN_RESTRICTS_UNKNOWN_SOURCES);
        } else if (!unknownSourcesAllowedByUser) {
            // Ask user to enable setting first