summaryrefslogtreecommitdiff
path: root/core/java/android/view/InsetsAnimationControlImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view/InsetsAnimationControlImpl.java')
-rw-r--r--core/java/android/view/InsetsAnimationControlImpl.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/view/InsetsAnimationControlImpl.java b/core/java/android/view/InsetsAnimationControlImpl.java
index 341c2147c64a..e4deffadc966 100644
--- a/core/java/android/view/InsetsAnimationControlImpl.java
+++ b/core/java/android/view/InsetsAnimationControlImpl.java
@@ -229,6 +229,10 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll
final InsetsSourceConsumer consumer = items.valueAt(i);
final InsetsSource source = mInitialInsetsState.getSource(consumer.getType());
final InsetsSourceControl control = consumer.getControl();
+ if (control == null) {
+ // Control may not be available for consumer yet or revoked.
+ continue;
+ }
final SurfaceControl leash = consumer.getControl().getLeash();
mTmpMatrix.setTranslate(control.getSurfacePosition().x, control.getSurfacePosition().y);