Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 560e494f authored by Ats Jenk's avatar Ats Jenk
Browse files

Hide overview actions when desktop is focused

Use same logic for desktop as split screen is using. If focused task is
the desktop task, hide overview actions.

Bug: 269658609
Test: Enable desktop proto 2, have some apps on desktop, focus on a
  fullscreen app, open overview, observe actions visible
Test: have some apps on desktop, open desktop, open overview, observe
  actions are not visible
Test: open two apps in split screen, go to overview, observe no actions
  visible
Change-Id: I7de28ea7af93b58379bb539c5a1b1bcbf6d13b83
parent 9769b284
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -56,7 +56,8 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo
            HIDDEN_NO_RECENTS,
            HIDDEN_SPLIT_SCREEN,
            HIDDEN_SPLIT_SELECT_ACTIVE,
            HIDDEN_ACTIONS_IN_MENU
            HIDDEN_ACTIONS_IN_MENU,
            HIDDEN_DESKTOP
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface ActionsHiddenFlags { }
@@ -67,6 +68,7 @@ public class OverviewActionsView<T extends OverlayUICallbacks> extends FrameLayo
    public static final int HIDDEN_SPLIT_SCREEN = 1 << 3;
    public static final int HIDDEN_SPLIT_SELECT_ACTIVE = 1 << 4;
    public static final int HIDDEN_ACTIONS_IN_MENU = 1 << 5;
    public static final int HIDDEN_DESKTOP = 1 << 6;

    @IntDef(flag = true, value = {
            DISABLED_SCROLLING,
+5 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ import static com.android.quickstep.views.DesktopTaskView.DESKTOP_MODE_SUPPORTED
import static com.android.quickstep.views.OverviewActionsView.FLAG_IS_NOT_TABLET;
import static com.android.quickstep.views.OverviewActionsView.FLAG_SINGLE_TASK;
import static com.android.quickstep.views.OverviewActionsView.HIDDEN_ACTIONS_IN_MENU;
import static com.android.quickstep.views.OverviewActionsView.HIDDEN_DESKTOP;
import static com.android.quickstep.views.OverviewActionsView.HIDDEN_NON_ZERO_ROTATION;
import static com.android.quickstep.views.OverviewActionsView.HIDDEN_NO_RECENTS;
import static com.android.quickstep.views.OverviewActionsView.HIDDEN_NO_TASKS;
@@ -3782,6 +3783,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
                !mActivity.getDeviceProfile().isTablet);
        mActionsView.updateSplitButtonDisabledFlags(FLAG_SINGLE_TASK,
                !FeatureFlags.ENABLE_TASKBAR_IN_OVERVIEW.get() && getTaskViewCount() <= 1);
        if (DESKTOP_MODE_SUPPORTED) {
            boolean isCurrentDesktop = getCurrentPageTaskView() instanceof DesktopTaskView;
            mActionsView.updateHiddenFlags(HIDDEN_DESKTOP, isCurrentDesktop);
        }
    }

    /**