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

Commit fca0a5ce authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Show support dialog when admin disallows installs from unknown sources.

Bug: 26737249
Change-Id: I2a58b2eae34319ecc51ffc42078ed0cfe2460c60
parent e0464384
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