From: Adam Cohen Date: Sat, 6 Sep 2014 16:32:56 +0000 (+0200) Subject: Second half of workaround for all apps crash in restricted profile X-Git-Tag: android-x86-6.0-r1~137^2~41 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=cd145285;p=android-x86%2Fpackages-apps-Launcher3.git Second half of workaround for all apps crash in restricted profile Bug 17363836 Change-Id: If83cf3ef73ce2f992f69d42bad5d6f41cc3b9b9e --- diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 51d74be10..924ed1158 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -3620,9 +3620,6 @@ public class Launcher extends Activity final AnimatorSet stateAnimation = mStateAnimation; final Runnable startAnimRunnable = new Runnable() { public void run() { - if (!fromView.isAttachedToWindow()) { - return; - } // Check that mStateAnimation hasn't changed while // we waited for a layout/draw pass if (mStateAnimation != stateAnimation) @@ -3633,7 +3630,7 @@ public class Launcher extends Activity 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();