Skip to content
Commit 2ad8ac37 authored by Bill Lin's avatar Bill Lin Committed by Dario Freni
Browse files

Refine getPackageInfo for Apex match policy

The legacy match policy could confuse, for example,
the naming of MATCH_APEX do not named with "ONLY|FACTORY|ACTIVE",
it's make sense to joint both active and factory apexes.

Policy refined:
1. MATCH_FACTORY_ONLY : Return *factory* [eg. the version on the system image] APK packages only
2. MATCH_APEX : Return *active* APK or APEX packages
3. MATCH_FACTORY_ONLY | MATCH_APEX : Return *factory* APK or APEX packages
4. NONE (0) : Return *active* APK packages only

Fixes: 142365486
Bug: 142115351
Test: adb shell pm path $APEX_PKG_NAME
Test: adb shell pm path $APK_PKG_NAME
Test: adb shell pm list packages --apex-only
Test: atest ApexManagerTest
Test: atest CtsStagedInstallHostTestCases
Exempt-From-Owner-Approval: Already approved in
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/9524811/

Change-Id: I0077cc8dcabdcf7b67374e8b059b62158fa43714
Merged-In: Ifa01278201dd23672dfc1a30f67b888df9bc1bfd
parent 9a2ded7e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment