Only show the frontend UI on the display if it is supported

Bug: 415367809
Test: Tested desktop mode is disabled in the pixel 9 but enabled
      in the connected display
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Change-Id: Iea257acd1a4468c9ac7d0b301fb66ab7ac59f5d7
This commit is contained in:
minch
2025-05-12 18:07:27 +00:00
parent ba7849663e
commit de7796ec33

View File

@@ -936,7 +936,8 @@ public abstract class RecentsView<
.inflate(R.layout.overview_clear_all_button, this, false);
mClearAllButton.setOnClickListener(this::dismissAllTasks);
if (DesktopModeStatus.enableMultipleDesktops(mContext)) {
if (DesktopModeStatus.isMultipleDesktopFrontendEnabledOnDisplay(mContext,
mContainer.getDisplay())) {
mAddDesktopButton = (AddDesktopButton) LayoutInflater.from(context).inflate(
R.layout.overview_add_desktop_button, this, false);
mAddDesktopButton.setOnClickListener(this::createDesk);