diff options
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 3862c32..b63ccab 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -211,6 +211,7 @@ public final class ViewRootImpl implements ViewParent, boolean mHasHadWindowFocus; boolean mLastWasImTarget; boolean mWindowsAnimating; + boolean mDrawDuringWindowsAnimating; boolean mIsDrawing; int mLastSystemUiVisibility; int mClientWindowLayoutFlags; @@ -1396,8 +1397,10 @@ public final class ViewRootImpl implements ViewParent, final int surfaceGenerationId = mSurface.getGenerationId(); relayoutResult = relayoutWindow(params, viewVisibility, insetsPending); - mWindowsAnimating |= - (relayoutResult & WindowManagerGlobal.RELAYOUT_RES_ANIMATING) != 0; + if (!mDrawDuringWindowsAnimating) { + mWindowsAnimating |= + (relayoutResult & WindowManagerGlobal.RELAYOUT_RES_ANIMATING) != 0; + } if (DEBUG_LAYOUT) Log.v(TAG, "relayout: frame=" + frame.toShortString() + " overscan=" + mPendingOverscanInsets.toShortString() @@ -2572,6 +2575,16 @@ public final class ViewRootImpl implements ViewParent, displayLists.clear(); } + /** + * @hide + */ + public void setDrawDuringWindowsAnimating(boolean value) { + mDrawDuringWindowsAnimating = value; + if (value) { + handleDispatchDoneAnimating(); + } + } + boolean scrollToRectOrFocus(Rect rectangle, boolean immediate) { final View.AttachInfo attachInfo = mAttachInfo; final Rect ci = attachInfo.mContentInsets; |
