Loading services/core/java/com/android/server/pm/AppsFilter.java +1 −1 Original line number Diff line number Diff line Loading @@ -347,7 +347,7 @@ public class AppsFilter { } final StateProvider stateProvider = command -> { synchronized (injector.getLock()) { command.currentState(injector.getSettings().mPackages, command.currentState(injector.getSettings().getPackagesLocked(), injector.getUserManagerInternal().getUserInfos()); } }; Loading services/core/java/com/android/server/pm/OtaDexoptService.java +3 −3 Original line number Diff line number Diff line Loading @@ -128,12 +128,12 @@ public class OtaDexoptService extends IOtaDexopt.Stub { synchronized (mPackageManagerService.mLock) { // Important: the packages we need to run with ab-ota compiler-reason. important = PackageManagerServiceUtils.getPackagesForDexopt( mPackageManagerService.mSettings.mPackages.values(), mPackageManagerService, DEBUG_DEXOPT); mPackageManagerService.mSettings.getPackagesLocked().values(), mPackageManagerService, DEBUG_DEXOPT); // Remove Platform Package from A/B OTA b/160735835. important.removeIf(isPlatformPackage); // Others: we should optimize this with the (first-)boot compiler-reason. others = new ArrayList<>(mPackageManagerService.mSettings.mPackages.values()); others = new ArrayList<>(mPackageManagerService.mSettings.getPackagesLocked().values()); others.removeAll(important); others.removeIf(PackageManagerServiceUtils.REMOVE_IF_NULL_PKG); others.removeIf(isPlatformPackage); Loading services/core/java/com/android/server/pm/PackageManagerService.java +11 −11 Original line number Diff line number Diff line Loading @@ -17692,12 +17692,12 @@ public class PackageManagerService extends IPackageManager.Stub final SparseArray<int[]> newBroadcastAllowList; final String codePath; synchronized (mLock) { final PackageSetting ps = mSettings.mPackages.get(mPackageName); final PackageSetting ps = mSettings.getPackageLPr(mPackageName); if (ps == null) { return; } newBroadcastAllowList = mAppsFilter.getVisibilityAllowList( ps, mInstalledUserIds, mSettings.mPackages); ps, mInstalledUserIds, mSettings.getPackagesLocked()); codePath = ps.getPathString(); } Bundle extras = new Bundle(); Loading @@ -17715,12 +17715,12 @@ public class PackageManagerService extends IPackageManager.Stub public void onPackageUnstartable(int reason) { final SparseArray<int[]> newBroadcastAllowList; synchronized (mLock) { final PackageSetting ps = mSettings.mPackages.get(mPackageName); final PackageSetting ps = mSettings.getPackageLPr(mPackageName); if (ps == null) { return; } newBroadcastAllowList = mAppsFilter.getVisibilityAllowList( ps, mInstalledUserIds, mSettings.mPackages); ps, mInstalledUserIds, mSettings.getPackagesLocked()); } Bundle extras = new Bundle(); extras.putInt(Intent.EXTRA_UID, mUid); Loading @@ -17737,12 +17737,12 @@ public class PackageManagerService extends IPackageManager.Stub public void onPackageStartable() { final SparseArray<int[]> newBroadcastAllowList; synchronized (mLock) { final PackageSetting ps = mSettings.mPackages.get(mPackageName); final PackageSetting ps = mSettings.getPackageLPr(mPackageName); if (ps == null) { return; } newBroadcastAllowList = mAppsFilter.getVisibilityAllowList( ps, mInstalledUserIds, mSettings.mPackages); ps, mInstalledUserIds, mSettings.getPackagesLocked()); } Bundle extras = new Bundle(); extras.putInt(Intent.EXTRA_UID, mUid); Loading @@ -17768,7 +17768,7 @@ public class PackageManagerService extends IPackageManager.Stub public void onPackageLoadingProgressChanged(float progress) { final PackageSetting ps; synchronized (mLock) { ps = mSettings.mPackages.get(mPackageName); ps = mSettings.getPackageLPr(mPackageName); } if (ps == null) { return; Loading @@ -17791,7 +17791,7 @@ public class PackageManagerService extends IPackageManager.Stub public void onHealthStatus(int storageId, int status) throws RemoteException { final PackageSetting ps; synchronized (mLock) { ps = mSettings.mPackages.get(mPackageName); ps = mSettings.getPackageLPr(mPackageName); } if (ps == null) { return; Loading @@ -17804,7 +17804,7 @@ public class PackageManagerService extends IPackageManager.Stub int userId) { final PackageSetting ps; synchronized (mLock) { ps = mSettings.mPackages.get(packageName); ps = mSettings.getPackageLPr(packageName); if (ps == null) { Slog.w(TAG, "Failed to get package setting. Package " + packageName + " is not installed"); Loading Loading @@ -24612,7 +24612,7 @@ public class PackageManagerService extends IPackageManager.Stub // which was uninstalled while keeping its data. AndroidPackage dataOwnerPkg = mPackages.get(packageName); if (dataOwnerPkg == null) { PackageSetting ps = mSettings.mPackages.get(packageName); PackageSetting ps = mSettings.getPackageLPr(packageName); if (ps != null) { dataOwnerPkg = ps.pkg; } Loading Loading @@ -26059,7 +26059,7 @@ public class PackageManagerService extends IPackageManager.Stub public void notifyPackageCrashOrAnr(@NonNull String packageName) { final PackageSetting ps; synchronized (mLock) { ps = mSettings.mPackages.get(packageName); ps = mSettings.getPackageLPr(packageName); if (ps == null) { Slog.w(TAG, "Failed notifyPackageCrash. Package " + packageName + " is not installed"); services/core/java/com/android/server/pm/Settings.java +1 −0 Original line number Diff line number Diff line Loading @@ -295,6 +295,7 @@ public final class Settings { private final File mKernelMappingFilename; /** Map from package name to settings */ @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE) final ArrayMap<String, PackageSetting> mPackages = new ArrayMap<>(); /** Loading Loading
services/core/java/com/android/server/pm/AppsFilter.java +1 −1 Original line number Diff line number Diff line Loading @@ -347,7 +347,7 @@ public class AppsFilter { } final StateProvider stateProvider = command -> { synchronized (injector.getLock()) { command.currentState(injector.getSettings().mPackages, command.currentState(injector.getSettings().getPackagesLocked(), injector.getUserManagerInternal().getUserInfos()); } }; Loading
services/core/java/com/android/server/pm/OtaDexoptService.java +3 −3 Original line number Diff line number Diff line Loading @@ -128,12 +128,12 @@ public class OtaDexoptService extends IOtaDexopt.Stub { synchronized (mPackageManagerService.mLock) { // Important: the packages we need to run with ab-ota compiler-reason. important = PackageManagerServiceUtils.getPackagesForDexopt( mPackageManagerService.mSettings.mPackages.values(), mPackageManagerService, DEBUG_DEXOPT); mPackageManagerService.mSettings.getPackagesLocked().values(), mPackageManagerService, DEBUG_DEXOPT); // Remove Platform Package from A/B OTA b/160735835. important.removeIf(isPlatformPackage); // Others: we should optimize this with the (first-)boot compiler-reason. others = new ArrayList<>(mPackageManagerService.mSettings.mPackages.values()); others = new ArrayList<>(mPackageManagerService.mSettings.getPackagesLocked().values()); others.removeAll(important); others.removeIf(PackageManagerServiceUtils.REMOVE_IF_NULL_PKG); others.removeIf(isPlatformPackage); Loading
services/core/java/com/android/server/pm/PackageManagerService.java +11 −11 Original line number Diff line number Diff line Loading @@ -17692,12 +17692,12 @@ public class PackageManagerService extends IPackageManager.Stub final SparseArray<int[]> newBroadcastAllowList; final String codePath; synchronized (mLock) { final PackageSetting ps = mSettings.mPackages.get(mPackageName); final PackageSetting ps = mSettings.getPackageLPr(mPackageName); if (ps == null) { return; } newBroadcastAllowList = mAppsFilter.getVisibilityAllowList( ps, mInstalledUserIds, mSettings.mPackages); ps, mInstalledUserIds, mSettings.getPackagesLocked()); codePath = ps.getPathString(); } Bundle extras = new Bundle(); Loading @@ -17715,12 +17715,12 @@ public class PackageManagerService extends IPackageManager.Stub public void onPackageUnstartable(int reason) { final SparseArray<int[]> newBroadcastAllowList; synchronized (mLock) { final PackageSetting ps = mSettings.mPackages.get(mPackageName); final PackageSetting ps = mSettings.getPackageLPr(mPackageName); if (ps == null) { return; } newBroadcastAllowList = mAppsFilter.getVisibilityAllowList( ps, mInstalledUserIds, mSettings.mPackages); ps, mInstalledUserIds, mSettings.getPackagesLocked()); } Bundle extras = new Bundle(); extras.putInt(Intent.EXTRA_UID, mUid); Loading @@ -17737,12 +17737,12 @@ public class PackageManagerService extends IPackageManager.Stub public void onPackageStartable() { final SparseArray<int[]> newBroadcastAllowList; synchronized (mLock) { final PackageSetting ps = mSettings.mPackages.get(mPackageName); final PackageSetting ps = mSettings.getPackageLPr(mPackageName); if (ps == null) { return; } newBroadcastAllowList = mAppsFilter.getVisibilityAllowList( ps, mInstalledUserIds, mSettings.mPackages); ps, mInstalledUserIds, mSettings.getPackagesLocked()); } Bundle extras = new Bundle(); extras.putInt(Intent.EXTRA_UID, mUid); Loading @@ -17768,7 +17768,7 @@ public class PackageManagerService extends IPackageManager.Stub public void onPackageLoadingProgressChanged(float progress) { final PackageSetting ps; synchronized (mLock) { ps = mSettings.mPackages.get(mPackageName); ps = mSettings.getPackageLPr(mPackageName); } if (ps == null) { return; Loading @@ -17791,7 +17791,7 @@ public class PackageManagerService extends IPackageManager.Stub public void onHealthStatus(int storageId, int status) throws RemoteException { final PackageSetting ps; synchronized (mLock) { ps = mSettings.mPackages.get(mPackageName); ps = mSettings.getPackageLPr(mPackageName); } if (ps == null) { return; Loading @@ -17804,7 +17804,7 @@ public class PackageManagerService extends IPackageManager.Stub int userId) { final PackageSetting ps; synchronized (mLock) { ps = mSettings.mPackages.get(packageName); ps = mSettings.getPackageLPr(packageName); if (ps == null) { Slog.w(TAG, "Failed to get package setting. Package " + packageName + " is not installed"); Loading Loading @@ -24612,7 +24612,7 @@ public class PackageManagerService extends IPackageManager.Stub // which was uninstalled while keeping its data. AndroidPackage dataOwnerPkg = mPackages.get(packageName); if (dataOwnerPkg == null) { PackageSetting ps = mSettings.mPackages.get(packageName); PackageSetting ps = mSettings.getPackageLPr(packageName); if (ps != null) { dataOwnerPkg = ps.pkg; } Loading Loading @@ -26059,7 +26059,7 @@ public class PackageManagerService extends IPackageManager.Stub public void notifyPackageCrashOrAnr(@NonNull String packageName) { final PackageSetting ps; synchronized (mLock) { ps = mSettings.mPackages.get(packageName); ps = mSettings.getPackageLPr(packageName); if (ps == null) { Slog.w(TAG, "Failed notifyPackageCrash. Package " + packageName + " is not installed");
services/core/java/com/android/server/pm/Settings.java +1 −0 Original line number Diff line number Diff line Loading @@ -295,6 +295,7 @@ public final class Settings { private final File mKernelMappingFilename; /** Map from package name to settings */ @VisibleForTesting(visibility = VisibleForTesting.Visibility.PRIVATE) final ArrayMap<String, PackageSetting> mPackages = new ArrayMap<>(); /** Loading