summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2014-11-03 11:30:01 -0800
committerSunny Goyal <sunnygoyal@google.com>2014-11-05 15:20:20 -0800
commitfafca5299e13e0f44d1d2332d7669d55ad38fdb5 (patch)
tree337e28eef30b000a024a450fcf0fbacfa0c7dc50 /src/com/android/launcher3/Launcher.java
parent96d2cc235dff94d6109cd480fef13afbefa459f1 (diff)
downloadandroid_packages_apps_Trebuchet-fafca5299e13e0f44d1d2332d7669d55ad38fdb5.tar.gz
android_packages_apps_Trebuchet-fafca5299e13e0f44d1d2332d7669d55ad38fdb5.tar.bz2
android_packages_apps_Trebuchet-fafca5299e13e0f44d1d2332d7669d55ad38fdb5.zip
Using a proxy call for isAttachedToWindow for pre 19 devices
Bug: 17423114 Change-Id: I6f0cc306b7fcc8087b4e4fc92bb8796d51a989d6
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r--src/com/android/launcher3/Launcher.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a2de314d3..8b3b2a1e3 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3597,11 +3597,7 @@ public class Launcher extends Activity
for (int i = 0; i < layerViews.size(); i++) {
View v = layerViews.get(i);
if (v != null) {
- boolean attached = true;
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
- attached = v.isAttachedToWindow();
- }
- if (attached) v.buildLayer();
+ if (Utilities.isViewAttachedToWindow(v)) v.buildLayer();
}
}
}
@@ -3877,11 +3873,7 @@ public class Launcher extends Activity
for (int i = 0; i < layerViews.size(); i++) {
View v = layerViews.get(i);
if (v != null) {
- boolean attached = true;
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
- attached = v.isAttachedToWindow();
- }
- if (attached) v.buildLayer();
+ if (Utilities.isViewAttachedToWindow(v)) v.buildLayer();
}
}
}