diff options
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 924ed1158..e7c658acc 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -3230,7 +3230,10 @@ public class Launcher extends Activity mAppsCustomizeTabHost.setContentTypeImmediate(contentType); } - if (animated) { + // If for some reason our views aren't initialized, don't animate + boolean initialized = getAllAppsButton() != null; + + if (animated && initialized) { mStateAnimation = LauncherAnimUtils.createAnimatorSet(); final AppsCustomizePagedView content = (AppsCustomizePagedView) toView.findViewById(R.id.apps_customize_pane_content); @@ -3457,7 +3460,10 @@ public class Launcher extends Activity toState, animated, layerViews); } - if (animated) { + // If for some reason our views aren't initialized, don't animate + boolean initialized = getAllAppsButton() != null; + + if (animated && initialized) { mStateAnimation = LauncherAnimUtils.createAnimatorSet(); if (workspaceAnim != null) { mStateAnimation.play(workspaceAnim); |