The layertype was incorrectly restored with overlapping alpha animations.

This could lead to weird clipping bugs on the lockscreen. We now simply
set its type to back to NONE after the animation.

Bug: 15186220
Change-Id: I884b6830d748309105ed62471cb8b6dee71d51fe
This commit is contained in:
Selim Cinek
2014-05-23 17:33:00 +02:00
parent 72b6f4d4d9
commit 1efb240c1a

View File

@@ -315,14 +315,13 @@ public class StackStateAnimator {
child.getAlpha(), newEndValue);
animator.setInterpolator(mFastOutSlowInInterpolator);
// Handle layer type
final int currentLayerType = child.getLayerType();
child.setLayerType(View.LAYER_TYPE_HARDWARE, null);
animator.addListener(new AnimatorListenerAdapter() {
public boolean mWasCancelled;
@Override
public void onAnimationEnd(Animator animation) {
child.setLayerType(currentLayerType, null);
child.setLayerType(View.LAYER_TYPE_NONE, null);
if (newEndValue == 0 && !mWasCancelled) {
child.setVisibility(View.INVISIBLE);
}