WallpaperPicker2: Don't publish placeholder categories
Publishing a placeholder category causes the real category to never
appear, even after it's done loading.
Change-Id: If14630ed4a98f843f7c310984380e919776d6827
diff --git a/src/com/android/wallpaper/module/DefaultCategoryProvider.java b/src/com/android/wallpaper/module/DefaultCategoryProvider.java
index 4c7c8dd..179fc32 100755
--- a/src/com/android/wallpaper/module/DefaultCategoryProvider.java
+++ b/src/com/android/wallpaper/module/DefaultCategoryProvider.java
@@ -336,7 +336,6 @@
Xml.asAttributeSet(parser));
categoryBuilder.setPriorityIfEmpty(PRIORITY_SYSTEM + priorityTracker++);
final int categoryDepth = parser.getDepth();
- boolean publishedPlaceholder = false;
while (((type = parser.next()) != XmlPullParser.END_TAG
|| parser.getDepth() > categoryDepth)
&& type != XmlPullParser.END_DOCUMENT) {
@@ -354,11 +353,6 @@
}
if (wallpaper != null) {
categoryBuilder.addWallpaper(wallpaper);
- // Publish progress only if there's at least one wallpaper
- if (!publishedPlaceholder) {
- publishProgress(categoryBuilder.buildPlaceholder());
- publishedPlaceholder = true;
- }
}
}
}