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

Commit 27d3c595 authored by Andy Wickham's avatar Andy Wickham
Browse files

Makes all ArrowPopups AccessibilityTargets.

This currently includes the menu that pops up when
long pressing an app icon in Launcher or Search, or
long pressing Smartspace. Previously, only the menu
for Launcher apps grabbed accessibility focus after
the open animation completed, and now all three do.

Fixes: 145253300
Change-Id: I147b45d38a04ab9a55eee9b5bd5551b4c7185fcf
parent 2eac20e3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.ShapeDrawable;
import android.util.AttributeSet;
import android.util.Pair;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
@@ -358,6 +359,11 @@ public abstract class ArrowPopup<T extends BaseDraggingActivity> extends Abstrac
        }
    }

    @Override
    protected Pair<View, String> getAccessibilityTarget() {
        return Pair.create(this, "");
    }

    private void animateOpen() {
        setVisibility(View.VISIBLE);

+0 −6
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.util.AttributeSet;
import android.util.Pair;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
@@ -329,11 +328,6 @@ public class PopupContainerWithArrow<T extends BaseDraggingActivity> extends Arr
                R.string.shortcuts_menu_with_notifications_description);
    }

    @Override
    protected Pair<View, String> getAccessibilityTarget() {
        return Pair.create(this, "");
    }

    @Override
    protected void getTargetObjectLocation(Rect outPos) {
        getPopupContainer().getDescendantRectRelativeToSelf(mOriginalIcon, outPos);