Merge "Fixed a few battery issues in SystemUI" into nyc-dev

am: 8fba3b395f

* commit '8fba3b395fe45510683ffc199a0101655274ee45':
  Fixed a few battery issues in SystemUI

Change-Id: Ic2bb6e80c8276b2029b26095514d1aeb37bbeedb
This commit is contained in:
Selim Cinek
2016-05-25 00:38:02 +00:00
committed by android-build-merger

View File

@@ -2511,9 +2511,9 @@ public class NotificationStackScrollLayout extends ViewGroup
mNeedsAnimation = false;
}
if (!mAnimationEvents.isEmpty() || isCurrentlyAnimating()) {
setAnimationRunning(true);
mStateAnimator.startAnimationForEvents(mAnimationEvents, mCurrentStackScrollState,
mGoToFullShadeDelay);
setAnimationRunning(true);
mAnimationEvents.clear();
updateBackground();
updateViewShadows();
@@ -3131,6 +3131,7 @@ public class NotificationStackScrollLayout extends ViewGroup
mListener.onChildLocationsChanged(this);
}
runAnimationFinishedRunnables();
setAnimationRunning(false);
updateBackground();
updateViewShadows();
}
@@ -3247,6 +3248,7 @@ public class NotificationStackScrollLayout extends ViewGroup
maxLength = Math.max(mDarkAnimationOriginIndex,
getNotGoneChildCount() - mDarkAnimationOriginIndex - 1);
}
maxLength = Math.max(0, maxLength);
long delay = maxLength * StackStateAnimator.ANIMATION_DELAY_PER_ELEMENT_DARK;
fadeAnimator.setStartDelay(delay);
fadeAnimator.setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD);