[CD Taskbar] Move DisplayController method calls to BaseTaskbarContext

To ensure consistent, controllable Taskbar in Connected Displays Behavior, move all independent calls to the singleton DisplayController's various methods into one place in BaseTaskbarContext, where we have access to the parent context and can override default behaviors of these methods throughout taskbar if in external display.

Flag: EXEMPT not adding new behavior
Bug: 401553128
Test: m
Change-Id: If9efc0cfc18bac3ee75bb64bf5280ea979d1faa2
This commit is contained in:
Sukesh Ram
2025-03-14 04:20:30 -07:00
parent 3a4595c207
commit 16e04e84eb
12 changed files with 138 additions and 55 deletions
@@ -86,7 +86,6 @@ import com.android.launcher3.taskbar.bubbles.BubbleBarController;
import com.android.launcher3.taskbar.bubbles.BubbleControllers;
import com.android.launcher3.taskbar.customization.TaskbarAllAppsButtonContainer;
import com.android.launcher3.taskbar.customization.TaskbarDividerContainer;
import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.ItemInfoMatcher;
import com.android.launcher3.util.LauncherBindableItemsContainer;
import com.android.launcher3.util.MultiPropertyFactory;
@@ -930,7 +929,9 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
private AnimatorPlaybackController createIconAlignmentController(DeviceProfile launcherDp) {
PendingAnimation setter = new PendingAnimation(100);
// icon alignment not needed for pinned taskbar.
if (DisplayController.isPinnedTaskbar(mActivity)) return setter.createPlaybackController();
if (mActivity.isPinnedTaskbar()) {
return setter.createPlaybackController();
}
mOnControllerPreCreateCallback.run();
DeviceProfile taskbarDp = mActivity.getDeviceProfile();
Rect hotseatPadding = launcherDp.getHotseatLayoutPadding(mActivity);