summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2015-07-01 17:16:27 -0700
committerJorim Jaggi <jjaggi@google.com>2015-07-06 21:12:49 +0000
commitc5af4f8421926ea17cf51a9a53f91f5fec467588 (patch)
tree32331b0b19cd9b46b6c138d17002c39a1a6cb3d4 /core/java
parent74fed612336fad30c8a93a346160ee36c87bd843 (diff)
downloadframeworks_base-c5af4f8421926ea17cf51a9a53f91f5fec467588.zip
frameworks_base-c5af4f8421926ea17cf51a9a53f91f5fec467588.tar.gz
frameworks_base-c5af4f8421926ea17cf51a9a53f91f5fec467588.tar.bz2
Don't prevent windows from drawing when they are just moving
Bug: 21292010 Change-Id: I0cf459d75e9749afa58a4b8649457b3908c8adeb
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/IWindow.aidl3
-rw-r--r--core/java/android/view/ViewRootImpl.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/view/IWindow.aidl b/core/java/android/view/IWindow.aidl
index 9cf3759..acad496 100644
--- a/core/java/android/view/IWindow.aidl
+++ b/core/java/android/view/IWindow.aidl
@@ -83,7 +83,8 @@ oneway interface IWindow {
* The window is beginning to animate. The application should stop drawing frames until the
* window is not animating anymore, indicated by being called {@link #windowEndAnimating}.
*
- * @param remainingFrameCount how many frames the app might still draw before stopping drawing
+ * @param remainingFrameCount how many frames the app might still draw before stopping drawing;
+ * pass -1 to let it continue drawing
*/
void onAnimationStarted(int remainingFrameCount);
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 6d0d788..09d7a21 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -5327,7 +5327,7 @@ public final class ViewRootImpl implements ViewParent,
}
public void handleDispatchWindowAnimationStarted(int remainingFrameCount) {
- if (!mDrawDuringWindowsAnimating) {
+ if (!mDrawDuringWindowsAnimating && remainingFrameCount != -1) {
mRemainingFrameCount = remainingFrameCount;
mWindowsAnimating = true;
}