Workaround for all apps crash in restricted profile
Bug 17363836
Change-Id: I1c12e0300cfb1046bc7f2f3159d018ebf0a2f57d
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 309ab46..51d74be 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3375,9 +3375,6 @@
final AnimatorSet stateAnimation = mStateAnimation;
final Runnable startAnimRunnable = new Runnable() {
public void run() {
- if (!toView.isAttachedToWindow()) {
- return;
- }
// Check that mStateAnimation hasn't changed while
// we waited for a layout/draw pass
if (mStateAnimation != stateAnimation)
@@ -3389,7 +3386,7 @@
if (Utilities.isLmp()) {
for (int i = 0; i < layerViews.size(); i++) {
View v = layerViews.get(i);
- if (v != null) v.buildLayer();
+ if (v != null && v.isAttachedToWindow()) v.buildLayer();
}
}
mStateAnimation.start();