summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTaran Singh <tarandeep@google.com>2021-02-05 17:38:50 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-02-05 17:38:50 +0000
commite272df933837a6719f1fb2cc57febe11a09fece0 (patch)
tree50a9b06c5496944e1bd9e3234d1869168a4ded0d /core/java/android
parent89af47ea21a5faedbd43be9cae72bf2bf5f561a7 (diff)
parente2307d9a48180a0001a0e2b51777fc151a698cd4 (diff)
Merge "Handle cancelled Insets animation" into rvc-qpr-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/InsetsAnimationThreadControlRunner.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/view/InsetsAnimationThreadControlRunner.java b/core/java/android/view/InsetsAnimationThreadControlRunner.java
index 123604489da4..09e4557135b5 100644
--- a/core/java/android/view/InsetsAnimationThreadControlRunner.java
+++ b/core/java/android/view/InsetsAnimationThreadControlRunner.java
@@ -108,6 +108,9 @@ public class InsetsAnimationThreadControlRunner implements InsetsAnimationContro
mControl = new InsetsAnimationControlImpl(controls, frame, state, listener,
types, mCallbacks, durationMs, interpolator, animationType);
InsetsAnimationThread.getHandler().post(() -> {
+ if (mControl.isCancelled()) {
+ return;
+ }
Trace.asyncTraceBegin(Trace.TRACE_TAG_VIEW,
"InsetsAsyncAnimation: " + WindowInsets.Type.toString(types), types);
listener.onReady(mControl, types);