Apply pending AppInfo on Activity override change

When the activity override configuration changes, we need to apply any
pending application info changes so that when the activity is
recreated, it will have updated overlays.

Bug: 193256671
Test: change live wallpaper and observe launcher colors
Change-Id: I6b8c25a6e6756f612a0f57c921625bc58ac1ecf6
This commit is contained in:
Ryan Mitchell
2021-07-12 13:06:25 -07:00
parent 82549387c0
commit 290e51fce3

View File

@@ -1158,9 +1158,15 @@ public class ResourcesManager {
} else {
activityResources.overrideConfig.unset();
}
// Update the Activity's override display id.
activityResources.overrideDisplayId = displayId;
// If a application info update was scheduled to occur in this process but has not
// occurred yet, apply it now so the resources objects will have updated paths if
// the assets sequence changed.
applyAllPendingAppInfoUpdates();
if (DEBUG) {
Throwable here = new Throwable();
here.fillInStackTrace();