From 74fd1dd59619b0e3f6264a063ce94e19d972bf20 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sat, 18 Dec 2010 04:12:47 -0800 Subject: [PATCH] Fix 3295530: Fix crash in RecentApps when we have no recents A change to the Animation framework now throws an exception for negative durations, which was causing Recents to crash when there are no recent activities. Change-Id: I65b7d6b6d5ad4637ae93b44c147ff6193d8c03cc --- .../android/systemui/statusbar/tablet/RecentAppsPanel.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java index e0f37ca3c8ebd..edcf09694f6ce 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java @@ -319,10 +319,8 @@ public class RecentAppsPanel extends LinearLayout implements StatusBarPanel, OnC anim.setDuration((last-first) * STAGGER_ANIMATION_DELAY); anim.setInterpolator(interp); anims.add(anim); - } - if (animate) { - ObjectAnimator anim = ObjectAnimator.ofFloat(mBackgroundProtector, "alpha", + anim = ObjectAnimator.ofFloat(mBackgroundProtector, "alpha", initialAlpha, 1.0f); anim.setDuration(last * STAGGER_ANIMATION_DELAY); anim.setInterpolator(interp);