diff --git a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java index f6e0426fd4..0ab775694a 100644 --- a/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java @@ -37,6 +37,7 @@ import android.animation.ObjectAnimator; import android.annotation.DrawableRes; import android.annotation.IdRes; import android.annotation.LayoutRes; +import android.content.pm.ActivityInfo.Config; import android.content.res.ColorStateList; import android.graphics.Rect; import android.graphics.Region; @@ -445,6 +446,12 @@ public class NavbarButtonsViewController { return mFloatingRotationButtonBounds.contains((int) ev.getX(), (int) ev.getY()); } + public void onConfigurationChanged(@Config int configChanges) { + if (mFloatingRotationButton != null) { + mFloatingRotationButton.onConfigurationChanged(configChanges); + } + } + public void onDestroy() { mPropertyHolders.clear(); mControllers.rotationButtonController.unregisterListeners(); diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java index 2e1e5bb058..cb9d4a4374 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java @@ -30,6 +30,7 @@ import android.app.ActivityOptions; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; +import android.content.pm.ActivityInfo.Config; import android.content.pm.LauncherApps; import android.graphics.Insets; import android.graphics.PixelFormat; @@ -205,6 +206,10 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ mWindowManager.addView(mDragLayer, mWindowLayoutParams); } + public void onConfigurationChanged(@Config int configChanges) { + mControllers.onConfigurationChanged(configChanges); + } + public boolean isThreeButtonNav() { return mNavMode == Mode.THREE_BUTTONS; } diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java index 2d4942d058..c43fbf9b20 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java @@ -15,6 +15,8 @@ */ package com.android.launcher3.taskbar; +import android.content.pm.ActivityInfo.Config; + import androidx.annotation.NonNull; import com.android.systemui.shared.rotation.RotationButtonController; @@ -108,6 +110,10 @@ public class TaskbarControllers { mPostInitCallbacks.clear(); } + public void onConfigurationChanged(@Config int configChanges) { + navbarButtonsViewController.onConfigurationChanged(configChanges); + } + /** * Cleans up all controllers. */ diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java index a65cc563db..56e9429120 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java @@ -106,6 +106,11 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen if ((configDiff & configsRequiringRecreate) != 0) { // Color has changed, recreate taskbar to reload background color & icons. recreateTaskbar(); + } else { + // Config change might be handled without re-creating the taskbar + if (mTaskbarActivityContext != null) { + mTaskbarActivityContext.onConfigurationChanged(configDiff); + } } mOldConfig = newConfig; }