From 290e51fce367918e80b630308481edd40255f9e6 Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Mon, 12 Jul 2021 13:06:25 -0700 Subject: 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 --- core/java/android/app/ResourcesManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/java/android/app/ResourcesManager.java b/core/java/android/app/ResourcesManager.java index 20afffc1f562..198c33e83707 100644 --- a/core/java/android/app/ResourcesManager.java +++ b/core/java/android/app/ResourcesManager.java @@ -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(); -- cgit v1.2.3-59-g8ed1b