Loading services/java/com/android/server/power/RampAnimator.java +12 −6 Original line number Diff line number Diff line Loading @@ -102,20 +102,26 @@ final class RampAnimator<T> { final long frameTimeNanos = mChoreographer.getFrameTimeNanos(); final float timeDelta = (frameTimeNanos - mLastFrameTimeNanos) * 0.000000001f; final float amount = timeDelta * mRate / ValueAnimator.getDurationScale(); mLastFrameTimeNanos = frameTimeNanos; // Advance the animated value towards the target at the specified rate // and clamp to the target. This gives us the new current value but // we keep the animated value around to allow for fractional increments // towards the target. int oldCurrentValue = mCurrentValue; final float scale = ValueAnimator.getDurationScale(); if (scale == 0) { // Animation off. mAnimatedValue = mTargetValue; } else { final float amount = timeDelta * mRate / scale; if (mTargetValue > mCurrentValue) { mAnimatedValue = Math.min(mAnimatedValue + amount, mTargetValue); } else { mAnimatedValue = Math.max(mAnimatedValue - amount, mTargetValue); } mCurrentValue = (int)Math.round(mAnimatedValue); } final int oldCurrentValue = mCurrentValue; mCurrentValue = Math.round(mAnimatedValue); if (oldCurrentValue != mCurrentValue) { mProperty.setValue(mObject, mCurrentValue); Loading services/java/com/android/server/wm/WindowManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -821,7 +821,7 @@ public class WindowManagerService extends IWindowManager.Stub mTransitionAnimationScale = Settings.Global.getFloat(context.getContentResolver(), Settings.Global.TRANSITION_ANIMATION_SCALE, mTransitionAnimationScale); setAnimatorDurationScale(Settings.Global.getFloat(context.getContentResolver(), Settings.Global.ANIMATOR_DURATION_SCALE, mTransitionAnimationScale)); Settings.Global.ANIMATOR_DURATION_SCALE, mAnimatorDurationScale)); // Track changes to DevicePolicyManager state so we can enable/disable keyguard. IntentFilter filter = new IntentFilter(); Loading Loading
services/java/com/android/server/power/RampAnimator.java +12 −6 Original line number Diff line number Diff line Loading @@ -102,20 +102,26 @@ final class RampAnimator<T> { final long frameTimeNanos = mChoreographer.getFrameTimeNanos(); final float timeDelta = (frameTimeNanos - mLastFrameTimeNanos) * 0.000000001f; final float amount = timeDelta * mRate / ValueAnimator.getDurationScale(); mLastFrameTimeNanos = frameTimeNanos; // Advance the animated value towards the target at the specified rate // and clamp to the target. This gives us the new current value but // we keep the animated value around to allow for fractional increments // towards the target. int oldCurrentValue = mCurrentValue; final float scale = ValueAnimator.getDurationScale(); if (scale == 0) { // Animation off. mAnimatedValue = mTargetValue; } else { final float amount = timeDelta * mRate / scale; if (mTargetValue > mCurrentValue) { mAnimatedValue = Math.min(mAnimatedValue + amount, mTargetValue); } else { mAnimatedValue = Math.max(mAnimatedValue - amount, mTargetValue); } mCurrentValue = (int)Math.round(mAnimatedValue); } final int oldCurrentValue = mCurrentValue; mCurrentValue = Math.round(mAnimatedValue); if (oldCurrentValue != mCurrentValue) { mProperty.setValue(mObject, mCurrentValue); Loading
services/java/com/android/server/wm/WindowManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -821,7 +821,7 @@ public class WindowManagerService extends IWindowManager.Stub mTransitionAnimationScale = Settings.Global.getFloat(context.getContentResolver(), Settings.Global.TRANSITION_ANIMATION_SCALE, mTransitionAnimationScale); setAnimatorDurationScale(Settings.Global.getFloat(context.getContentResolver(), Settings.Global.ANIMATOR_DURATION_SCALE, mTransitionAnimationScale)); Settings.Global.ANIMATOR_DURATION_SCALE, mAnimatorDurationScale)); // Track changes to DevicePolicyManager state so we can enable/disable keyguard. IntentFilter filter = new IntentFilter(); Loading