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

Commit 307af3b7 authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Merge "Always set FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE on SaveInfo when on compat mode." into pi-dev

am: 0cdac33f

Change-Id: Ic974a584f3e71e4bb618b9e2f1b83121ca327071
parents 7fac4617 0cdac33f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -527,6 +527,9 @@ import android.view.autofill.AutofillValue;
 * <pre> &lt;autofill-service xmlns:android="http://schemas.android.com/apk/res/android"&gt;
 *     &lt;compatibility-package android:name="foo.bar.baz" android:maxLongVersionCode="1000000000"/&gt;
 * &lt;/autofill-service&gt;</pre>
 *
 * <p>When using compatibility mode, the {@link SaveInfo.Builder#setFlags(int) SaveInfo flags}
 * automatically include {@link SaveInfo#FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE}.
 */
public abstract class AutofillService extends Service {
    private static final String TAG = "AutofillService";
+5 −2
Original line number Diff line number Diff line
@@ -2077,8 +2077,11 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
            if (saveTriggerId != null) {
                writeLog(MetricsEvent.AUTOFILL_EXPLICIT_SAVE_TRIGGER_DEFINITION);
            }
            saveOnAllViewsInvisible =
                    (saveInfo.getFlags() & SaveInfo.FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE) != 0;
            int flags = saveInfo.getFlags();
            if (mCompatMode) {
                flags |= SaveInfo.FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE;
            }
            saveOnAllViewsInvisible = (flags & SaveInfo.FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE) != 0;

            // We only need to track views if we want to save once they become invisible.
            if (saveOnAllViewsInvisible) {