From e0a7478fde5a9bb1a8c87dd25165a59069551307 Mon Sep 17 00:00:00 2001 From: Pat Manning Date: Wed, 14 Sep 2022 17:42:05 +0100 Subject: [PATCH] Refresh taskbar apps show on DeviceProfile change. Fix: 244269456 Test: manual Change-Id: Ie95813c77b45b03a824542a25d1349675b1825c0 --- .../android/launcher3/taskbar/TaskbarViewController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java index 992aa4bd7d..31775e2b7d 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarViewController.java @@ -100,6 +100,9 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar private int mThemeIconsColor; + private final DeviceProfile.OnDeviceProfileChangeListener mDeviceProfileChangeListener = + dp -> commitRunningAppsToUI(); + public TaskbarViewController(TaskbarActivityContext activity, TaskbarView taskbarView) { mActivity = activity; mTaskbarView = taskbarView; @@ -127,10 +130,13 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar controllers.navbarButtonsViewController.getTaskbarNavButtonTranslationY(); mTaskbarNavButtonTranslationYForInAppDisplay = controllers.navbarButtonsViewController .getTaskbarNavButtonTranslationYForInAppDisplay(); + + mActivity.addOnDeviceProfileChangeListener(mDeviceProfileChangeListener); } public void onDestroy() { LauncherAppState.getInstance(mActivity).getModel().removeCallbacks(mModelCallbacks); + mActivity.removeOnDeviceProfileChangeListener(mDeviceProfileChangeListener); mModelCallbacks.unregisterListeners(); }