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

Commit a9b8fa27 authored by Tiger Huang's avatar Tiger Huang
Browse files

Remove redundant logic about System UI visibility

This CL removes
- mSeq
- System UI flags used to communicate between WMS and System UI
- redundant AIDL methods
- redundant fields and methods
- redundant tests
- PolicyControl

This CL also
- refines the format in DisplayPolicy#dump
- sends a boolean to InputManager to indicate if System UI is in a low
  profile mode instead of sending the legacy system UI visibility

Bug: 149813814
Fix: 169105126
Test: presubmit
Test: dumpsys window displays
Test: See if the layout of ImmersiveModeConfirmation is as expected
Change-Id: I8c8df509355bebc9b560af57d5458614557bcd2f
parent a7c40017
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -139,7 +139,6 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase

        final IntSupplier mViewVisibility;

        int mSeq;
        int mFrameNumber;
        int mFlags;

@@ -156,7 +155,7 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase
        void runBenchmark(BenchmarkState state) throws RemoteException {
            final IWindowSession session = WindowManagerGlobal.getWindowSession();
            while (state.keepRunning()) {
                session.relayout(mWindow, mSeq, mParams, mWidth, mHeight,
                session.relayout(mWindow, mParams, mWidth, mHeight,
                        mViewVisibility.getAsInt(), mFlags, mFrameNumber, mOutFrames,
                        mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState, mOutControls,
                        mOutSurfaceSize, mOutBlastSurfaceControl);
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ public class WindowAddRemovePerfTest extends WindowManagerPerfTestBase
                final InputChannel inputChannel = new InputChannel();

                long startTime = SystemClock.elapsedRealtimeNanos();
                session.addToDisplay(this, mSeq, mLayoutParams, View.VISIBLE,
                session.addToDisplay(this, mLayoutParams, View.VISIBLE,
                        Display.DEFAULT_DISPLAY, mOutFrame, mOutContentInsets, mOutStableInsets,
                        mOutDisplayCutout, inputChannel, mOutInsetsState, mOutControls);
                final long elapsedTimeNsOfAdd = SystemClock.elapsedRealtimeNanos() - startTime;
+2 −2
Original line number Diff line number Diff line
@@ -879,7 +879,7 @@ public abstract class WallpaperService extends Service {
                                com.android.internal.R.style.Animation_Wallpaper;
                        InputChannel inputChannel = new InputChannel();

                        if (mSession.addToDisplay(mWindow, mWindow.mSeq, mLayout, View.VISIBLE,
                        if (mSession.addToDisplay(mWindow, mLayout, View.VISIBLE,
                                mDisplay.getDisplayId(), mWinFrames.frame, mWinFrames.contentInsets,
                                mWinFrames.stableInsets, mWinFrames.displayCutout, inputChannel,
                                mInsetsState, mTempControls) < 0) {
@@ -903,7 +903,7 @@ public abstract class WallpaperService extends Service {
                    }

                    final int relayoutResult = mSession.relayout(
                        mWindow, mWindow.mSeq, mLayout, mWidth, mHeight,
                            mWindow, mLayout, mWidth, mHeight,
                            View.VISIBLE, 0, -1, mWinFrames, mMergedConfiguration, mSurfaceControl,
                            mInsetsState, mTempControls, mSurfaceSize, mTmpSurfaceControl);
                    if (mSurfaceControl.isValid()) {
+0 −6
Original line number Diff line number Diff line
@@ -119,12 +119,6 @@ oneway interface IWindow {
     */
    void updatePointerIcon(float x, float y);

    /**
     * System chrome visibility changes
     */
    void dispatchSystemUiVisibilityChanged(int seq, int globalVisibility,
            int localValue, int localChanges);

    /**
     * Called for non-application windows when the enter animation has completed.
     */
+0 −5
Original line number Diff line number Diff line
@@ -377,11 +377,6 @@ interface IWindowManager
     */
    boolean requestAssistScreenshot(IAssistDataReceiver receiver);

    /**
     * Called by the status bar to notify Views of changes to System UI visiblity.
     */
    oneway void statusBarVisibilityChanged(int displayId, int visibility);

    /**
     * Called by System UI to notify Window Manager to hide transient bars.
     */
Loading