Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df28f0a1 authored by Fan Zhang's avatar Fan Zhang Committed by Android (Google) Code Review
Browse files

Merge "Do not throw exception when there is no tile for category."

parents 9643fa4a 45c891b7
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -59,11 +59,7 @@ public class CategoryManager {
    public synchronized DashboardCategory getTilesByCategory(Context context, String categoryKey) {
    public synchronized DashboardCategory getTilesByCategory(Context context, String categoryKey) {
        tryInitCategories(context);
        tryInitCategories(context);


        final DashboardCategory category = mCategoryByKeyMap.get(categoryKey);
        return mCategoryByKeyMap.get(categoryKey);
        if (category == null) {
            throw new IllegalStateException("Can't find category with key " + categoryKey);
        }
        return category;
    }
    }


    public synchronized List<DashboardCategory> getCategories(Context context) {
    public synchronized List<DashboardCategory> getCategories(Context context) {