summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-06-05 10:31:26 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-06-05 10:31:26 -0700
commitbbf595dced57bbc16633eb7d6583b1bf27a2508d (patch)
tree6fbe5e0f4837b22a6b48077e58ae99fbc70becad
parentf9426d5df0592a67c8a998d3ab445a3bb5eafc18 (diff)
parentfd39d8ee9512d873aaaa205839ca233c2be4d9d3 (diff)
downloadandroid_packages_apps_Trebuchet-bbf595dced57bbc16633eb7d6583b1bf27a2508d.tar.gz
android_packages_apps_Trebuchet-bbf595dced57bbc16633eb7d6583b1bf27a2508d.tar.bz2
android_packages_apps_Trebuchet-bbf595dced57bbc16633eb7d6583b1bf27a2508d.zip
Merge "Extending timeout workaround for updating the widget tray after we get a packages-changed broadcast. (Bug 6602951)" into jb-dev
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 3a4125510..45bb08ac9 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -547,13 +547,14 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// TODO: this isn't ideal, but we actually need to delay here. This call is triggered
// by a broadcast receiver, and in order for it to work correctly, we need to know that
// the AppWidgetService has already received and processed the same broadcast. Since there
- // is no guarantee about ordering of broadcast receipt, we just delay here. Ideally,
- // we should have a more precise way of ensuring the AppWidgetService is up to date.
+ // is no guarantee about ordering of broadcast receipt, we just delay here. This is a
+ // workaround until we add a callback from AppWidgetService to AppWidgetHost when widget
+ // packages are added, updated or removed.
postDelayed(new Runnable() {
public void run() {
updatePackages();
}
- }, 500);
+ }, 1500);
}
public void updatePackages() {
@@ -574,6 +575,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
if (minSpanX <= LauncherModel.getCellCountX() &&
minSpanY <= LauncherModel.getCellCountY()) {
mWidgets.add(widget);
+ } else {
+ Log.e(TAG, "Widget " + widget.provider + " can not fit on this device (" +
+ widget.minWidth + ", " + widget.minHeight + ")");
}
} else {
Log.e(TAG, "Widget " + widget.provider + " has invalid dimensions (" +