summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorTiger Huang <tigerhuang@google.com>2020-08-19 15:58:11 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-08-19 15:58:11 +0000
commit02b0205641fbe3a79fcf2610ad3753fa823dc60e (patch)
tree6e16116f6f179e9f0cfda13ea837ff759b63b036 /core/java
parent827314c59437f5eefe9e05efa377d41a85ada77c (diff)
parent23c75281ef0de8fb2b44fb93d8cf36ecf86454c7 (diff)
Update requested state after applying pending frames am: 23c75281ef
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12400337 Change-Id: I955a32723913c7cc238ce38e8c97328295dae27c
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/InsetsController.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java
index e9b7695e7b71..403ac3ab29c0 100644
--- a/core/java/android/view/InsetsController.java
+++ b/core/java/android/view/InsetsController.java
@@ -1138,15 +1138,14 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
if (invokeCallback) {
control.cancel();
}
+ boolean stateChanged = false;
for (int i = mRunningAnimations.size() - 1; i >= 0; i--) {
RunningAnimation runningAnimation = mRunningAnimations.get(i);
if (runningAnimation.runner == control) {
mRunningAnimations.remove(i);
ArraySet<Integer> types = toInternalType(control.getTypes());
for (int j = types.size() - 1; j >= 0; j--) {
- if (getSourceConsumer(types.valueAt(j)).notifyAnimationFinished()) {
- mHost.notifyInsetsChanged();
- }
+ stateChanged |= getSourceConsumer(types.valueAt(j)).notifyAnimationFinished();
}
if (invokeCallback && runningAnimation.startDispatched) {
dispatchAnimationEnd(runningAnimation.runner.getAnimation());
@@ -1154,6 +1153,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
break;
}
}
+ if (stateChanged) {
+ mHost.notifyInsetsChanged();
+ updateRequestedState();
+ }
}
private void applyLocalVisibilityOverride() {