diff options
| author | Yuncheol Heo <ycheo@google.com> | 2020-05-05 22:56:42 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-05-05 22:56:42 +0000 |
| commit | d1cfb337cf7647d9b6f0fe27aab2c9afefcba8fd (patch) | |
| tree | e5c3d5016b3805f4d9f4e6864b4d393d00da75fc /core/java | |
| parent | 32c36ff2a5258ca891e825b20fec0191ebc2314e (diff) | |
| parent | 11df7e13a8d3f932ee575361b06e18279344c038 (diff) | |
Merge "Revert "Notify the visibility change to update color views without control."" into rvc-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/InsetsSourceConsumer.java | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/core/java/android/view/InsetsSourceConsumer.java b/core/java/android/view/InsetsSourceConsumer.java index 58ec9ec11e56..2dcfd899adf4 100644 --- a/core/java/android/view/InsetsSourceConsumer.java +++ b/core/java/android/view/InsetsSourceConsumer.java @@ -200,15 +200,6 @@ public class InsetsSourceConsumer { } boolean applyLocalVisibilityOverride() { - return applyLocalVisibilityOverride(false /* notifyWithoutControl */); - } - - /** - * @param notifyWithoutControl set it true when the caller wants to notify the visibility - * changes even if the consumer doesn't have the control. - * @return true if it needs to notify the visibility changes to the controller - */ - private boolean applyLocalVisibilityOverride(boolean notifyWithoutControl) { InsetsSource source = mState.peekSource(mType); final boolean isVisible = source != null && source.isVisible(); final boolean hasControl = mSourceControl != null; @@ -220,7 +211,7 @@ public class InsetsSourceConsumer { // If we don't have control, we are not able to change the visibility. if (!hasControl) { - return notifyWithoutControl; + return false; } if (isVisible == mRequestedVisible) { return false; @@ -302,9 +293,7 @@ public class InsetsSourceConsumer { mRequestedVisible = requestedVisible; mIsAnimationPending = false; } - // We need to notify the visibility changed even if we don't have mSourceControl in order - // to update color views. - if (applyLocalVisibilityOverride(true /* notifyWithoutControl */)) { + if (applyLocalVisibilityOverride()) { mController.notifyVisibilityChanged(); } } |
