Skip to content
Commit 22943804 authored by Billy Lau's avatar Billy Lau
Browse files

BinaryTransparencyService: Add package update observers.

Previously, an observer for APK updates was added/registered.

However, there are several challenges that we have to overcome
in order to cover updates to non-staged APEXs. In the end
we are making use of broadcast receivers to listen to
`Intent.ACTION_PACKAGE_ADDED` and further filtering out updates
from new installation, and only focusing on packages that
we are interested in. This helps us cover non-staged APEXs.

Additionally, we are adding a new observer to hook into staged
APEXs so that our coverage is now complete.

Other minor adjustments:
- refactor all package update hooks into helper methods and change
  its call from `onStart` to `onBootPhase`.

Bug: 264428429
Test: Manual. Pull and re-install preloaded app and APEXs to
	simulate updates and watch logcat for corresponding entry.
Change-Id: Iaf41ae53976ee9df03f8631168bef1c4ceebe192
parent aadefe0a
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