am 823e2028: am 64dbcd64: Merge "Tweak recents out animation a bit more" into jb-dev

* commit '823e20284588f785b96764ba24efb7b8f63895d7':
  Tweak recents out animation a bit more
This commit is contained in:
Michael Jurka
2012-06-12 13:00:43 -07:00
committed by Android Git Automerger
8 changed files with 115 additions and 38 deletions

View File

@@ -127,6 +127,7 @@ import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.AnimationUtils;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.animation.ScaleAnimation;
@@ -280,6 +281,8 @@ public class WindowManagerService extends IWindowManager.Stub
private static final int ALLOW_DISABLE_UNKNOWN = -1; // check with DevicePolicyManager
private int mAllowDisableKeyguard = ALLOW_DISABLE_UNKNOWN; // sync'd by mKeyguardTokenWatcher
private static final float THUMBNAIL_ANIMATION_DECELERATE_FACTOR = 1.5f;
final TokenWatcher mKeyguardTokenWatcher = new TokenWatcher(
new Handler(), "WindowManagerService.mKeyguardTokenWatcher") {
@Override
@@ -3183,7 +3186,7 @@ public class WindowManagerService extends IWindowManager.Stub
// it is the standard duration for that. Otherwise we use the longer
// task transition duration.
int duration;
int delayDuration = delayed ? 200 : 0;
int delayDuration = delayed ? 270 : 0;
switch (transit) {
case WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN:
case WindowManagerPolicy.TRANSIT_ACTIVITY_CLOSE:
@@ -3191,7 +3194,7 @@ public class WindowManagerService extends IWindowManager.Stub
com.android.internal.R.integer.config_shortAnimTime);
break;
default:
duration = delayed ? 200 : 300;
duration = delayed ? 250 : 300;
break;
}
if (thumb) {
@@ -3206,6 +3209,8 @@ public class WindowManagerService extends IWindowManager.Stub
AnimationSet set = new AnimationSet(true);
Animation alpha = new AlphaAnimation(1, 0);
scale.setDuration(duration);
scale.setInterpolator(
new DecelerateInterpolator(THUMBNAIL_ANIMATION_DECELERATE_FACTOR));
set.addAnimation(scale);
alpha.setDuration(duration);
set.addAnimation(alpha);
@@ -3222,6 +3227,8 @@ public class WindowManagerService extends IWindowManager.Stub
computePivot(mNextAppTransitionStartX, scaleW),
computePivot(mNextAppTransitionStartY, scaleH));
scale.setDuration(duration);
scale.setInterpolator(
new DecelerateInterpolator(THUMBNAIL_ANIMATION_DECELERATE_FACTOR));
scale.setFillBefore(true);
if (delayDuration > 0) {
scale.setStartOffset(delayDuration);