From 3d845e8d8921eebe0b072b7856b660b4350921e1 Mon Sep 17 00:00:00 2001 From: Michael Jurka Date: Tue, 15 Nov 2011 17:04:31 -0800 Subject: Fix bug where all apps didn't load sometimes Bug #5623281 --- src/com/android/launcher2/AppsCustomizeTabHost.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java index 334b3691a..7321a796d 100644 --- a/src/com/android/launcher2/AppsCustomizeTabHost.java +++ b/src/com/android/launcher2/AppsCustomizeTabHost.java @@ -355,19 +355,19 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona public boolean onLauncherTransitionStart(Launcher l, Animator animation, boolean toWorkspace) { mInTransition = true; boolean delayLauncherTransitionUntilLayout = false; + boolean animated = (animation != null); mLauncherTransition = null; - // if the content wasn't visible before, delay the launcher animation until after a cal + // if the content wasn't visible before, delay the launcher animation until after a call // to layout -- this prevents a blip - if (animation != null) { - if (mContent.getVisibility() == GONE) { - mLauncherTransition = animation; - delayLauncherTransitionUntilLayout = true; - } - mContent.setVisibility(VISIBLE); - if (!delayLauncherTransitionUntilLayout) { - enableAndBuildHardwareLayer(); - } + if (animated && mContent.getVisibility() == GONE) { + mLauncherTransition = animation; + delayLauncherTransitionUntilLayout = true; + } + mContent.setVisibility(VISIBLE); + + if (animated && !delayLauncherTransitionUntilLayout) { + enableAndBuildHardwareLayer(); } if (!toWorkspace && !LauncherApplication.isScreenLarge()) { -- cgit v1.2.3