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

Commit 6e8eb34f authored by Riley Jones's avatar Riley Jones Committed by Android (Google) Code Review
Browse files

Merge "Flag cleanup for floating_menu_remove_fullscreen_taps" into main

parents eb47748c a1c72c75
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -17,16 +17,6 @@ flag {
    bug: "281140482"
}

flag {
    name: "floating_menu_remove_fullscreen_taps"
    namespace: "accessibility"
    description: "Stops MenuViewLayer from taking some inputs by making it unclickable."
    bug: "411287116"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "redesign_magnification_window_size"
    namespace: "accessibility"
+7 −18
Original line number Diff line number Diff line
@@ -195,14 +195,12 @@ class MenuViewLayer extends FrameLayout implements

        @Override
        public void onAnimationRepeat(Animation animation) {
            if (Flags.floatingMenuRemoveFullscreenTaps()) {
            mIsDockDemoDocked = !mIsDockDemoDocked;
            // Only stop animation once MenuView has looped back to its normal position.
            if (!mShouldLoopDockDemo && !mIsDockDemoDocked) {
                mMenuView.clearAnimation();
            }
        }
        }
    };

    MenuViewLayer(@NonNull Context context, WindowManager windowManager,
@@ -357,9 +355,6 @@ class MenuViewLayer extends FrameLayout implements
        super.onAttachedToWindow();

        mMenuView.show();
        if (!Flags.floatingMenuRemoveFullscreenTaps()) {
            setOnClickListener(this);
        }
        setOnApplyWindowInsetsListener((view, insets) -> onWindowInsetsApplied(insets));
        getViewTreeObserver().addOnComputeInternalInsetsListener(this);
        mMenuViewModel.getDockTooltipVisibilityData().observeForever(mDockTooltipObserver);
@@ -479,10 +474,8 @@ class MenuViewLayer extends FrameLayout implements
    void dispatchTooltipTuckAnimation() {
        Animation animation =
                mMenuAnimationController.startTuckedAnimationPreview();
        if (Flags.floatingMenuRemoveFullscreenTaps()) {
        animation.setAnimationListener(mTuckDemoListener);
    }
    }

    void dispatchAccessibilityAction(int id) {
        if (id == R.id.action_remove_menu) {
@@ -560,10 +553,8 @@ class MenuViewLayer extends FrameLayout implements

        mMenuListViewTouchHandler.setOnActionDownEndListener(
                () -> mEduTooltipView.ifPresent(this::removeTooltip));
        if (Flags.floatingMenuRemoveFullscreenTaps()) {
        setOnClickListener(this);
    }
    }

    private void removeTooltip(View tooltipView) {
        if (tooltipView.getTag().equals(TooltipType.MIGRATION)) {
@@ -582,10 +573,8 @@ class MenuViewLayer extends FrameLayout implements
        mMenuListViewTouchHandler.setOnActionDownEndListener(null);
        mEduTooltipView = Optional.empty();

        if (Flags.floatingMenuRemoveFullscreenTaps()) {
        setClickable(false);
    }
    }

    @VisibleForTesting
    void hideMenuAndShowMessage() {