Use DashboardFeatureProvider to load homepage tiles.

Adding support to homepage category.

Test: SettingsRoboTests for regression. Will write tests for new feature
soon once we are set on the data structure.
Bug: 31781480

Change-Id: I25fa367fecb643f17e23f0182df7585bf1fcdd02
This commit is contained in:
Fan Zhang
2016-09-27 17:51:11 -07:00
parent 43d4c41c8b
commit a96a2d8d60
9 changed files with 185 additions and 39 deletions

View File

@@ -15,12 +15,27 @@
*/
package com.android.settings.dashboard;
import android.content.Context;
import com.android.settingslib.drawer.DashboardCategory;
import java.util.List;
/**
* FeatureProvider for dashboard (aka settings homepage).
*/
public interface DashboardFeatureProvider {
boolean shouldUseNewIALayout(Context context);
/**
* Whether or not this feature is enabled.
*/
boolean isEnabled();
/**
* Get tiles (wrapped in {@link DashboardCategory}) for homepage.
*/
DashboardCategory getTilesForHomepage();
/**
* Get all tiles, grouped by category.
*/
List<DashboardCategory> getAllCategories();
}