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

Commit 868b9fd6 authored by Sumedh Sen's avatar Sumedh Sen
Browse files

Dont sent broadcast to all users when uninstalling an updated system app

Bug: 334006801
Test: Create a secondary user. Run `adb uninstall --user 0
com.google.android.apps.docs` to uninstall Google Drive from primary
user. Switch to secondary user and observe that Google Drive is still
shown in app drawer.

Change-Id: I0f8ee933747335000ef2668afd584e567b03aa4c
parent ee1dbf70
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -461,7 +461,7 @@ final class DeletePackageHelper {


        final int userId = user == null ? UserHandle.USER_ALL : user.getIdentifier();
        final int userId = user == null ? UserHandle.USER_ALL : user.getIdentifier();
        // Remember which users are affected, before the installed states are modified
        // Remember which users are affected, before the installed states are modified
        outInfo.mRemovedUsers = (systemApp || userId == UserHandle.USER_ALL)
        outInfo.mRemovedUsers = userId == UserHandle.USER_ALL
                ? ps.queryUsersInstalledOrHasData(allUserHandles)
                ? ps.queryUsersInstalledOrHasData(allUserHandles)
                : new int[]{userId};
                : new int[]{userId};
        outInfo.populateBroadcastUsers(ps);
        outInfo.populateBroadcastUsers(ps);