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

Skip to content
Commit 61fe40c6 authored by Winson's avatar Winson
Browse files

Force notify overlay paths on package replaced due to system update uninstall

Tracks system update downgrades through a new ACTION_PACKAGE_REMOVED
broadcast extra and forces OMS to re-call into PMS with the target's
overlay paths by updating the overlay settings state to
STATE_SYSTEM_UPDATE_UNINSTALL.

This allows overlays to be re-propagated to the newly enabled,
previously system PackageSetting once onPackageReplaced is invoked,
to bring its state up to the latest known by OMS.

This also fixes a bug with Watchable tracking in PackageUserStateImpl,
which was causing overlay path updates to not propagate to the snapshot.
User states are shared between copied PackageSettings, which is probably
worth fixing, but that means their parent Watchable references can be
out of date if they reference the pre-copy PackageSetting.

This attempts to fix that in 2 places, during commit and during copy,
until a better solution can be designed.

Bug: 197759786

Test: Install app update to a system app, then run
    adb shell pm uninstall-system-updates com.example.app,
    adb shell dumpsys package com.example.app | grep -A 5 "overlay paths:"
Test: atest OverlayManagerServiceImplTests

Change-Id: Ibccafcf7b3dc9b584f412a92a233048d2a8ae592
parent 9dc94dcd
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