Fix missing summaries
Handle non-cached tiles by doing lookup from component name. Change-Id: I979e2df2eed4a065f290c5c0e66276d08b4fb0af Fixes: 27942733
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.android.settings.dashboard;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.support.v7.widget.PopupMenu;
|
||||
@@ -96,6 +97,18 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
|
||||
recountItems();
|
||||
}
|
||||
|
||||
public Tile getTile(ComponentName component) {
|
||||
for (int i = 0; i < mCategories.size(); i++) {
|
||||
for (int j = 0; j < mCategories.get(i).tiles.size(); j++) {
|
||||
Tile tile = mCategories.get(i).tiles.get(j);
|
||||
if (component.equals(tile.intent.getComponent())) {
|
||||
return tile;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setCategories(List<DashboardCategory> categories) {
|
||||
mCategories = categories;
|
||||
|
||||
|
Reference in New Issue
Block a user