Fixing LauncherIcons leaking outside sandbox context

Since LauncherIcons was using a global static pool, a custom
instance for a test could leak into the global pool, affecting
other tests

Bug: 335280439
Test: Verified image test on device
Flag: None
Change-Id: Iedd19c8e69c928e44b65eae7eba0167b03b5df6b
This commit is contained in:
Sunny Goyal committed 2024-05-07 12:13:37 -07:00
1 parent bc549958d9
commit bf3efe8af0
3 files changed
+45 -76

No files matched your search

@@ -206,7 +206,7 @@ public class LauncherAppState implements SafeCloseable {
}
private void refreshAndReloadLauncher() {
LauncherIcons.clearPool();
LauncherIcons.clearPool(mContext);
mIconCache.updateIconParams(
mInvariantDeviceProfile.fillResIconDpi, mInvariantDeviceProfile.iconBitmapSize);
mModel.forceReload();