AF: Show passwords settings for available autofill service.

Separates autofill preferences into 2 categories - one for the passwords
settings and one for the existing default service preference.

The passwords preference controller dynamically creates preferences for
each autofill service.

Bug: 169455298
Test: manual
Test: TODO new test for controller
Change-Id: I369b5db00be75957c869df4d960595e9e1d9772c
This commit is contained in:
Ahaan Ugale
2021-02-28 22:10:51 -08:00
parent c08943784c
commit a5571da12b
3 changed files with 118 additions and 9 deletions

View File

@@ -22,14 +22,27 @@
android:title="@string/autofill_app"
settings:keywords="@string/autofill_keywords">
<com.android.settings.widget.GearPreference
android:key="default_autofill_main"
android:title="@string/autofill_app"
android:fragment="com.android.settings.applications.defaultapps.DefaultAutofillPicker"
settings:searchable="false"
settings:keywords="@string/autofill_keywords">
<extra android:name="for_work" android:value="false" />
</com.android.settings.widget.GearPreference>
<PreferenceCategory
android:key="passwords_category"
android:persistent="false"
android:title="@string/autofill_passwords"
settings:controller="com.android.settings.applications.autofill.PasswordsPreferenceController" >
</PreferenceCategory>
<PreferenceCategory
android:key="default_service_category"
android:title="@string/autofill_app">
<!-- TODO(b/169455298): Fix the redundant title. -->
<com.android.settings.widget.GearPreference
android:key="default_autofill_main"
android:title="@string/autofill_app"
android:fragment="com.android.settings.applications.defaultapps.DefaultAutofillPicker"
settings:searchable="false"
settings:keywords="@string/autofill_keywords">
<extra android:name="for_work" android:value="false" />
</com.android.settings.widget.GearPreference>
</PreferenceCategory>
<com.android.settings.widget.WorkOnlyCategory