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
This commit is contained in:
Dianne Hackborn
2013-10-13 16:09:25 -07:00
committed by Android Git Automerger
2 changed files with 13 additions and 4 deletions

View File

@@ -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;

View File

@@ -3014,7 +3014,7 @@ public class WindowManagerService extends IWindowManager.Stub
TAG, "Relayout of " + win + ": focusMayChange=" + focusMayChange);
inTouchMode = mInTouchMode;
animating = mAnimator.mAnimating;
animating = mAnimator.mAnimating && win.mWinAnimator.isAnimating();
if (animating && !mRelayoutWhileAnimating.contains(win)) {
mRelayoutWhileAnimating.add(win);
}