Merge "[CD Taskbar] Move DisplayController method calls to BaseTaskbarContext" into main

This commit is contained in:
Treehugger Robot authored and Android (Google) Code Review committed 2025-03-17 12:11:06 -07:00
commit ab933e6098
12 files changed
+138 -55

No files matched your search

@@ -417,9 +417,41 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
dispatchDeviceProfileChanged();
}
/** Returns whether current taskbar is transient. */
@Override
public boolean isTransientTaskbar() {
return super.isTransientTaskbar() && !isPhoneMode();
return DisplayController.isTransientTaskbar(this) && mIsPrimaryDisplay && !isPhoneMode();
}
@Override
public boolean isPinnedTaskbar() {
return DisplayController.isPinnedTaskbar(this);
}
@Override
public NavigationMode getNavigationMode() {
return isPrimaryDisplay() ? DisplayController.getNavigationMode(this)
: NavigationMode.THREE_BUTTONS;
}
@Override
public boolean isInDesktopMode() {
return mControllers != null
&& mControllers.taskbarDesktopModeController.isInDesktopMode(getDisplayId());
}
@Override
public boolean showLockedTaskbarOnHome() {
return DisplayController.showLockedTaskbarOnHome(this);
}
@Override
public boolean showDesktopTaskbarForFreeformDisplay() {
return DisplayController.showDesktopTaskbarForFreeformDisplay(this);
}
@Override
public boolean isPrimaryDisplay() {
return mIsPrimaryDisplay;
}
/**
@@ -455,9 +487,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
.setIsTransientTaskbar(true)
.build();
}
mNavMode = (DesktopExperienceFlags.ENABLE_TASKBAR_CONNECTED_DISPLAYS.isTrue()
&& !mIsPrimaryDisplay) ? NavigationMode.THREE_BUTTONS
: DisplayController.getNavigationMode(this);
mNavMode = getNavigationMode();
}
/** Called when the visibility of the bubble bar changed. */
@@ -1426,11 +1456,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
mControllers.uiController.startSplitSelection(splitSelectSource);
}
boolean isInDesktopMode() {
return mControllers != null
&& mControllers.taskbarDesktopModeController.isInDesktopMode(getDisplayId());
}
protected void onTaskbarIconClicked(View view) {
TaskbarUIController taskbarUIController = mControllers.uiController;
RecentsView recents = taskbarUIController.getRecentsView();