From 4d81bb108e7d2036cf9358c76f04bd734acb776f Mon Sep 17 00:00:00 2001 From: Lee Shombert Date: Mon, 22 Feb 2021 10:43:37 -0800 Subject: [PATCH] Add two more methods to the computer Bug: 180109780 Direct two methods to the snapshot computer: * queryIntentActivitiesInternal() * queryIntentServicesInternal() This effectively makes these two methods lock-free: * queryIntentActivities() * queryIntentServices() Test: atest * FrameworksServicesTests:AppsFilterTest * FrameworksServicesTests:PackageInstallerSessionTest * FrameworksServicesTests:PackageManagerServiceTest * FrameworksServicesTests:PackageManagerSettingsTests * FrameworksServicesTests:ScanTests * FrameworksServicesTests:UserSystemPackageInstallerTest * PackageManagerServiceBootTest * UserLifecycleTests#startUser * UserLifecycleTests#stopUser * UserLifecycleTests#switchUser * android.appsecurity.cts.EphemeralTest * android.appsecurity.cts.InstantAppUserTest Change-Id: I3fb320ba5fb1944c256a08f6017e7a78a0034d90 --- .../java/com/android/server/pm/PackageManagerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index eb09ad4478f21..7803879ab5003 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -9841,7 +9841,7 @@ public class PackageManagerService extends IPackageManager.Stub private @NonNull List queryIntentActivitiesInternal(Intent intent, String resolvedType, int flags, int userId) { - return liveComputer().queryIntentActivitiesInternal(intent, + return snapshotComputer().queryIntentActivitiesInternal(intent, resolvedType, flags, userId); } @@ -10328,7 +10328,7 @@ public class PackageManagerService extends IPackageManager.Stub private @NonNull List queryIntentServicesInternal(Intent intent, String resolvedType, int flags, int userId, int callingUid, boolean includeInstantApps) { - return liveComputer().queryIntentServicesInternal(intent, + return snapshotComputer().queryIntentServicesInternal(intent, resolvedType, flags, userId, callingUid, includeInstantApps); }