diff options
| author | Dianne Hackborn <hackbod@google.com> | 2013-10-13 16:09:25 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-13 16:09:25 -0700 |
| commit | f2896e2897cace31d82d917f73b787a9d87b21cb (patch) | |
| tree | a5a0f18279276d9e8efd2a66c3266f569bf4b2a9 /core/java | |
| parent | 51171688154947124fe8868cdcd43fbbe4fff495 (diff) | |
| parent | 9e4403d4c676d5c97f39ab4fb2debf1ca2d060ec (diff) | |
am 9e4403d4: am ef53fcc3: Merge "Fix issue #11199654: Action bar enter animation skips frames when cleared by the system" into klp-dev
* commit '9e4403d4c676d5c97f39ab4fb2debf1ca2d060ec':
Fix issue #11199654: Action bar enter animation skips frames when cleared by the system
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index beb7366ec965..c86bc4579715 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -1408,9 +1408,9 @@ public final class ViewRootImpl implements ViewParent, final int surfaceGenerationId = mSurface.getGenerationId(); relayoutResult = relayoutWindow(params, viewVisibility, insetsPending); - if (!mDrawDuringWindowsAnimating) { - mWindowsAnimating |= - (relayoutResult & WindowManagerGlobal.RELAYOUT_RES_ANIMATING) != 0; + if (!mDrawDuringWindowsAnimating && + (relayoutResult & WindowManagerGlobal.RELAYOUT_RES_ANIMATING) != 0) { + mWindowsAnimating = true; } if (DEBUG_LAYOUT) Log.v(TAG, "relayout: frame=" + frame.toShortString() @@ -3798,6 +3798,9 @@ public final class ViewRootImpl implements ViewParent, if (q.mEvent instanceof KeyEvent) { return processKeyEvent(q); } else { + // If delivering a new non-key event, make sure the window is + // now allowed to start updating. + handleDispatchDoneAnimating(); final int source = q.mEvent.getSource(); if ((source & InputDevice.SOURCE_CLASS_POINTER) != 0) { return processPointerEvent(q); @@ -3812,6 +3815,12 @@ public final class ViewRootImpl implements ViewParent, private int processKeyEvent(QueuedInputEvent q) { final KeyEvent event = (KeyEvent)q.mEvent; + if (event.getAction() != KeyEvent.ACTION_UP) { + // If delivering a new key event, make sure the window is + // now allowed to start updating. + handleDispatchDoneAnimating(); + } + // Deliver the key to the view hierarchy. if (mView.dispatchKeyEvent(event)) { return FINISH_HANDLED; |
