Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 90ec42c2 authored by Victor Hsieh's avatar Victor Hsieh
Browse files

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
parent 7b5efcae
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