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

Commit 46eb6fde authored by Jeff Sharkey's avatar Jeff Sharkey Committed by android-build-merger
Browse files

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

am: fed6c65f

* commit 'fed6c65f':
  Iterate through all known users after moving.

Change-Id: Ibb9ed6172f04dfb26a17311ffe8ba4114f655ba8
parents 724dd82b fed6c65f
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -13425,15 +13425,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;