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

Commit 74635f9a authored by Gavin Corkery's avatar Gavin Corkery
Browse files

Don't send SESSION_COMMITTED broadcast for staged installs

Staged sessions currently send a SESSION_COMMITTED broadcast
when they are created, but not upon activation. Since there
is nobody active at activation to listen to the broadcast,
it should not be sent. This also prevents app shortcuts being
added to the launcher before a new version has been activated.

Bug: 139663018
Test: atest StagedInstallTest
Change-Id: Icf51b5611a1903eee58c3310bfb875eaf737c26f
parent ffdedd2d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20881,7 +20881,7 @@ public class PackageManagerService extends IPackageManager.Stub
    public void sendSessionCommitBroadcast(PackageInstaller.SessionInfo sessionInfo, int userId) {
        UserManagerService ums = UserManagerService.getInstance();
        if (ums != null) {
        if (ums != null && !sessionInfo.isStaged()) {
            final UserInfo parent = ums.getProfileParent(userId);
            final int launcherUid = (parent != null) ? parent.id : userId;
            final ComponentName launcherComponent = getDefaultHomeActivity(launcherUid);