Skip to content

Commit

Permalink
[Installer] Fix installing apps in no-root mode in Android 14
Browse files Browse the repository at this point in the history
Signed-off-by: Muntashir Al-Islam <[email protected]>
  • Loading branch information
MuntashirAkon committed Feb 12, 2024
1 parent 62a2d10 commit 3840d2a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ private boolean commit(int userId) {
Log.d(TAG, "Commit: Calling activity to request permission...");
intentReceiver = null;
Intent callbackIntent = new Intent(PackageInstallerBroadcastReceiver.ACTION_PI_RECEIVER);
callbackIntent.setPackage(BuildConfig.APPLICATION_ID);
PendingIntent pendingIntent = PendingIntentCompat.getBroadcast(mContext, 0, callbackIntent, 0, true);
sender = pendingIntent.getIntentSender();
}
Expand Down Expand Up @@ -1076,6 +1077,7 @@ public boolean uninstall(String packageName, @UserIdInt int userId, boolean keep
Log.d(TAG, "Uninstall: Calling activity to request permission...");
intentReceiver = null;
Intent callbackIntent = new Intent(PackageInstallerBroadcastReceiver.ACTION_PI_RECEIVER);
callbackIntent.setPackage(BuildConfig.APPLICATION_ID);
PendingIntent pendingIntent = PendingIntentCompat.getBroadcast(mContext, 0, callbackIntent, 0, true);
sender = pendingIntent.getIntentSender();
}
Expand Down

0 comments on commit 3840d2a

Please sign in to comment.