diff options
| author | Todd Kennedy <toddke@google.com> | 2016-03-31 15:11:11 -0700 |
|---|---|---|
| committer | Todd Kennedy <toddke@google.com> | 2016-03-31 15:53:45 -0700 |
| commit | d6ee0ba57906f83f45ca2a2cd835d7ff6e7a88df (patch) | |
| tree | 9a539b314ca0c26908e3695be870cfa71614df7f /core/java/android | |
| parent | 9a99629eaa79a7e6c3bcc0ecf674bd7981fef5a0 (diff) | |
Allow retrieving info /system components
Generally we return info for the latest installed package; which could
either be a built-in [i.e. on the /system partition] package or a user
updated package. In certain circumstances, we want to be able to get
the version on the /system partition regardless of whether or not the
user has updated it. We do this by passing MATCH_FACTORY_ONLY to
getPackageInfo().
Bug: 27469181
Change-Id: I8dd1d110e2d72e5c6f024812d0b5d15d8b217347
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/pm/PackageManager.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index e89cbd7091ae..39bc783b53ac 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -130,6 +130,7 @@ public abstract class PackageManager { MATCH_DISABLED_COMPONENTS, MATCH_DISABLED_UNTIL_USED_COMPONENTS, MATCH_SYSTEM_ONLY, + MATCH_FACTORY_ONLY, MATCH_DEBUG_TRIAGED_MISSING, }) @Retention(RetentionPolicy.SOURCE) @@ -415,6 +416,13 @@ public abstract class PackageManager { public static final int MATCH_SYSTEM_ONLY = 0x00100000; /** + * Internal {@link PackageInfo} flag: include only components on the system image. + * This will not return information on any unbundled update to system components. + * @hide + */ + public static final int MATCH_FACTORY_ONLY = 0x00200000; + + /** * Internal flag used to indicate that a system component has done their * homework and verified that they correctly handle packages and components * that come and go over time. In particular: |
