summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/AppsCustomizePagedView.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2014-09-04 01:27:53 +0200
committerAdam Cohen <adamcohen@google.com>2014-09-04 01:29:26 +0200
commit0d2adfbbb3b2f2990fc2265dfadca0252a5b4bb5 (patch)
tree5c4403c17f5731dc1d449ae4b4ec4f47b834985d /src/com/android/launcher3/AppsCustomizePagedView.java
parent6a2c77856f1cfa402363cfbb04b5718b431bbc6e (diff)
downloadandroid_packages_apps_Trebuchet-0d2adfbbb3b2f2990fc2265dfadca0252a5b4bb5.tar.gz
android_packages_apps_Trebuchet-0d2adfbbb3b2f2990fc2265dfadca0252a5b4bb5.tar.bz2
android_packages_apps_Trebuchet-0d2adfbbb3b2f2990fc2265dfadca0252a5b4bb5.zip
Potential fix for a couple bugs
issue 17371274 issue 17368590 Change-Id: I717f9c37613efd9d61e401540ca82aff77058022
Diffstat (limited to 'src/com/android/launcher3/AppsCustomizePagedView.java')
-rw-r--r--src/com/android/launcher3/AppsCustomizePagedView.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java
index 558d8e99b..a92bff1b6 100644
--- a/src/com/android/launcher3/AppsCustomizePagedView.java
+++ b/src/com/android/launcher3/AppsCustomizePagedView.java
@@ -366,8 +366,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// This code triggers requestLayout so must be posted outside of the
// layout pass.
public void run() {
- setDataIsReady();
- onDataReady(getMeasuredWidth(), getMeasuredHeight());
+ if (isAttachedToWindow()) {
+ setDataIsReady();
+ onDataReady(getMeasuredWidth(), getMeasuredHeight());
+ }
}
});
}