summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/PagedViewGridLayout.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-11-14 11:39:07 -0800
committerWinson Chung <winsonc@google.com>2011-11-14 13:29:25 -0800
commitc6f10b906fc9c120cafc81046a42b2434ff635a9 (patch)
tree94b66501b8acebf2384bc86df5d376da1e9876c2 /src/com/android/launcher2/PagedViewGridLayout.java
parent4db3f7ec76eb16eb999c3233ebed865aca984a53 (diff)
downloadandroid_packages_apps_Trebuchet-c6f10b906fc9c120cafc81046a42b2434ff635a9.tar.gz
android_packages_apps_Trebuchet-c6f10b906fc9c120cafc81046a42b2434ff635a9.tar.bz2
android_packages_apps_Trebuchet-c6f10b906fc9c120cafc81046a42b2434ff635a9.zip
Workarounds for a couple crashes. (Bug 5612584, Bug 5613438)
Change-Id: I9669d830a10cc98291737f3f1d561c846c408289
Diffstat (limited to 'src/com/android/launcher2/PagedViewGridLayout.java')
-rw-r--r--src/com/android/launcher2/PagedViewGridLayout.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/launcher2/PagedViewGridLayout.java b/src/com/android/launcher2/PagedViewGridLayout.java
index 01d75934a..5c32e0934 100644
--- a/src/com/android/launcher2/PagedViewGridLayout.java
+++ b/src/com/android/launcher2/PagedViewGridLayout.java
@@ -46,6 +46,16 @@ public class PagedViewGridLayout extends GridLayout implements Page {
return mCellCountY;
}
+ /**
+ * Clears all the key listeners for the individual widgets.
+ */
+ public void resetChildrenOnKeyListeners() {
+ int childCount = getChildCount();
+ for (int j = 0; j < childCount; ++j) {
+ getChildAt(j).setOnKeyListener(null);
+ }
+ }
+
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
// PagedView currently has issues with different-sized pages since it calculates the
// offset of each page to scroll to before it updates the actual size of each page