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

Commit 803b0f1b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Intercept the click from inline suggestion child view." into rvc-dev...

Merge "Intercept the click from inline suggestion child view." into rvc-dev am: 82a087dd am: 5b425d9d

Change-Id: Ie0bf4ffb2d8f721cc76721974d7d251b38e8e555
parents d2981414 5b425d9d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -97,6 +97,9 @@ public abstract class InlineSuggestionRenderService extends Service {
            host.setView(suggestionRoot, lp);
            suggestionRoot.setOnClickListener((v) -> {
                try {
                    if (suggestionView.hasOnClickListeners()) {
                        suggestionView.callOnClick();
                    }
                    callback.onClick();
                } catch (RemoteException e) {
                    Log.w(TAG, "RemoteException calling onClick()");
@@ -105,6 +108,9 @@ public abstract class InlineSuggestionRenderService extends Service {

            suggestionRoot.setOnLongClickListener((v) -> {
                try {
                    if (suggestionView.hasOnLongClickListeners()) {
                        suggestionView.performLongClick();
                    }
                    callback.onLongClick();
                } catch (RemoteException e) {
                    Log.w(TAG, "RemoteException calling onLongClick()");
+5 −0
Original line number Diff line number Diff line
@@ -51,6 +51,11 @@ public class InlineSuggestionRoot extends FrameLayout {
        setFocusable(false);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        return true;
    }

    @Override
    @SuppressLint("ClickableViewAccessibility")
    public boolean onTouchEvent(@NonNull MotionEvent event) {