Merge "Revert "Notify the visibility change to update color views without control."" into rvc-dev am: d1cfb337cf am: 800390aebb
Change-Id: I92ce4640cc9beaf79ffbededbc18faffa4868034
This commit is contained in:
@@ -200,15 +200,6 @@ public class InsetsSourceConsumer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean applyLocalVisibilityOverride() {
|
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);
|
InsetsSource source = mState.peekSource(mType);
|
||||||
final boolean isVisible = source != null && source.isVisible();
|
final boolean isVisible = source != null && source.isVisible();
|
||||||
final boolean hasControl = mSourceControl != null;
|
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 we don't have control, we are not able to change the visibility.
|
||||||
if (!hasControl) {
|
if (!hasControl) {
|
||||||
return notifyWithoutControl;
|
return false;
|
||||||
}
|
}
|
||||||
if (isVisible == mRequestedVisible) {
|
if (isVisible == mRequestedVisible) {
|
||||||
return false;
|
return false;
|
||||||
@@ -302,9 +293,7 @@ public class InsetsSourceConsumer {
|
|||||||
mRequestedVisible = requestedVisible;
|
mRequestedVisible = requestedVisible;
|
||||||
mIsAnimationPending = false;
|
mIsAnimationPending = false;
|
||||||
}
|
}
|
||||||
// We need to notify the visibility changed even if we don't have mSourceControl in order
|
if (applyLocalVisibilityOverride()) {
|
||||||
// to update color views.
|
|
||||||
if (applyLocalVisibilityOverride(true /* notifyWithoutControl */)) {
|
|
||||||
mController.notifyVisibilityChanged();
|
mController.notifyVisibilityChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user