Add handling for account tiles for specific account type.
- List individual account instead of account type under User & account screen. - Add handling to move account tiles with specific account type from top level account dashboard to inside the corresponding account preference. - Rename settings.accounts.AccountPreference to settings.accounts.AccountTypePreference to make it less confused with settings.AccountPreference Bug: 31801423 Test: make RunSettingsRoboTests Change-Id: Iebe70a3c4230e8d979344f142a5c2a60945e552e
This commit is contained in:
@@ -230,6 +230,13 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
|
||||
*/
|
||||
protected abstract List<PreferenceController> getPreferenceControllers(Context context);
|
||||
|
||||
/**
|
||||
* Returns true if this tile should be displayed
|
||||
*/
|
||||
protected boolean displayTile(Tile tile) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays resource based tiles.
|
||||
*/
|
||||
@@ -319,6 +326,9 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
|
||||
Log.d(TAG, "tile does not contain a key, skipping " + tile);
|
||||
continue;
|
||||
}
|
||||
if (!displayTile(tile)) {
|
||||
continue;
|
||||
}
|
||||
if (mDashboardTilePrefKeys.contains(key)) {
|
||||
// Have the key already, will rebind.
|
||||
final Preference preference = mProgressiveDisclosureMixin.findPreference(
|
||||
|
Reference in New Issue
Block a user