Using a proxy call for isAttachedToWindow for pre 19 devices

Bug: 17423114
Change-Id: I6f0cc306b7fcc8087b4e4fc92bb8796d51a989d6
This commit is contained in:
Sunny Goyal committed 2014-11-05 15:20:20 -08:00
1 parent 96d2cc235d
commit fafca5299e
3 files changed
+16 -15

No files matched your search

@@ -366,11 +366,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// This code triggers requestLayout so must be posted outside of the
// layout pass.
public void run() {
boolean attached = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
attached = isAttachedToWindow();
}
if (attached) {
if (Utilities.isViewAttachedToWindow(AppsCustomizePagedView.this)) {
setDataIsReady();
onDataReady(getMeasuredWidth(), getMeasuredHeight());
}