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

Commit 7b05e435 authored by Tim Yu's avatar Tim Yu Committed by Android (Google) Code Review
Browse files

Merge "[Autofill] Migrate aconfig flag" into main

parents d537d6d7 d7177c27
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -233,6 +233,17 @@ public class AutofillFeatureFlags {
    public static final String DEVICE_CONFIG_INCLUDE_INVISIBLE_VIEW_GROUP_IN_ASSIST_STRUCTURE =
            "include_invisible_view_group_in_assist_structure";

    /**
     * Bugfix flag, Autofill should ignore views resetting to empty states.
     *
     * See frameworks/base/services/autofill/bugfixes.aconfig#ignore_view_state_reset_to_empty
     * for more information.
     *
     * @hide
     */
    public static final String DEVICE_CONFIG_IGNORE_VIEW_STATE_RESET_TO_EMPTY =
            "ignore_view_state_reset_to_empty";

    // END AUTOFILL FOR ALL APPS FLAGS //


@@ -494,6 +505,14 @@ public class AutofillFeatureFlags {
                false);
    }

    /** @hide */
    public static boolean shouldIgnoreViewStateResetToEmpty() {
        return DeviceConfig.getBoolean(
                DeviceConfig.NAMESPACE_AUTOFILL,
                DEVICE_CONFIG_IGNORE_VIEW_STATE_RESET_TO_EMPTY,
                false);
    }

    /**
     * Whether should enable multi-line filter
     *
+2 −1
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@ import android.util.SparseArray;
import android.util.TimeUtils;
import android.view.KeyEvent;
import android.view.autofill.AutofillId;
import android.view.autofill.AutofillFeatureFlags;
import android.view.autofill.AutofillManager;
import android.view.autofill.AutofillManager.AutofillCommitReason;
import android.view.autofill.AutofillManager.SmartSuggestionMode;
@@ -1498,7 +1499,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
        mSessionCommittedEventLogger.maybeSetComponentPackageUid(uid);
        mSaveEventLogger = SaveEventLogger.forSessionId(sessionId);
        mIsPrimaryCredential = isPrimaryCredential;
        mIgnoreViewStateResetToEmpty = Flags.ignoreViewStateResetToEmpty();
        mIgnoreViewStateResetToEmpty = AutofillFeatureFlags.shouldIgnoreViewStateResetToEmpty();

        synchronized (mLock) {
            mSessionFlags = new SessionFlags();