summaryrefslogtreecommitdiff
path: root/libs/androidfw/ApkParsing.cpp
diff options
context:
space:
mode:
author Winson <chiuwinson@google.com> 2022-09-26 13:57:13 -0700
committer Winson <chiuwinson@google.com> 2022-11-09 14:48:06 -0800
commit61fe40c6b0dd44da4dab7d73ea6736770e3e7bec (patch)
tree3c62d511601933be55ad964c4e7c2dcf5ea5ff31 /libs/androidfw/ApkParsing.cpp
parent9dc94dcda9a43e090fc5efb541f0ffa6f9e46953 (diff)
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
Diffstat (limited to 'libs/androidfw/ApkParsing.cpp')
0 files changed, 0 insertions, 0 deletions