summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabir Pradhan <prabirmsp@google.com>2024-04-19 16:28:36 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-04-19 16:28:36 +0000
commit44b6216a2d41c0b40bf39e60cf9fcae8b7e94393 (patch)
tree2d2806c4665227be90d1afb79f9ffd1b36746bec
parent686c83d5232ecef194acef1f1e7a3789422dbb20 (diff)
parent5fbf6b2a0f6d156dc5b3d0687833782fd161db55 (diff)
downloadnative-44b6216a2d41c0b40bf39e60cf9fcae8b7e94393.tar.gz
Merge "IPackageManagerNative: Add getPackageUid" into main
-rw-r--r--libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl b/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl
index f8a8843309..3ddfefa311 100644
--- a/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl
+++ b/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl
@@ -43,6 +43,18 @@ interface IPackageManagerNative {
@utf8InCpp String[] getNamesForUids(in int[] uids);
/**
+ * Return the UID associated with the given package name.
+ * Note that the same package will have different UIDs under different UserHandle on
+ * the same device.
+ * @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 userId The user handle identifier to look up the package under.
+ * @return Returns an integer UID who owns the given package name, or -1 if no such package is
+ * available to the caller.
+ */
+ int getPackageUid(in @utf8InCpp String packageName, in long flags, in int userId);
+
+ /**
* Returns the name of the installer (a package) which installed the named
* package. Preloaded packages return the string "preload". Sideloaded packages
* return an empty string. Unknown or unknowable are returned as empty strings.