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

Commit dc05136f authored by Haoran Zhang's avatar Haoran Zhang Committed by Android (Google) Code Review
Browse files

Merge "[Autofill Framework] Change fill_fields_from_current_session_only from...

Merge "[Autofill Framework] Change fill_fields_from_current_session_only from aconfig flag to device config flag" into main
parents ae60a4da 6033b0b0
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -255,6 +255,17 @@ public class AutofillFeatureFlags {
    public static final String DEVICE_CONFIG_IGNORE_RELAYOUT_WHEN_AUTH_PENDING =
            "ignore_relayout_auth_pending";

    /**
     * Bugfix flag, Autofill should only fill in value from current session.
     *
     * See frameworks/base/services/autofill/bugfixes.aconfig#fill_fields_from_current_session_only
     * for more information
     *
     * @hide
     */
    public static final String DEVICE_CONFIG_FILL_FIELDS_FROM_CURRENT_SESSION_ONLY =
            "fill_fields_from_current_session_only";

    // END AUTOFILL FOR ALL APPS FLAGS //


@@ -532,6 +543,14 @@ public class AutofillFeatureFlags {
                false);
    }

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

    /**
     * Whether should enable multi-line filter
     *
+3 −1
Original line number Diff line number Diff line
@@ -363,6 +363,7 @@ public final class AutofillManagerService
                case AutofillFeatureFlags.DEVICE_CONFIG_AUTOFILL_PCC_FEATURE_PROVIDER_HINTS:
                case AutofillFeatureFlags.DEVICE_CONFIG_PREFER_PROVIDER_OVER_PCC:
                case AutofillFeatureFlags.DEVICE_CONFIG_PCC_USE_FALLBACK:
                case AutofillFeatureFlags.DEVICE_CONFIG_FILL_FIELDS_FROM_CURRENT_SESSION_ONLY:
                case Flags.FLAG_AUTOFILL_CREDMAN_INTEGRATION:
                    setDeviceConfigProperties();
                    break;
@@ -710,7 +711,8 @@ public final class AutofillManagerService
                    AutofillFeatureFlags.DEVICE_CONFIG_MAX_INPUT_LENGTH_FOR_AUTOFILL,
                    AutofillFeatureFlags.DEFAULT_MAX_INPUT_LENGTH_FOR_AUTOFILL);
            mAutofillCredmanIntegrationEnabled = Flags.autofillCredmanIntegration();
            mIsFillFieldsFromCurrentSessionOnly = Flags.fillFieldsFromCurrentSessionOnly();
            mIsFillFieldsFromCurrentSessionOnly = AutofillFeatureFlags
                    .shouldFillFieldsFromCurrentSessionOnly();
            if (verbose) {
                Slog.v(mTag, "setDeviceConfigProperties() for PCC: "
                        + "mPccClassificationEnabled=" + mPccClassificationEnabled