Merge Autofill settings into Account settings.

Autofill settings are removed from Language and Input.

They are now in a new top-level Passwords and Accounts page.

Some polish work is left to match the new design.

Bug: 169455298
Test: manual - check settings page and some search keywords
Test: manual - add work profile and check the above again
Test: make RunSettingsRoboTests
Change-Id: I3981ce73fef63f06a40e61e894481d24284614ba
This commit is contained in:
Ahaan Ugale
2021-03-22 19:00:06 -07:00
parent 2160d5fc4c
commit 9b183778f2
12 changed files with 169 additions and 191 deletions

View File

@@ -18,6 +18,8 @@ package com.android.settings.accounts;
import static android.provider.Settings.EXTRA_AUTHORITIES;
import static com.android.settings.accounts.AccountDashboardFragment.buildAutofillPreferenceControllers;
import android.app.settings.SettingsEnums;
import android.content.Context;
@@ -61,14 +63,16 @@ public class AccountWorkProfileDashboardFragment extends DashboardFragment {
@Override
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
buildAutofillPreferenceControllers(context, controllers);
final String[] authorities = getIntent().getStringArrayExtra(EXTRA_AUTHORITIES);
return buildPreferenceControllers(context, this /* parent */, authorities);
buildAccountPreferenceControllers(context, this /* parent */, authorities, controllers);
return controllers;
}
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
SettingsPreferenceFragment parent, String[] authorities) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
private static void buildAccountPreferenceControllers(
Context context, SettingsPreferenceFragment parent, String[] authorities,
List<AbstractPreferenceController> controllers) {
final AccountPreferenceController accountPrefController =
new AccountPreferenceController(context, parent, authorities,
ProfileSelectFragment.ProfileType.WORK);
@@ -78,7 +82,6 @@ public class AccountWorkProfileDashboardFragment extends DashboardFragment {
controllers.add(accountPrefController);
controllers.add(new AutoSyncDataPreferenceController(context, parent));
controllers.add(new AutoSyncWorkDataPreferenceController(context, parent));
return controllers;
}
// TODO: b/141601408. After featureFlag settings_work_profile is launched, unmark this
@@ -88,6 +91,7 @@ public class AccountWorkProfileDashboardFragment extends DashboardFragment {
// @Override
// public List<AbstractPreferenceController> createPreferenceControllers(
// Context context) {
// ..Add autofill here too..
// return buildPreferenceControllers(
// context, null /* parent */, null /* authorities*/);
// }