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

Commit 3edb5850 authored by Bernardo Rufino's avatar Bernardo Rufino
Browse files

Set text toasts as trusted overlays

So that touches can pass through them (check go/untrusted-touches) and
since those are rendered by System UI.

Test: atest WindowUntrustedTouchTest
Test: Display a text toast, click it, verify touch is not flagged.
Bug: 158002302
Change-Id: Ib75a9db5839fff031288b4b5855c49f997187cca
parent 98280037
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -129,6 +129,8 @@ public class ToastUI extends SystemUI implements CommandQueue.Callbacks {
        mCallback = callback;
        mPresenter = new ToastPresenter(context, mIAccessibilityManager, mNotificationManager,
                packageName);
        // Set as trusted overlay so touches can pass through toasts
        mPresenter.getLayoutParams().setTrustedOverlay();
        mToastLogger.logOnShowToast(uid, packageName, text.toString(), token.toString());
        mPresenter.show(mToast.getView(), token, windowToken, duration, mToast.getGravity(),
                mToast.getXOffset(), mToast.getYOffset(), mToast.getHorizontalMargin(),