OSDN Git Service

packagemanager_native access to package installer, version
authorRay Essick <essick@google.com>
Tue, 19 Sep 2017 15:49:23 +0000 (08:49 -0700)
committerRay Essick <essick@google.com>
Tue, 19 Sep 2017 18:18:00 +0000 (11:18 -0700)
add getInstallerForPackage() and getVersionCodeForPackage()
to support native media.metrics needs.

Bug: 65027506
Test: watch logs for various package combinations
Change-Id: I6f3c551e8f547ab4151ef2400db4e100a6f53abf

libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl

index 6b7254c..3264666 100644 (file)
@@ -38,4 +38,20 @@ interface IPackageManagerNative {
      * strings.
      */
     @utf8InCpp String[] getNamesForUids(in int[] uids);
+
+    /**
+     * 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.
+     */
+
+    @utf8InCpp String getInstallerForPackage(in String packageName);
+
+    /**
+     * Returns the version code of the named package.
+     * Unknown or unknowable versions are returned as 0.
+     */
+
+    int getVersionCodeForPackage(in String packageName);
+
 }