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

Commit 6e9a27c9 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Receive pkg install/uninstall finish in foregound

The processing of these events only shows a dialog or writes a file to
disk or updates/removes a notification. No expensive processing is done.

On the other hand the user waits for (un)installations to happen.

Bug: 65078751
Test: Installed and uinstalled apps.
Change-Id: I15f59f8ed6b024a193335e68adac84853d8c5ec8
(cherry picked from commit 2983a822)
parent 6bc89a41
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -384,6 +384,7 @@ public class InstallInstalling extends Activity {
        protected void onPostExecute(PackageInstaller.Session session) {
            if (session != null) {
                Intent broadcastIntent = new Intent(BROADCAST_ACTION);
                broadcastIntent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
                broadcastIntent.setPackage(
                        getPackageManager().getPermissionControllerPackageName());
                broadcastIntent.putExtra(EventResultPersister.EXTRA_ID, mInstallId);
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ public class UninstallUninstalling extends Activity implements
                        EventResultPersister.GENERATE_NEW_ID, this);

                Intent broadcastIntent = new Intent(BROADCAST_ACTION);
                broadcastIntent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
                broadcastIntent.putExtra(EventResultPersister.EXTRA_ID, mUninstallId);
                broadcastIntent.setPackage(getPackageName());

+1 −0
Original line number Diff line number Diff line
@@ -274,6 +274,7 @@ public class UninstallerActivity extends Activity {

            Intent broadcastIntent = new Intent(this, UninstallFinish.class);

            broadcastIntent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
            broadcastIntent.putExtra(Intent.EXTRA_UNINSTALL_ALL_USERS, mDialogInfo.allUsers);
            broadcastIntent.putExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO, mDialogInfo.appInfo);
            broadcastIntent.putExtra(UninstallFinish.EXTRA_APP_LABEL, label);