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

Commit b2aa9bef authored by Dmitrii Ishcheikin's avatar Dmitrii Ishcheikin Committed by Automerger Merge Worker
Browse files

Merge "Revert "Clean up alwaysConsumeSystemBars"" into udc-qpr-dev am: bd8a2265

parents ef382907 bd8a2265
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -432,7 +432,8 @@ public abstract class WallpaperService extends Service {
            @Override
            public void resized(ClientWindowFrames frames, boolean reportDraw,
                    MergedConfiguration mergedConfiguration, InsetsState insetsState,
                    boolean forceLayout, int displayId, int syncSeqId, boolean dragResizing) {
                    boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId,
                    int syncSeqId, boolean dragResizing) {
                Message msg = mCaller.obtainMessageIO(MSG_WINDOW_RESIZED,
                        reportDraw ? 1 : 0,
                        mergedConfiguration);
@@ -1286,9 +1287,9 @@ public abstract class WallpaperService extends Service {
                    visibleFrame.intersect(mInsetsState.getDisplayFrame());
                    WindowInsets windowInsets = mInsetsState.calculateInsets(visibleFrame,
                            null /* ignoringVisibilityState */, config.isScreenRound(),
                            mLayout.softInputMode, mLayout.flags, SYSTEM_UI_FLAG_VISIBLE,
                            mLayout.type, config.windowConfiguration.getWindowingMode(),
                            null /* idSideMap */);
                            false /* alwaysConsumeSystemBars */, mLayout.softInputMode,
                            mLayout.flags, SYSTEM_UI_FLAG_VISIBLE, mLayout.type,
                            config.windowConfiguration.getWindowingMode(), null /* idSideMap */);

                    if (!fixedSize) {
                        final Rect padding = mIWallpaperEngine.mDisplayPadding;
+2 −1
Original line number Diff line number Diff line
@@ -56,7 +56,8 @@ oneway interface IWindow {

    void resized(in ClientWindowFrames frames, boolean reportDraw,
            in MergedConfiguration newMergedConfiguration, in InsetsState insetsState,
            boolean forceLayout, int displayId, int syncSeqId, boolean dragResizing);
            boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId,
            int syncSeqId, boolean dragResizing);

    /**
     * Called when this window retrieved control over a specified set of insets sources.
+3 −1
Original line number Diff line number Diff line
@@ -737,8 +737,10 @@ interface IWindowManager

    /**
     * Called to get the expected window insets.
     *
     * @return {@code true} if system bars are always consumed.
     */
    void getWindowInsets(int displayId, in IBinder token, out InsetsState outInsetsState);
    boolean getWindowInsets(int displayId, in IBinder token, out InsetsState outInsetsState);

    /**
     * Returns a list of {@link android.view.DisplayInfo} for the logical display. This is not
+3 −2
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ import static android.view.InsetsState.ISIDE_LEFT;
import static android.view.InsetsState.ISIDE_RIGHT;
import static android.view.InsetsState.ISIDE_TOP;
import static android.view.WindowInsets.Type.ime;
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static android.view.inputmethod.ImeTracker.DEBUG_IME_VISIBILITY;
import static android.view.inputmethod.ImeTracker.TOKEN_NONE;
@@ -64,6 +63,7 @@ import android.view.InsetsState.InternalInsetsSide;
import android.view.SyncRtSurfaceTransactionApplier.SurfaceParams;
import android.view.WindowInsets.Type.InsetsType;
import android.view.WindowInsetsAnimation.Bounds;
import android.view.WindowManager.LayoutParams;
import android.view.animation.Interpolator;
import android.view.inputmethod.ImeTracker;

@@ -401,7 +401,8 @@ public class InsetsAnimationControlImpl implements InternalInsetsAnimationContro
    private Insets getInsetsFromState(InsetsState state, Rect frame,
            @Nullable @InternalInsetsSide SparseIntArray idSideMap) {
        return state.calculateInsets(frame, null /* ignoringVisibilityState */,
                false /* isScreenRound */, SOFT_INPUT_ADJUST_RESIZE /* legacySoftInputMode */,
                false /* isScreenRound */, false /* alwaysConsumeSystemBars */,
                LayoutParams.SOFT_INPUT_ADJUST_RESIZE /* legacySoftInputMode*/,
                0 /* legacyWindowFlags */, 0 /* legacySystemUiFlags */, TYPE_APPLICATION,
                WINDOWING_MODE_UNDEFINED, idSideMap).getInsets(mTypes);
    }
+10 −9
Original line number Diff line number Diff line
@@ -797,9 +797,9 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
            }

            WindowInsets insets = state.calculateInsets(mFrame, mState /* ignoringVisibilityState*/,
                    mLastInsets.isRound(), mLastLegacySoftInputMode, mLastLegacyWindowFlags,
                    mLastLegacySystemUiFlags, mWindowType, mLastWindowingMode,
                    null /* idSideMap */);
                    mLastInsets.isRound(), false /* alwaysConsumeSystemBars */,
                    mLastLegacySoftInputMode, mLastLegacyWindowFlags, mLastLegacySystemUiFlags,
                    mWindowType, mLastWindowingMode, null /* idSideMap */);
            mHost.dispatchWindowInsetsAnimationProgress(insets,
                    Collections.unmodifiableList(runningAnimations));
            if (DEBUG) {
@@ -954,20 +954,21 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
    }

    /**
     * @see InsetsState#calculateInsets(Rect, InsetsState, boolean, int, int, int, int, int,
     *      android.util.SparseIntArray)
     * @see InsetsState#calculateInsets(Rect, InsetsState, boolean, boolean, int, int, int, int,
     *      int, android.util.SparseIntArray)
     */
    @VisibleForTesting
    public WindowInsets calculateInsets(boolean isScreenRound, int windowType, int windowingMode,
            int legacySoftInputMode, int legacyWindowFlags, int legacySystemUiFlags) {
    public WindowInsets calculateInsets(boolean isScreenRound, boolean alwaysConsumeSystemBars,
            int windowType, int windowingMode, int legacySoftInputMode, int legacyWindowFlags,
            int legacySystemUiFlags) {
        mWindowType = windowType;
        mLastWindowingMode = windowingMode;
        mLastLegacySoftInputMode = legacySoftInputMode;
        mLastLegacyWindowFlags = legacyWindowFlags;
        mLastLegacySystemUiFlags = legacySystemUiFlags;
        mLastInsets = mState.calculateInsets(mFrame, null /* ignoringVisibilityState*/,
                isScreenRound, legacySoftInputMode, legacyWindowFlags, legacySystemUiFlags,
                windowType, windowingMode, null /* idSideMap */);
                isScreenRound, alwaysConsumeSystemBars, legacySoftInputMode, legacyWindowFlags,
                legacySystemUiFlags, windowType, windowingMode, null /* idSideMap */);
        return mLastInsets;
    }

Loading