Skip to content

Commit 3fd688f

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge changes Ifad4bd65,I6a4b7d69 into jb-mr1-dev
* changes: Turn off an assert. Fix crash in SystemUI.
2 parents f02b60a + fa71962 commit 3fd688f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/GestureRecorder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ public void add(MotionEvent ev) {
101101
mDownTime = ev.getDownTime();
102102
} else {
103103
if (mDownTime != ev.getDownTime()) {
104-
// TODO: remove
105-
throw new RuntimeException("Assertion failure in GestureRecorder: event downTime ("
104+
Slog.w(TAG, "Assertion failure in GestureRecorder: event downTime ("
106105
+ev.getDownTime()+") does not match gesture downTime ("+mDownTime+")");
107106
}
108107
}

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)