From 5a35a0d560ccc5582f26c33534bf22c5c0d169b7 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Thu, 16 Aug 2012 13:50:40 -0400 Subject: [PATCH 1/2] 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 --- .../com/android/systemui/statusbar/phone/PanelView.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java index d0fba4256ba76..336eee4a9cf5b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -59,6 +59,11 @@ public class PanelView extends FrameLayout { } }; + private final Runnable mStopAnimator = new Runnable() { public void run() { + if (mTimeAnimator.isStarted()) { + mTimeAnimator.end(); } + }}; + private float mVel, mAccel; private int mFullHeight = 0; private String mViewName; @@ -117,7 +122,7 @@ public class PanelView extends FrameLayout { if (mVel == 0 || (closing && mExpandedHeight == 0) || (!closing && mExpandedHeight == getFullHeight())) { - mTimeAnimator.end(); + post(mStopAnimator); } } } @@ -277,7 +282,7 @@ public class PanelView extends FrameLayout { public void setExpandedHeight(float height) { - mTimeAnimator.end(); + post(mStopAnimator); setExpandedHeightInternal(height); } From fa71962948092786c5190f39fd25ce3d55a4e287 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Thu, 16 Aug 2012 13:52:06 -0400 Subject: [PATCH 2/2] Turn off an assert. Change-Id: Ifad4bd65ddcedc6e2dd018695fd37ddbf9163e80 --- .../src/com/android/systemui/statusbar/GestureRecorder.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/GestureRecorder.java b/packages/SystemUI/src/com/android/systemui/statusbar/GestureRecorder.java index 81a16ae42e4a7..0f894a154f391 100755 --- a/packages/SystemUI/src/com/android/systemui/statusbar/GestureRecorder.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/GestureRecorder.java @@ -101,8 +101,7 @@ public class GestureRecorder { mDownTime = ev.getDownTime(); } else { if (mDownTime != ev.getDownTime()) { - // TODO: remove - throw new RuntimeException("Assertion failure in GestureRecorder: event downTime (" + Slog.w(TAG, "Assertion failure in GestureRecorder: event downTime (" +ev.getDownTime()+") does not match gesture downTime ("+mDownTime+")"); } }