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

Commit fc964c66 authored by Song Chun Fan's avatar Song Chun Fan
Browse files

[pm] cleanup improve_install_dont_kill flag

FLAG: EXEMPT removing improve_install_dont_kill
BUG: 409610730
Test: presubmit

Change-Id: Ia039d80a4afe83bc59226e861a0d081cb62a42ae
parent 0ef534f5
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -112,13 +112,6 @@ flag {
    bug: "182205982"
}

flag {
    name: "improve_install_dont_kill"
    namespace: "package_manager_service"
    description: "Feature flag to reduce app crashes caused by split installs with INSTALL_DONT_KILL"
    bug: "291212866"
}

flag {
    name: "relative_reference_intent_filters"
    is_exported: true
+3 −5
Original line number Diff line number Diff line
@@ -3159,12 +3159,10 @@ final class InstallPackageHelper {
                    // code is loaded by a new Activity before ApplicationInfo changes have
                    // propagated to all application threads.
                    mPm.scheduleDeferredNoKillPostDelete(args);
                    if (Flags.improveInstallDontKill()) {
                    try (var installLock = mPm.mInstallLock.acquireLock()) {
                        PackageManagerServiceUtils.linkFilesToOldDirs(mPm.mInstaller,
                                packageName, pkgSetting.getPath(), pkgSetting.getOldPaths());
                    }
                    }
                } else {
                    mRemovePackageHelper.cleanUpResources(packageName, args.getCodeFile(),
                            args.getInstructionSets());
+7 −9
Original line number Diff line number Diff line
@@ -1309,7 +1309,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService
        // If the feature flag is on, retain the old files for a day. Otherwise, delete the old
        // files after a few seconds.
        long deleteDelayMillis = DEFERRED_NO_KILL_POST_DELETE_DELAY_MS;
        if (Flags.improveInstallDontKill()) {
        deleteDelayMillis = Binder.withCleanCallingIdentity(() -> {
            return DeviceConfig.getLong(NAMESPACE_PACKAGE_MANAGER_SERVICE,
                    /* name= */ PROPERTY_DEFERRED_NO_KILL_POST_DELETE_DELAY_MS_EXTENDED,
@@ -1317,7 +1316,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService
        });
        Slog.w(TAG, "Delaying the deletion of <" + args.getCodePath() + "> by "
                + deleteDelayMillis + "ms or till the next reboot");
        }
        mHandler.sendMessageDelayed(message, deleteDelayMillis);
    }

+1 −1
Original line number Diff line number Diff line
@@ -1291,7 +1291,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
                pkgSetting.setLegacyNativeLibraryPath(legacyNativeLibraryPath);
            }
            pkgSetting.setPath(codePath);
            if (isDontKill && Flags.improveInstallDontKill()) {
            if (isDontKill) {
                // We retain old code paths for DONT_KILL installs. Keep a record of old paths until
                // they are removed.
                pkgSetting.addOldPath(oldCodePath);
+0 −1
Original line number Diff line number Diff line
@@ -1616,7 +1616,6 @@ public class PackageManagerSettingsTests {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_IMPROVE_INSTALL_DONT_KILL)
    public void testUpdatePackageSettings02WithOldPaths() throws PackageManagerException {
        final PackageSetting testPkgSetting01 =
                createPackageSetting(0 /*sharedUserId*/, 0 /*pkgFlags*/);