diff options
author | 2023-01-20 12:27:54 -0800 | |
---|---|---|
committer | 2023-01-26 12:07:39 -0800 | |
commit | 90ec42c2e2a457ea66d3196f39e15dd6ff54a0b4 (patch) | |
tree | c6850129eafd7ad52c100c1668a334560a077a48 /tests/BinaryTransparencyHostTest/src | |
parent | 7b5efcae5a026771f7e5d23424e46fd913021a0a (diff) |
Replace some PackageInfo queries with PackageState
The motivation is that the current check of preload update
(`packageInfo.signingInfo == null`) seems unstable. PackageState
is also an internal structure and should provide the truth (if not only
closer).
`measurePackage` is used in all cases, and now takes a `PackageState`
instead of `PackageInfo`. The implementation requires referring further
into `AndroidPackage` (which can be null when the APK is missing).
But not all existing code are migrated. For example, MBA requires more
changes in BICS. For those cases, `getPackageStateInternal` serves as an
adapter to get a PackageInfo given package name (from PackageState), so
that we can still use the same `measurePackage`.
Bug: 265244016
Test: No change before and after in the execution of
`adb shell cmd transparency get apex_info -v`
`adb shell cmd transparency get module_info -v`
`adb shell cmd transparency get mba_info -v`
Test: adb shell cmd jobscheduler run android $ID
With DEBUG == true, logcat output looks correct
Test: atest BinaryTransparencyServiceTest
Change-Id: If898d1ca9bc7020eedf0b05aae87da12a50100e6
Diffstat (limited to 'tests/BinaryTransparencyHostTest/src')
0 files changed, 0 insertions, 0 deletions