Add ability to cancel task window transitions.
Bug: 25392381
Change-Id: I45f48edc21c058df0e4c22ceaf7e9aef5899a29c
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index ad44196..d4d99af 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -320,6 +320,15 @@
}
}
+ /**
+ * Cancels any running app transitions associated with the task.
+ */
+ void cancelTaskWindowTransition() {
+ for (int activityNdx = mAppTokens.size() - 1; activityNdx >= 0; --activityNdx) {
+ mAppTokens.get(activityNdx).mAppAnimator.clearAnimation();
+ }
+ }
+
boolean showForAllUsers() {
final int tokensCount = mAppTokens.size();
return (tokensCount != 0) && mAppTokens.get(tokensCount - 1).showForAllUsers;