Rearrange a few settings into System category page.
- Use activity-alias to define which activity shows up in what category. We choose activity-alias because it creates a reference to UI we need without having to define a new set of intent-filter and/or category keys. This reduces maintainence in the long run. We should merge metadata from activity-alias into targetActivity when cleaning up. - Created new System dashboard activity that hosts all system category tiles dynamically, and a static tile for checking system update. Bug: 31781480 Test: manual Test: make RunSettingsRoboTests -j40 Change-Id: Ia2d762e3e1aebd17423a395c5e6c286dc3326492
This commit is contained in:
@@ -21,6 +21,7 @@ import android.content.Context;
|
||||
import com.android.settingslib.drawer.CategoryKey;
|
||||
import com.android.settingslib.drawer.CategoryManager;
|
||||
import com.android.settingslib.drawer.DashboardCategory;
|
||||
import com.android.settingslib.drawer.Tile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -48,8 +49,18 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
|
||||
return mCategoryManager.getTilesByCategory(mContext, CategoryKey.CATEGORY_HOMEPAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DashboardCategory getTilesForSystemCategory() {
|
||||
return mCategoryManager.getTilesByCategory(mContext, CategoryKey.CATEGORY_SYSTEM);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DashboardCategory> getAllCategories() {
|
||||
return mCategoryManager.getCategories(mContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPriorityGroup(Tile tile) {
|
||||
return tile.priority / 100;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user