summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/AppsCustomizePagedView.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2014-09-08 19:54:17 +0200
committerAdam Cohen <adamcohen@google.com>2014-09-09 10:00:48 +0000
commit0f668f3c2be93ad9be221d868abb3d9a6e418f18 (patch)
treedfaefe5b42820567e63ac9ef7ebc52614e00ae18 /src/com/android/launcher3/AppsCustomizePagedView.java
parent55f77f983afeffd2240ccd24d783e6d8d3ab44fd (diff)
downloadandroid_packages_apps_Trebuchet-0f668f3c2be93ad9be221d868abb3d9a6e418f18.tar.gz
android_packages_apps_Trebuchet-0f668f3c2be93ad9be221d868abb3d9a6e418f18.tar.bz2
android_packages_apps_Trebuchet-0f668f3c2be93ad9be221d868abb3d9a6e418f18.zip
Prevent GNL from crashing on JB
issue 17433546 Change-Id: Ie5071e516b26400a27473eaaa401023f1af1d840
Diffstat (limited to 'src/com/android/launcher3/AppsCustomizePagedView.java')
-rw-r--r--src/com/android/launcher3/AppsCustomizePagedView.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index a92bff1b6..1bd290777 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -366,7 +366,11 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// This code triggers requestLayout so must be posted outside of the
// layout pass.
public void run() {
- if (isAttachedToWindow()) {
+ boolean attached = true;
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+ attached = isAttachedToWindow();
+ }
+ if (attached) {
setDataIsReady();
onDataReady(getMeasuredWidth(), getMeasuredHeight());
}