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

Commit 385ee539 authored by Felipe Leme's avatar Felipe Leme
Browse files

DO NOT MERGE - Disable warning on blocking one-way call from autofill server.

This behavior existed since autofill was introduced on O and it won't be fixed
on P, so there's no point on warning. In fact, the warning is often a red
herring for other issues, not to mention a big logcat spammer.

Bug: 35708678
Test: manual verification looking at logcat

Change-Id: I40be4ce25abc5b097ea67e5cb34bb9c4237f0826
parent 74cfe567
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -2237,6 +2237,22 @@ public class AssistStructure implements Parcelable {
        return mWindowNodes.get(index);
    }

    // TODO(b/35708678): temporary method that disable one-way warning flag on binder.
    /** @hide */
    public void ensureDataForAutofill() {
        if (mHaveData) {
            return;
        }
        mHaveData = true;
        Binder.allowBlocking(mReceiveChannel);
        try {
            ParcelTransferReader reader = new ParcelTransferReader(mReceiveChannel);
            reader.go();
        } finally {
            Binder.defaultBlocking(mReceiveChannel);
        }
    }

    /** @hide */
    public void ensureData() {
        if (mHaveData) {
+1 −1
Original line number Diff line number Diff line
@@ -251,7 +251,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
                // change AssistStructure so it provides a "one-way" writeToParcel() method that
                // sends all the data
                try {
                    structure.ensureData();
                    structure.ensureDataForAutofill();
                } catch (RuntimeException e) {
                    wtf(e, "Exception lazy loading assist structure for %s: %s",
                            structure.getActivityComponent(), e);