Add tablayout for work/personal profile

- Add Tablayout in ProfileSelectFragment
- Add AccountWorkProfileDashboardFragment inherited from
ProfileSelectFragment
- Add ProfileFragmentBridge to convert AccountDashboardFragment
to AccountProfileSelectFragment
- Use flag settings_work_profile to guard the new fragment

Bug: 141601408
Test: Settings->developer options->feature flags->
turn settings_work_profile on/off, then go to settings->account
to see if UI is changed.

Change-Id: Ifb32c22cdeab69c51517664081cacf4a401c46a1
This commit is contained in:
Raff Tsai
2019-10-05 09:32:19 +08:00
parent a152d2bd61
commit 65866290ce
13 changed files with 572 additions and 33 deletions

View File

@@ -23,6 +23,7 @@ import android.content.Context;
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.users.AutoSyncDataPreferenceController;
import com.android.settings.users.AutoSyncPersonalDataPreferenceController;
@@ -70,7 +71,8 @@ public class AccountDashboardFragment extends DashboardFragment {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
final AccountPreferenceController accountPrefController =
new AccountPreferenceController(context, parent, authorities);
new AccountPreferenceController(context, parent, authorities,
ProfileSelectFragment.ALL);
if (parent != null) {
parent.getSettingsLifecycle().addObserver(accountPrefController);
}