diff --git a/api/system-current.txt b/api/system-current.txt index f963c10e6272d..7be995ce87032 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -1225,7 +1225,6 @@ package android.content.pm { method public abstract java.util.List getInstantApps(); method public abstract java.util.List getIntentFilterVerifications(java.lang.String); method public abstract int getIntentVerificationStatusAsUser(java.lang.String, int); - method public android.content.pm.PackageInfo getPackageInfoAsUser(java.lang.String, int, android.os.UserHandle) throws android.content.pm.PackageManager.NameNotFoundException; method public abstract int getPermissionFlags(java.lang.String, java.lang.String, android.os.UserHandle); method public abstract void grantRuntimePermission(java.lang.String, java.lang.String, android.os.UserHandle); method public abstract int installExistingPackage(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException; diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index ad06be3b026b2..361bebaec3a2b 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -3142,33 +3142,6 @@ public abstract class PackageManager { public abstract PackageInfo getPackageInfoAsUser(String packageName, @PackageInfoFlags int flags, @UserIdInt int userId) throws NameNotFoundException; - /** - * Retrieve overall information about an application package that is - * installed on the system. - * - * @param packageName The full name (i.e. com.google.apps.contacts) of the - * desired package. - * @param flags Additional option flags to modify the data returned. - * @param userHandle The user. - * @return A PackageInfo object containing information about the package. If - * flag {@code MATCH_UNINSTALLED_PACKAGES} is set and if the package - * is not found in the list of installed applications, the package - * information is retrieved from the list of uninstalled - * applications (which includes installed applications as well as - * applications with data directory i.e. applications which had been - * deleted with {@code DONT_DELETE_DATA} flag set). - * @throws NameNotFoundException if a package with the given name cannot be - * found on the system. - * @hide - */ - @RequiresPermission(Manifest.permission.INTERACT_ACROSS_USERS) - @SystemApi - public @NonNull PackageInfo getPackageInfoAsUser(@NonNull String packageName, - @PackageInfoFlags int flags, - @NonNull UserHandle userHandle) throws NameNotFoundException { - return getPackageInfoAsUser(packageName, flags, userHandle.getIdentifier()); - } - /** * Map from the current package names in use on the device to whatever * the current canonical name of that package is.