Prevent GNL from crashing on JB

issue 17433546

Change-Id: Ie5071e516b26400a27473eaaa401023f1af1d840
This commit is contained in:
Adam Cohen
2014-09-08 19:54:17 +02:00
parent 55f77f983a
commit 0f668f3c2b
2 changed files with 20 additions and 3 deletions
@@ -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());
}