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

Commit 2e041bef authored by Sumedh Sen's avatar Sumedh Sen
Browse files

Show failure dialog when app can't be installed due to secureFRP

Instead of crashing the app due to a SecurityException, let the user
know that installation failed.

Bug: 308713336
Test: adb shell settings put global secure_frp_mode 1
      Sideload an APK via PackageInstaller app
Change-Id: I08aa3992ba94bc85d94f761b1f174fa740c2a38b
parent e34ebe15
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -290,7 +290,14 @@ public class InstallInstalling extends AlertActivity {
                        broadcastIntent,
                        PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE);

                try {
                    session.commit(pendingIntent.getIntentSender());
                } catch (Exception e) {
                    Log.e(LOG_TAG, "Cannot install package: ", e);
                    launchFailure(PackageInstaller.STATUS_FAILURE,
                        PackageManager.INSTALL_FAILED_INTERNAL_ERROR, null);
                    return;
                }
                mCancelButton.setEnabled(false);
                setFinishOnTouchOutside(false);
            } else {