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

Commit bbe9ca61 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias
Browse files

Cleanup ENABLE_TASKBAR_POPUP_MENU

Flag: ENABLE_TASKBAR_POPUP_MENU
Fixes: 270392477
Test: opened a popup menu from the taskbar
Change-Id: I779e5410163aa1c9042d2fe128e0c528d168a964
parent 296f8776
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
import com.android.launcher3.accessibility.DragViewStateAnnouncer;
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.dragndrop.DragController;
import com.android.launcher3.dragndrop.DragDriver;
import com.android.launcher3.dragndrop.DragOptions;
@@ -188,13 +187,11 @@ public class TaskbarDragController extends DragController<BaseTaskbarContext> im

        DragOptions dragOptions = new DragOptions();
        dragOptions.preDragCondition = null;
        if (FeatureFlags.ENABLE_TASKBAR_POPUP_MENU.get()) {
        PopupContainerWithArrow<BaseTaskbarContext> popupContainer =
                mControllers.taskbarPopupController.showForIcon(btv);
        if (popupContainer != null) {
            dragOptions.preDragCondition = popupContainer.createPreDragCondition(false);
        }
        }
        if (dragOptions.preDragCondition == null) {
            dragOptions.preDragCondition = new DragOptions.PreDragCondition() {
                private DragView mDragView;
@@ -208,8 +205,7 @@ public class TaskbarDragController extends DragController<BaseTaskbarContext> im
                public void onPreDragStart(DropTarget.DragObject dragObject) {
                    mDragView = dragObject.dragView;

                    if (FeatureFlags.ENABLE_TASKBAR_POPUP_MENU.get()
                            && !shouldStartDrag(0)) {
                    if (!shouldStartDrag(0)) {
                        mDragView.setOnAnimationEndCallback(() -> {
                            // Drag might be cancelled during the DragView animation, so check
                            // mIsPreDrag again.
+1 −2
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ import com.android.launcher3.BubbleTextView;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
import com.android.launcher3.accessibility.BaseAccessibilityDelegate;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.logging.StatsLogManager;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
@@ -75,7 +74,7 @@ public class TaskbarShortcutMenuAccessibilityDelegate

    @Override
    protected void getSupportedActions(View host, ItemInfo item, List<LauncherAction> out) {
        if (ShortcutUtil.supportsShortcuts(item) && FeatureFlags.ENABLE_TASKBAR_POPUP_MENU.get()) {
        if (ShortcutUtil.supportsShortcuts(item)) {
            out.add(mActions.get(NotificationListener.getInstanceIfConnected() != null
                    ? SHORTCUTS_AND_NOTIFICATIONS : DEEP_SHORTCUTS));
        }
+0 −4
Original line number Diff line number Diff line
@@ -177,10 +177,6 @@ public final class FeatureFlags {
            "ENABLE_MINIMAL_DEVICE", DISABLED,
            "Allow user to toggle minimal device mode in launcher.");

    public static final BooleanFlag ENABLE_TASKBAR_POPUP_MENU = getDebugFlag(270392477,
            "ENABLE_TASKBAR_POPUP_MENU", ENABLED,
            "Enables long pressing taskbar icons to show the popup menu.");

    public static final BooleanFlag ENABLE_TWO_PANEL_HOME = getDebugFlag(270392643,
            "ENABLE_TWO_PANEL_HOME", ENABLED,
            "Uses two panel on home screen. Only applicable on large screen devices.");