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

Commit 88ce908d authored by Simon (Qiong) Sun's avatar Simon (Qiong) Sun Committed by Android (Google) Code Review
Browse files

Merge "Prevent Bubble hiding in Flex Split immersive status bar" into main

parents 3ed48aaa 4ec5e6ec
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -781,11 +781,18 @@ public class BubbleController implements ConfigurationChangeListener,
     */
    private void onStatusBarVisibilityChanged(boolean visible) {
        if (mStackView != null) {
            //Checks if the status bar is currently immersive due to Split-Screen mode.
            final boolean isSplitStatusBarImmersive = mSplitScreenController.get()
                    .map(SplitScreenController::isStatusBarImmersive)
                    .orElse(false);
            // Hide the stack temporarily if the status bar has been made invisible, and the stack
            // is collapsed. An expanded stack should remain visible until collapsed.
            mStackView.setTemporarilyInvisible(!visible && !isStackExpanded());
            ProtoLog.d(WM_SHELL_BUBBLES, "onStatusBarVisibilityChanged=%b stackExpanded=%b",
                    visible, isStackExpanded());
            mStackView.setTemporarilyInvisible(!visible && !isStackExpanded()
                    && !isSplitStatusBarImmersive);
            ProtoLog.d(WM_SHELL_BUBBLES,
                    "onStatusBarVisibilityChanged=%b stackExpanded=%b "
                            + "isSplitStatusBarImmersive=%b",
                    visible, isStackExpanded(), isSplitStatusBarImmersive);
        }
    }

+8 −0
Original line number Diff line number Diff line
@@ -1042,6 +1042,14 @@ public class SplitScreenController implements SplitDragPolicy.Starter,
        }
    }

    /**
     * Returns whether the status bar is in immersive mode.
     * @return true if the status bar is in immersive mode.
     */
    public boolean isStatusBarImmersive() {
        return mStageCoordinator.isStatusBarImmersive();
    }

    /**
     * Return the {@param exitReason} as a string.
     */
+3 −2
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ class SplitStatusBarHider(
        updateStatusBarBehavior(currentSplitState, leftRightSplit, isSplitVisible)
    }

    fun isStatusBarImmersive(): Boolean = statusBarImmersiveForSplit
    /**
     * Determines if we want to put the status bar in immersive mode or not based on
     * [currentSplitState], [isLeftRightSplit], and [isSplitVisible].
+8 −0
Original line number Diff line number Diff line
@@ -4532,6 +4532,14 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        }
    }

    /**
     * Returns whether the status bar is in immersive mode.
     * @return true if the status bar is in immersive mode.
     */
    public boolean isStatusBarImmersive() {
        return mStatusBarHider.isStatusBarImmersive();
    }

    @NeverCompile
    @Override
    public void dump(@NonNull PrintWriter pw, String prefix) {