summaryrefslogtreecommitdiff
path: root/core/java/android/view/InsetsSourceConsumer.java
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2020-03-02 20:22:34 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-03-02 20:22:34 +0000
commit96cc10c2deabbfb063cf649401d89f2762eb7d1e (patch)
treeb84e3bcab740079609662cbcbfd27cf7d31c247c /core/java/android/view/InsetsSourceConsumer.java
parent432e0c744003eead66f5765067f43f30cdac122a (diff)
parent580aef5a82c80317549eaeda81b646a0a44ec860 (diff)
Merge "Various inset fixes" into rvc-dev
Diffstat (limited to 'core/java/android/view/InsetsSourceConsumer.java')
-rw-r--r--core/java/android/view/InsetsSourceConsumer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/view/InsetsSourceConsumer.java b/core/java/android/view/InsetsSourceConsumer.java
index 6d07a13091bd..92ac4259c349 100644
--- a/core/java/android/view/InsetsSourceConsumer.java
+++ b/core/java/android/view/InsetsSourceConsumer.java
@@ -160,7 +160,8 @@ public class InsetsSourceConsumer {
}
boolean applyLocalVisibilityOverride() {
- final boolean isVisible = mState.getSource(mType).isVisible();
+ InsetsSource source = mState.peekSource(mType);
+ final boolean isVisible = source != null && source.isVisible();
final boolean hasControl = mSourceControl != null;
// We still need to let the legacy app know the visibility change even if we don't have the