From 9459f3101fdf6f43c8998eea03a71df1a7434d13 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Mon, 15 Jun 2020 13:30:20 -0500 Subject: [PATCH] Don't reset RecentsView in onIdpChanged() Resetting unloads visible task data and thus will leave recents blank if overview state is enabled. Instead, unload and reload visible task data to take new icon shape into account. (The reason we're getting onIdpChanged() on nav bar mode change is because the change in nav bar height causes the computed icon size to change very slightly.) Also fix InvariantDeviceProfile copy constructor by copying iconBitmapSize. Test: - Change between 0 button and 3 button nav modes, verify recents doesn't appear blank - Change icon shape in Styles and Wallpapers and go to recents, verify icon shape is reflected in task icons Bug: 156354328 Change-Id: Ife29f51e85814ff483d055005fa2645135d5ec3d --- .../src/com/android/quickstep/views/RecentsView.java | 3 ++- src/com/android/launcher3/InvariantDeviceProfile.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java index f27bedb8d4..f0055b1fa7 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java @@ -487,7 +487,8 @@ public abstract class RecentsView extends PagedView impl return; } mModel.getIconCache().clear(); - reset(); + unloadVisibleTaskData(); + loadVisibleTaskData(); } public void init(OverviewActionsView actionsView) { diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java index 60abc66b2b..e39e89c038 100644 --- a/src/com/android/launcher3/InvariantDeviceProfile.java +++ b/src/com/android/launcher3/InvariantDeviceProfile.java @@ -148,6 +148,7 @@ public class InvariantDeviceProfile { iconSize = p.iconSize; iconShapePath = p.iconShapePath; landscapeIconSize = p.landscapeIconSize; + iconBitmapSize = p.iconBitmapSize; iconTextSize = p.iconTextSize; numHotseatIcons = p.numHotseatIcons; numAllAppsColumns = p.numAllAppsColumns;