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

Commit dfbf253f authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Remove A11y node info for SplitInstructionsView

* Individual text view and cancel button still
have their own a11y actions, but top level
view doesn't need one

Test: Tested w/ switches to ensure parent view
doesn't get selected. Tested w/ Talkback to
ensure we can still cancel through talkback
Fixes: 323462927

Change-Id: I60d21f6e768c59f29f51007f56ff784821487895
parent 0b32b7a9
Loading
Loading
Loading
Loading
+0 −28
Original line number Diff line number Diff line
@@ -21,11 +21,9 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.os.Bundle;
import android.util.AttributeSet;
import android.util.FloatProperty;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.LinearLayout;
import android.widget.TextView;

@@ -141,32 +139,6 @@ public class SplitInstructionsView extends LinearLayout {
        mLauncher.getStateManager().goToState(LauncherState.NORMAL);
    }

    @Override
    public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
        super.onInitializeAccessibilityNodeInfo(info);
        if (!FeatureFlags.enableSplitContextually()) {
            return;
        }

        info.addAction(new AccessibilityNodeInfo.AccessibilityAction(
                R.string.toast_split_select_cont_desc,
                getResources().getString(R.string.toast_split_select_cont_desc)
        ));
    }

    @Override
    public boolean performAccessibilityAction(int action, Bundle arguments) {
        if (!FeatureFlags.enableSplitContextually()) {
            return super.performAccessibilityAction(action, arguments);
        }

        if (action == R.string.toast_split_select_cont_desc) {
            exitSplitSelection();
            return true;
        }
        return super.performAccessibilityAction(action, arguments);
    }

    void ensureProperRotation() {
        ((RecentsView) mLauncher.getOverviewPanel()).getPagedOrientationHandler()
                .setSplitInstructionsParams(