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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user