summaryrefslogtreecommitdiff
path: root/core/java/android/view/InsetsSourceConsumer.java
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2020-02-26 18:28:28 +0100
committerJorim Jaggi <jjaggi@google.com>2020-03-02 17:37:01 +0100
commit580aef5a82c80317549eaeda81b646a0a44ec860 (patch)
tree3da88e29a9f7e373b3802e25f7a447abdae087ca /core/java/android/view/InsetsSourceConsumer.java
parente06e29bb090d74bef9ec5e0cc9c5705b5ff0e55b (diff)
Various inset fixes
- Fix alpha - Fix running animation book-keeping - Fix max insets dispatched during onProgress - Fix visibility of onProgress - Fix cutout during onProgress Bug: 118118435 Change-Id: Ibc0204280407ea6c981b86af6992ef24ff8fb41f
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 e6497c00c8dd..0d648d012e62 100644
--- a/core/java/android/view/InsetsSourceConsumer.java
+++ b/core/java/android/view/InsetsSourceConsumer.java
@@ -156,7 +156,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