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

Commit 507bf13d authored by Felipe Leme's avatar Felipe Leme
Browse files

Don't generate VIEW_TEXT_CHANGED events when the TextView is not laid out.

Test: atest android.contentcaptureservice.cts.LoginActivityTest
Bug: 120665079

Change-Id: I148be99d20c1765271f49a8cc286235c09d031b5
parent 132b1c60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10209,7 +10209,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
        }

        // ContentCapture
        if (isImportantForContentCapture() && isTextEditable()) {
        if (isLaidOut() && isImportantForContentCapture() && isTextEditable()) {
            final ContentCaptureManager cm = mContext.getSystemService(ContentCaptureManager.class);
            if (cm != null && cm.isContentCaptureEnabled()) {
                // TODO(b/111276913): pass flags when edited by user / add CTS test