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

Commit 600aeb12 authored by Mathieu Chartier's avatar Mathieu Chartier Committed by Gerrit Code Review
Browse files

Merge "old paths contains all entries when updating"

parents fce4acd6 4cfaa2eb
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -5295,8 +5295,8 @@ public final class ActivityThread {
                                        }
                                        }
                                    }
                                    }
                                }
                                }
                                final List<String> oldPaths =
                                final ArrayList<String> oldPaths = new ArrayList<>();
                                        sPackageManager.getPreviousCodePaths(packageName);
                                LoadedApk.makePaths(this, loadedApk.getApplicationInfo(), oldPaths);
                                loadedApk.updateApplicationInfo(aInfo, oldPaths);
                                loadedApk.updateApplicationInfo(aInfo, oldPaths);
                            } catch (RemoteException e) {
                            } catch (RemoteException e) {
                            }
                            }
+0 −2
Original line number Original line Diff line number Diff line
@@ -648,8 +648,6 @@ interface IPackageManager {


    boolean isPackageDeviceAdminOnAnyUser(String packageName);
    boolean isPackageDeviceAdminOnAnyUser(String packageName);


    List<String> getPreviousCodePaths(in String packageName);

    int getInstallReason(String packageName, int userId);
    int getInstallReason(String packageName, int userId);


    ParceledListSlice getSharedLibraries(in String packageName, int flags, int userId);
    ParceledListSlice getSharedLibraries(in String packageName, int flags, int userId);
+0 −16
Original line number Original line Diff line number Diff line
@@ -17901,22 +17901,6 @@ public class PackageManagerService extends IPackageManager.Stub
        }
        }
    }
    }
    @Override
    public List<String> getPreviousCodePaths(String packageName) {
        final int callingUid = Binder.getCallingUid();
        final List<String> result = new ArrayList<>();
        if (getInstantAppPackageName(callingUid) != null) {
            return result;
        }
        final PackageSetting ps = mSettings.mPackages.get(packageName);
        if (ps != null
                && ps.oldCodePaths != null
                && !filterAppAccessLPr(ps, callingUid, UserHandle.getUserId(callingUid))) {
            result.addAll(ps.oldCodePaths);
        }
        return result;
    }
    private void replaceNonSystemPackageLIF(PackageParser.Package deletedPackage,
    private void replaceNonSystemPackageLIF(PackageParser.Package deletedPackage,
            PackageParser.Package pkg, final int policyFlags, int scanFlags, UserHandle user,
            PackageParser.Package pkg, final int policyFlags, int scanFlags, UserHandle user,
            int[] allUsers, String installerPackageName, PackageInstalledInfo res,
            int[] allUsers, String installerPackageName, PackageInstalledInfo res,