diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-06-11 11:24:45 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-06-11 11:24:45 +0000 |
| commit | 9e1a5ebbfdb88e928ef2d17ef78f8be8bf0d0c31 (patch) | |
| tree | 84a6a82f9061625074955217e44d0acaf9f80238 /core/java/android | |
| parent | 95e41f279ddb8cea10fc650d08a4cca2efb509a3 (diff) | |
| parent | 026dec42988ff7f1d30eeb01994c6742f55ae104 (diff) | |
Merge "Don't clear requested SysUI visibility if the source doesn't exist" into rvc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/InsetsSourceConsumer.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/view/InsetsSourceConsumer.java b/core/java/android/view/InsetsSourceConsumer.java index ae70a4971776..3aa246441dbc 100644 --- a/core/java/android/view/InsetsSourceConsumer.java +++ b/core/java/android/view/InsetsSourceConsumer.java @@ -18,8 +18,8 @@ package android.view; import static android.view.InsetsController.ANIMATION_TYPE_NONE; import static android.view.InsetsController.AnimationType; -import static android.view.InsetsState.getDefaultVisibility; import static android.view.InsetsController.DEBUG; +import static android.view.InsetsState.getDefaultVisibility; import static android.view.InsetsState.toPublicType; import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; @@ -221,9 +221,10 @@ public class InsetsSourceConsumer { final boolean hasControl = mSourceControl != null; // We still need to let the legacy app know the visibility change even if we don't have the - // control. + // control. If we don't have the source, we don't change the requested visibility for making + // the callback behavior compatible. mController.updateCompatSysUiVisibility( - mType, hasControl ? mRequestedVisible : isVisible, hasControl); + mType, (hasControl || source == null) ? mRequestedVisible : isVisible, hasControl); // If we don't have control, we are not able to change the visibility. if (!hasControl) { |
