Notify visibility change if source visibility is changed am: e8bd5284d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13292846 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I0e77b4ed58c35aa14a7eaaf089d89c13087033db
This commit is contained in:
@@ -113,13 +113,20 @@ public class InsetsSourceConsumer {
|
|||||||
InsetsState.typeToString(control.getType()),
|
InsetsState.typeToString(control.getType()),
|
||||||
mController.getHost().getRootViewTitle()));
|
mController.getHost().getRootViewTitle()));
|
||||||
}
|
}
|
||||||
// We are loosing control
|
|
||||||
if (mSourceControl == null) {
|
if (mSourceControl == null) {
|
||||||
|
// We are loosing control
|
||||||
mController.notifyControlRevoked(this);
|
mController.notifyControlRevoked(this);
|
||||||
|
|
||||||
// Restore server visibility.
|
// Check if we need to restore server visibility.
|
||||||
mState.getSource(getType()).setVisible(
|
final InsetsSource source = mState.getSource(mType);
|
||||||
mController.getLastDispatchedState().getSource(getType()).isVisible());
|
final boolean serverVisibility =
|
||||||
|
mController.getLastDispatchedState().getSourceOrDefaultVisibility(mType);
|
||||||
|
if (source.isVisible() != serverVisibility) {
|
||||||
|
source.setVisible(serverVisibility);
|
||||||
|
mController.notifyVisibilityChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
// For updateCompatSysUiVisibility
|
||||||
applyLocalVisibilityOverride();
|
applyLocalVisibilityOverride();
|
||||||
} else {
|
} else {
|
||||||
// We are gaining control, and need to run an animation since previous state
|
// We are gaining control, and need to run an animation since previous state
|
||||||
|
|||||||
Reference in New Issue
Block a user