[Multi-user] Change Backup Settings page to support multi-user.

With multi-user backup, backup will be available or secondary users and profiles too.

1. When there are profile users, this CL changes UI flow A to B
A. Settings Homepage -> System -> Google Backup Settings for primary user
to
B. Settings Homepage -> System -> Profile Select Dialog -> Google Backup Settings for chosen profile.
Change done as per https://g3doc.corp.google.com/company/teams/apps-android-settings/howto/ia.md?cl=head
2. Functionality remains the same when there are no profiles (BackupSettingsHelper, BackupSettingsContentProvider)
3.  Also, enabled Backup Settings for secondary users. (Previously, backup settings were only shown for
system user).(SettingsGateway)

Bug: 121198738

Test: 1) System -> Backup -> shows Profile Select Dialog -> Backup page for selected profile
2) On secondary user without profile, System -> Backup (with summary) -> Backup page for secondary user.

Change-Id: I6e21279978a5dfc6eca6f5a34bbfc15a34eac68b
This commit is contained in:
Chandan Nath
2019-01-28 21:15:13 +00:00
parent d3be363004
commit 0bfef63812
13 changed files with 179 additions and 249 deletions

View File

@@ -68,7 +68,7 @@ public class BackupSettingsFragment extends DashboardFragment {
return controllers;
}
// The intention is to index {@link BackupSettingsActivity} instead of the fragments,
// The intention is to index {@link UserBackupSettingsActivity} instead of the fragments,
// therefore leaving this index provider empty.
public static final Indexable.SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
new BaseSearchIndexProvider() {