Add a better app filtering mechanism and filter widgets

The old one didn't use the app filter when packages
were added or updated, only in the initial load.

The app filter is now also used for appwidget providers.

Bug: 10895858
Bug: 10898990
Change-Id: Id29bbc3cf7bdb0c360edd92f768b86684bd338ed
This commit is contained in:
Bjorn Bringert
2013-10-03 22:31:03 +01:00
parent f0481bf3c9
commit 1307f63f8a
7 changed files with 64 additions and 16 deletions

View File

@@ -438,6 +438,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
for (Object o : widgetsAndShortcuts) {
if (o instanceof AppWidgetProviderInfo) {
AppWidgetProviderInfo widget = (AppWidgetProviderInfo) o;
if (!app.shouldShowAppOrWidgetProvider(widget.provider)) {
continue;
}
widget.label = widget.label.trim();
if (widget.minWidth > 0 && widget.minHeight > 0) {
// Ensure that all widgets we show can be added on a workspace of this size