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

Commit cc3bd9fa authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Fix for: not clearing ART profiles during update.

Fixes: 315856256
Test: androidx-main/frameworks/support$ ./gradlew :profileinstaller:integration-tests:profile-verification:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=androidx.profileinstaller.integration.profileverification.ProfileVerificationTestWithoutProfileInstallerInitializer#updateFromReferenceProfileToNoReferenceProfile

Change-Id: Ib5374d41a8dd30d939f055010fd220c574892a90
parent 75d57fa8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2450,9 +2450,9 @@ final class InstallPackageHelper {
            // Hardcode previousAppId to 0 to disable any data migration (http://b/221088088)
            mAppDataHelper.prepareAppDataPostCommitLIF(ps, 0, installRequest.getNewUsers());
            if (installRequest.isClearCodeCache()) {
                mAppDataHelper.clearAppDataLeafLIF(packageName, ps.getVolumeUuid(),
                        UserHandle.USER_ALL, FLAG_STORAGE_DE | FLAG_STORAGE_CE
                        | FLAG_STORAGE_EXTERNAL | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
                mAppDataHelper.clearAppDataLIF(ps.getPkg(), UserHandle.USER_ALL,
                        FLAG_STORAGE_DE | FLAG_STORAGE_CE | FLAG_STORAGE_EXTERNAL
                                | Installer.FLAG_CLEAR_CODE_CACHE_ONLY);
            }
            if (installRequest.isInstallReplace() && pkg != null) {
                mDexManager.notifyPackageUpdated(packageName,