Commit 65103ba6 authored by Fabio Tirelo's avatar Fabio Tirelo Committed by Commit Bot

[Autofill] Bring back isAutofillEnabled and setAutofillEnabled

The functions are still used by Clank downstream and will be removed
once only the new preferences are used by it.

TBR=mathp@chromium.org

Bug: 879384
Change-Id: Ibee61db92a2bd3cd8b4124b79fc1c0d747d401d1
Reviewed-on: https://chromium-review.googlesource.com/1198453Reviewed-by: default avatarFabio Tirelo <ftirelo@chromium.org>
Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587912}
parent 15e92a73
......@@ -908,6 +908,15 @@ public class PersonalDataManager {
return nativeHasCreditCards(mPersonalDataManagerAndroid);
}
/**
* TODO(crbug.com/879420): Remove this once Clank downstream uses isAutofillProfileEnabled and
* isAutofillCreditCardEnabled.
* @return Whether the Autofill feature is enabled.
*/
public static boolean isAutofillEnabled() {
return isAutofillProfileEnabled() && isAutofillCreditCardEnabled();
}
/**
* @return Whether the Autofill feature for Profiles (addresses) is enabled.
*/
......@@ -922,6 +931,17 @@ public class PersonalDataManager {
return nativeGetPref(Pref.AUTOFILL_CREDIT_CARD_ENABLED);
}
/**
* Enables or disables the Autofill feature.
* TODO(crbug.com/879420): Remove this once Clank downstream uses setAutofillProfileEnabled and
* setAutofillCreditCardEnabled.
* @param enable True to disable Autofill, false otherwise.
*/
public static void setAutofillEnabled(boolean enable) {
setAutofillProfileEnabled(enable);
setAutofillCreditCardEnabled(enable);
}
/**
* Enables or disables the Autofill feature for Profiles.
* @param enable True to disable profile Autofill, false otherwise.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment