Using a proxy call for isAttachedToWindow for pre 19 devices

Bug: 17423114
Change-Id: I6f0cc306b7fcc8087b4e4fc92bb8796d51a989d6
This commit is contained in:
Sunny Goyal
2014-11-03 11:30:01 -08:00
parent 96d2cc235d
commit fafca5299e
3 changed files with 16 additions and 15 deletions
@@ -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());
}