diff options
author | Winson Chung <winsonc@google.com> | 2012-05-24 17:49:59 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-05-24 17:49:59 -0700 |
commit | 5f74f11cc18fd75004fb39e9e0b942b222811c53 (patch) | |
tree | 62860252394ad2e9f88c5f8512afb079cf1e9b5f | |
parent | a7075f96d0cc9610c06680ea1d241f6c0a8c69ae (diff) | |
parent | 7ce9985d37e253a93617404d5991017e1ea81907 (diff) | |
download | packages_apps_trebuchet-5f74f11cc18fd75004fb39e9e0b942b222811c53.zip packages_apps_trebuchet-5f74f11cc18fd75004fb39e9e0b942b222811c53.tar.gz packages_apps_trebuchet-5f74f11cc18fd75004fb39e9e0b942b222811c53.tar.bz2 |
am 7ce9985d: Fixing issue where multiple widget pages would fail to load correctly, preventing you from adding widgets. (Bug 6556434)
* commit '7ce9985d37e253a93617404d5991017e1ea81907':
Fixing issue where multiple widget pages would fail to load correctly, preventing you from adding widgets. (Bug 6556434)
-rw-r--r-- | src/com/android/launcher2/AppsCustomizePagedView.java | 6 | ||||
-rw-r--r-- | src/com/android/launcher2/PendingAddItemInfo.java | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java index 67def17..03d2a72 100644 --- a/src/com/android/launcher2/AppsCustomizePagedView.java +++ b/src/com/android/launcher2/AppsCustomizePagedView.java @@ -974,6 +974,12 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen task.cancel(false); iter.remove(); mDirtyPageContent.set(task.page, true); + + // We've already preallocated the views for the data to load into, so clear them as well + View v = getPageAt(task.page); + if (v instanceof PagedViewGridLayout) { + ((PagedViewGridLayout) v).removeAllViewsOnPage(); + } } mDeferredSyncWidgetPageItems.clear(); } diff --git a/src/com/android/launcher2/PendingAddItemInfo.java b/src/com/android/launcher2/PendingAddItemInfo.java index eaa2e4d..9a133ed 100644 --- a/src/com/android/launcher2/PendingAddItemInfo.java +++ b/src/com/android/launcher2/PendingAddItemInfo.java @@ -39,6 +39,11 @@ class PendingAddShortcutInfo extends PendingAddItemInfo { public PendingAddShortcutInfo(ActivityInfo activityInfo) { shortcutActivityInfo = activityInfo; } + + @Override + public String toString() { + return "Shortcut: " + shortcutActivityInfo.packageName; + } } class PendingAddWidgetInfo extends PendingAddItemInfo { @@ -91,4 +96,9 @@ class PendingAddWidgetInfo extends PendingAddItemInfo { minSpanX = copy.minSpanX; minSpanY = copy.minSpanY; } + + @Override + public String toString() { + return "Widget: " + componentName.toShortString(); + } } |