Add test for new DashboardFragment and PreferenceController
Also added a FakeFeatureFactory to make it easier to mock different FeatureProviders. Bug: 31781480 Test: make RunSettingsRoboTests Change-Id: Ie45db601e0bec951d7ef983ec2e3ca747ec1c3af
This commit is contained in:
@@ -96,6 +96,10 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
|
||||
DashboardCategory category) {
|
||||
final Context context = getContext();
|
||||
List<Tile> tiles = category.tiles;
|
||||
if (tiles == null) {
|
||||
Log.d(TAG, "tile list is empty, skipping category " + category.title);
|
||||
return;
|
||||
}
|
||||
for (Tile tile : tiles) {
|
||||
final String key = mDashboardFeatureProvider.getDashboardKeyForTile(tile);
|
||||
if (TextUtils.isEmpty(key)) {
|
||||
|
Reference in New Issue
Block a user