Skip to content

Commit 5a35a0d

Browse files
committed
Fix crash in SystemUI.
It looks like we were end()ing the main timing animation in the middle of the animation (and too many times, at that). Bug: 6992223 Change-Id: I6a4b7d692171baa73f6211c7843e164b05383a30
1 parent 2289167 commit 5a35a0d

File tree

1 file changed

+7
-2
lines changed
  • packages/SystemUI/src/com/android/systemui/statusbar/phone

1 file changed

+7
-2
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ public void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime)
5959
}
6060
};
6161

62+
private final Runnable mStopAnimator = new Runnable() { public void run() {
63+
if (mTimeAnimator.isStarted()) {
64+
mTimeAnimator.end(); }
65+
}};
66+
6267
private float mVel, mAccel;
6368
private int mFullHeight = 0;
6469
private String mViewName;
@@ -117,7 +122,7 @@ private void animationTick(long dtms) {
117122
if (mVel == 0
118123
|| (closing && mExpandedHeight == 0)
119124
|| (!closing && mExpandedHeight == getFullHeight())) {
120-
mTimeAnimator.end();
125+
post(mStopAnimator);
121126
}
122127
}
123128
}
@@ -277,7 +282,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
277282

278283

279284
public void setExpandedHeight(float height) {
280-
mTimeAnimator.end();
285+
post(mStopAnimator);
281286
setExpandedHeightInternal(height);
282287
}
283288

0 commit comments

Comments
 (0)