Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e9c2ea1 authored by Tiger Huang's avatar Tiger Huang Committed by Android (Google) Code Review
Browse files

Merge "Notify visibility change if source visibility is changed"

parents 143ebe51 fd943513
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -113,13 +113,20 @@ public class InsetsSourceConsumer {
                    InsetsState.typeToString(control.getType()),
                    mController.getHost().getRootViewTitle()));
        }
        // We are loosing control
        if (mSourceControl == null) {
            // We are loosing control
            mController.notifyControlRevoked(this);

            // Restore server visibility.
            mState.getSource(getType()).setVisible(
                    mController.getLastDispatchedState().getSource(getType()).isVisible());
            // Check if we need to restore server visibility.
            final InsetsSource source = mState.getSource(mType);
            final boolean serverVisibility =
                    mController.getLastDispatchedState().getSourceOrDefaultVisibility(mType);
            if (source.isVisible() != serverVisibility) {
                source.setVisible(serverVisibility);
                mController.notifyVisibilityChanged();
            }

            // For updateCompatSysUiVisibility
            applyLocalVisibilityOverride();
        } else {
            // We are gaining control, and need to run an animation since previous state