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

Commit fed6c65f authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Iterate through all known users after moving." into nyc-dev

parents ad14b884 426e4206
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -13419,15 +13419,18 @@ public class PackageManagerService extends IPackageManager.Stub {
            final File codeFile = new File(Environment.getDataAppDirectory(volumeUuid),
                    move.dataAppName);
            Slog.d(TAG, "Cleaning up " + move.packageName + " on " + volumeUuid);
            final int[] userIds = sUserManager.getUserIds();
            synchronized (mInstallLock) {
                // Clean up both app data and code
                // All package moves are frozen until finished
                for (int userId : userIds) {
                    try {
                    mInstaller.destroyAppData(volumeUuid, move.packageName, UserHandle.USER_ALL,
                        mInstaller.destroyAppData(volumeUuid, move.packageName, userId,
                                StorageManager.FLAG_STORAGE_DE | StorageManager.FLAG_STORAGE_CE, 0);
                    } catch (InstallerException e) {
                        Slog.w(TAG, String.valueOf(e));
                    }
                }
                removeCodePathLI(codeFile);
            }
            return true;