diff options
author | tingna_sung <tingna_sung@htc.com> | 2015-01-16 11:27:12 +0800 |
---|---|---|
committer | Wale Ogunwale <ogunwale@google.com> | 2015-05-06 08:23:15 -0700 |
commit | 9a5d77894c72972bf90a13002ef7c9967c2b5da5 (patch) | |
tree | 9b25e5958aadc51728cadf4ec5d90e0ce8b83026 /services/core/java/com/android/server/wm | |
parent | cf1f2ea5a7945dc4982b1e41197af94ad64e8f37 (diff) | |
download | frameworks_base-9a5d77894c72972bf90a13002ef7c9967c2b5da5.zip frameworks_base-9a5d77894c72972bf90a13002ef7c9967c2b5da5.tar.gz frameworks_base-9a5d77894c72972bf90a13002ef7c9967c2b5da5.tar.bz2 |
Don't apply animation clip to dialog activities
If launching a dialog activity from Recents app UI, the top region
of this dialog will be clipped. This is caused by applying clip rect
animation effect for Recents app scale up/down transition.
However, the clip rect animation is not needed for non-inset decor
app window, e.g. dialog activity.
https://code.google.com/p/android/issues/detail?id=161362
Bug: 20652683
Bug: 19523205
Change-Id: Ida8c3b28b3789061d6ebb662bc08738d7daec3a0
Diffstat (limited to 'services/core/java/com/android/server/wm')
-rw-r--r-- | services/core/java/com/android/server/wm/WindowStateAnimator.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index d6726c1..cdd9503 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -1218,6 +1218,10 @@ class WindowStateAnimator { mDtDx = 0; mDsDy = 0; mDtDy = mWin.mGlobalScale; + if (appTransformation == null) { + mHasClipRect = false; + mClipRect.setEmpty(); + } } } @@ -1301,7 +1305,10 @@ class WindowStateAnimator { clipRect.bottom += attrs.surfaceInsets.bottom; // If we have an animated clip rect, intersect it with the clip rect. - if (mHasClipRect) { + // However, the clip rect animation effect should be applied on app windows that inset + // decor only. If applying on non-inset decor one, the top region of this window will + // be clipped on the end of animation, e.g. dialog activities. + if (mHasClipRect && (w.mAttrs.flags & LayoutParams.FLAG_LAYOUT_INSET_DECOR) != 0) { // NOTE: We are adding a temporary workaround due to the status bar // not always reporting the correct system decor rect. In such // cases, we take into account the specified content insets as well. |