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

Commit d4c3c05b authored by Songchun Fan's avatar Songchun Fan
Browse files

[pm] remove deprecated mOldCodePaths in PackageSetting

This is not used anywhere (presumably it was used at one point to
preserve the old paths during DONT_KILL installs, but unclear).

If needed, oldPackage.getPath() returns the replaced package's path, so
we can just use that.

BUG: 291212866
Test: n/a

Change-Id: I7aa7cc970835fb8bd92ace189841728b455689ee
parent be1be92e
Loading
Loading
Loading
Loading
+0 −18
Original line number Original line Diff line number Diff line
@@ -2119,24 +2119,6 @@ final class InstallPackageHelper {
                            // ignore; not possible for non-system app
                            // ignore; not possible for non-system app
                        }
                        }
                    }
                    }
                    // Successfully deleted the old package; proceed with replace.
                    // Update the in-memory copy of the previous code paths.
                    PackageSetting ps1 = mPm.mSettings.getPackageLPr(
                            installRequest.getExistingPackageName());
                    if ((installRequest.getInstallFlags() & PackageManager.DONT_KILL_APP)
                            == 0) {
                        Set<String> oldCodePaths = ps1.getOldCodePaths();
                        if (oldCodePaths == null) {
                            oldCodePaths = new ArraySet<>();
                        }
                        if (oldPackage != null) {
                            Collections.addAll(oldCodePaths, oldPackage.getBaseApkPath());
                            Collections.addAll(oldCodePaths, oldPackage.getSplitCodePaths());
                        }
                        ps1.setOldCodePaths(oldCodePaths);
                    } else {
                        ps1.setOldCodePaths(null);
                    }


                    if (installRequest.getReturnCode() == PackageManager.INSTALL_SUCCEEDED) {
                    if (installRequest.getReturnCode() == PackageManager.INSTALL_SUCCEEDED) {
                        PackageSetting ps2 = mPm.mSettings.getPackageLPr(
                        PackageSetting ps2 = mPm.mSettings.getPackageLPr(
+2 −26

File changed.

Preview size limit exceeded, changes collapsed.