Merge "Fixed that the shelf was animating the icons" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
214f4cff15
@@ -70,6 +70,8 @@ public class NotificationShelf extends ActivatableNotificationView implements
|
||||
private float mMaxShelfEnd;
|
||||
private int mRelativeOffset;
|
||||
private boolean mInteractive;
|
||||
private float mOpenedAmount;
|
||||
private boolean mNoAnimationsInThisFrame;
|
||||
private boolean mAnimationsEnabled = true;
|
||||
|
||||
public NotificationShelf(Context context, AttributeSet attrs) {
|
||||
@@ -367,7 +369,8 @@ public class NotificationShelf extends ActivatableNotificationView implements
|
||||
} else {
|
||||
// We take the clamped position instead
|
||||
transitionAmount = clampedAmount;
|
||||
iconState.needsCannedAnimation = iconState.clampedAppearAmount != clampedAmount;
|
||||
iconState.needsCannedAnimation = iconState.clampedAppearAmount != clampedAmount
|
||||
&& !mNoAnimationsInThisFrame;
|
||||
}
|
||||
iconState.iconAppearAmount = !USE_ANIMATIONS_WHEN_OPENING
|
||||
|| iconState.useFullTransitionAmount
|
||||
@@ -505,6 +508,8 @@ public class NotificationShelf extends ActivatableNotificationView implements
|
||||
}
|
||||
|
||||
private void setOpenedAmount(float openedAmount) {
|
||||
mNoAnimationsInThisFrame = openedAmount == 1.0f && mOpenedAmount == 0.0f;
|
||||
mOpenedAmount = openedAmount;
|
||||
if (!mAmbientState.isPanelFullWidth()) {
|
||||
// We don't do a transformation at all, lets just assume we are fully opened
|
||||
openedAmount = 1.0f;
|
||||
|
||||
Reference in New Issue
Block a user