OSDN Git Service

resolve merge conflicts of c08a40267be5 to master
authorSelim Cinek <cinek@google.com>
Thu, 1 Jun 2017 18:31:05 +0000 (11:31 -0700)
committerSelim Cinek <cinek@google.com>
Thu, 1 Jun 2017 18:31:05 +0000 (11:31 -0700)
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I4acedef91b60b76d5e8f07d15ed92325a9d6c8b1

1  2 
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java

@@@ -1071,28 -1084,32 +1085,36 @@@ public abstract class PanelView extend
              }
          });
          animator.start();
-         mHeightAnimator = animator;
+         setAnimator(animator);
 -        mKeyguardBottomArea.getIndicationArea().animate()
 -                .translationY(-mHintDistance)
 -                .setDuration(250)
 -                .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
 -                .withEndAction(new Runnable() {
 -                    @Override
 -                    public void run() {
 -                        mKeyguardBottomArea.getIndicationArea().animate()
 -                                .translationY(0)
 -                                .setDuration(450)
 -                                .setInterpolator(mBounceInterpolator)
 -                                .start();
 -                    }
 -                })
 -                .start();
 +
 +        View[] viewsToAnimate = {
 +                mKeyguardBottomArea.getIndicationArea(),
 +                mStatusBar.getAmbientIndicationContainer()};
 +        for (View v : viewsToAnimate) {
 +            if (v == null) {
 +                continue;
 +            }
 +            v.animate()
 +                    .translationY(-mHintDistance)
 +                    .setDuration(250)
 +                    .setInterpolator(Interpolators.FAST_OUT_SLOW_IN)
 +                    .withEndAction(() -> v.animate()
 +                            .translationY(0)
 +                            .setDuration(450)
 +                            .setInterpolator(mBounceInterpolator)
 +                            .start())
 +                    .start();
 +        }
      }
  
+     private void setAnimator(ValueAnimator animator) {
+         mHeightAnimator = animator;
+         if (animator == null && mPanelUpdateWhenAnimatorEnds) {
+             mPanelUpdateWhenAnimatorEnds = false;
+             requestPanelHeightUpdate();
+         }
+     }
      /**
       * Phase 2: Bounce down.
       */