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

Commit 9f54bd92 authored by Jorge Gil's avatar Jorge Gil Committed by Android (Google) Code Review
Browse files

Merge "Revert^2 "Remove docked task drag resizing mode""

parents 735482ae 257f72fe
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -249,11 +249,6 @@ interface IActivityTaskManager {
    /** Returns an interface enabling the management of window organizers. */
    IWindowOrganizerController getWindowOrganizerController();

    /**
     * Sets whether we are currently in an interactive split screen resize operation where we
     * are changing the docked stack size.
     */
    void setSplitScreenResizing(boolean resizing);
    boolean supportsLocalVoiceInteraction();

    // Get device configuration
+1 −1
Original line number Diff line number Diff line
@@ -394,7 +394,7 @@ public abstract class WallpaperService extends Service {
            public void resized(ClientWindowFrames frames, boolean reportDraw,
                    MergedConfiguration mergedConfiguration, InsetsState insetsState,
                    boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId,
                    int syncSeqId, int resizeMode) {
                    int syncSeqId, boolean dragResizing) {
                Message msg = mCaller.obtainMessageIO(MSG_WINDOW_RESIZED,
                        reportDraw ? 1 : 0,
                        mergedConfiguration);
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ oneway interface IWindow {
    void resized(in ClientWindowFrames frames, boolean reportDraw,
            in MergedConfiguration newMergedConfiguration, in InsetsState insetsState,
            boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId,
            int syncSeqId, int resizeMode);
            int syncSeqId, boolean dragResizing);

    /**
     * Called when this window retrieved control over a specified set of insets sources.
+0 −6
Original line number Diff line number Diff line
@@ -456,12 +456,6 @@ interface IWindowManager
    @UnsupportedAppUsage
    int getDockedStackSide();

    /**
     * Sets the region the user can touch the divider. This region will be excluded from the region
     * which is used to cause a focus switch when dispatching touch.
     */
    void setDockedTaskDividerTouchRegion(in Rect touchableRegion);

    /**
     * Registers a listener that will be called when the pinned task state changes.
     */
+11 −16
Original line number Diff line number Diff line
@@ -51,8 +51,6 @@ import static android.view.ViewRootImplProto.WIDTH;
import static android.view.ViewRootImplProto.WINDOW_ATTRIBUTES;
import static android.view.ViewRootImplProto.WIN_FRAME;
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_REGION;
import static android.view.WindowCallbacks.RESIZE_MODE_FREEFORM;
import static android.view.WindowCallbacks.RESIZE_MODE_INVALID;
import static android.view.WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS;
import static android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS;
import static android.view.WindowInsetsController.APPEARANCE_LOW_PROFILE_BARS;
@@ -515,7 +513,6 @@ public final class ViewRootImpl implements ViewParent,
    private boolean mPendingDragResizing;
    private boolean mDragResizing;
    private boolean mInvalidateRootRequested;
    private int mResizeMode = RESIZE_MODE_INVALID;
    private int mCanvasOffsetX;
    private int mCanvasOffsetY;
    private boolean mActivityRelaunched;
@@ -1806,7 +1803,7 @@ public final class ViewRootImpl implements ViewParent,
        CompatibilityInfo.applyOverrideScaleIfNeeded(mergedConfiguration);
        final boolean forceNextWindowRelayout = args.argi1 != 0;
        final int displayId = args.argi3;
        final int resizeMode = args.argi5;
        final boolean dragResizing = args.argi5 != 0;

        final Rect frame = frames.frame;
        final Rect displayFrame = frames.displayFrame;
@@ -1822,16 +1819,14 @@ public final class ViewRootImpl implements ViewParent,
        final boolean attachedFrameChanged = LOCAL_LAYOUT
                && !Objects.equals(mTmpFrames.attachedFrame, attachedFrame);
        final boolean displayChanged = mDisplay.getDisplayId() != displayId;
        final boolean resizeModeChanged = mResizeMode != resizeMode;
        final boolean compatScaleChanged = mTmpFrames.compatScale != compatScale;
        if (msg == MSG_RESIZED && !frameChanged && !configChanged && !attachedFrameChanged
                && !displayChanged && !resizeModeChanged && !forceNextWindowRelayout
                && !displayChanged && !forceNextWindowRelayout
                && !compatScaleChanged) {
            return;
        }

        mPendingDragResizing = resizeMode != RESIZE_MODE_INVALID;
        mResizeMode = resizeMode;
        mPendingDragResizing = dragResizing;
        mTmpFrames.compatScale = compatScale;
        mInvCompatScale = 1f / compatScale;

@@ -3028,7 +3023,7 @@ public final class ViewRootImpl implements ViewParent,
                        frame.width() < desiredWindowWidth && frame.width() != mWidth)
                || (lp.height == ViewGroup.LayoutParams.WRAP_CONTENT &&
                        frame.height() < desiredWindowHeight && frame.height() != mHeight));
        windowShouldResize |= mDragResizing && mResizeMode == RESIZE_MODE_FREEFORM;
        windowShouldResize |= mDragResizing && mPendingDragResizing;

        // If the activity was just relaunched, it might have unfrozen the task bounds (while
        // relaunching), so we need to force a call into window manager to pick up the latest
@@ -3275,7 +3270,7 @@ public final class ViewRootImpl implements ViewParent,
                                        && mWinFrame.height() == mPendingBackDropFrame.height();
                        // TODO: Need cutout?
                        startDragResizing(mPendingBackDropFrame, !backdropSizeMatchesFrame,
                                mAttachInfo.mContentInsets, mAttachInfo.mStableInsets, mResizeMode);
                                mAttachInfo.mContentInsets, mAttachInfo.mStableInsets);
                    } else {
                        // We shouldn't come here, but if we come we should end the resize.
                        endDragResizing();
@@ -8841,7 +8836,7 @@ public final class ViewRootImpl implements ViewParent,
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    private void dispatchResized(ClientWindowFrames frames, boolean reportDraw,
            MergedConfiguration mergedConfiguration, InsetsState insetsState, boolean forceLayout,
            boolean alwaysConsumeSystemBars, int displayId, int syncSeqId, int resizeMode) {
            boolean alwaysConsumeSystemBars, int displayId, int syncSeqId, boolean dragResizing) {
        Message msg = mHandler.obtainMessage(reportDraw ? MSG_RESIZED_REPORT : MSG_RESIZED);
        SomeArgs args = SomeArgs.obtain();
        final boolean sameProcessCall = (Binder.getCallingPid() == android.os.Process.myPid());
@@ -8863,7 +8858,7 @@ public final class ViewRootImpl implements ViewParent,
        args.argi2 = alwaysConsumeSystemBars ? 1 : 0;
        args.argi3 = displayId;
        args.argi4 = syncSeqId;
        args.argi5 = resizeMode;
        args.argi5 = dragResizing ? 1 : 0;

        msg.obj = args;
        mHandler.sendMessage(msg);
@@ -10255,11 +10250,11 @@ public final class ViewRootImpl implements ViewParent,
        public void resized(ClientWindowFrames frames, boolean reportDraw,
                MergedConfiguration mergedConfiguration, InsetsState insetsState,
                boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId, int syncSeqId,
                int resizeMode) {
                boolean dragResizing) {
            final ViewRootImpl viewAncestor = mViewAncestor.get();
            if (viewAncestor != null) {
                viewAncestor.dispatchResized(frames, reportDraw, mergedConfiguration, insetsState,
                        forceLayout, alwaysConsumeSystemBars, displayId, syncSeqId, resizeMode);
                        forceLayout, alwaysConsumeSystemBars, displayId, syncSeqId, dragResizing);
            }
        }

@@ -10464,13 +10459,13 @@ public final class ViewRootImpl implements ViewParent,
     * Start a drag resizing which will inform all listeners that a window resize is taking place.
     */
    private void startDragResizing(Rect initialBounds, boolean fullscreen, Rect systemInsets,
            Rect stableInsets, int resizeMode) {
            Rect stableInsets) {
        if (!mDragResizing) {
            mDragResizing = true;
            if (mUseMTRenderer) {
                for (int i = mWindowCallbacks.size() - 1; i >= 0; i--) {
                    mWindowCallbacks.get(i).onWindowDragResizeStart(
                            initialBounds, fullscreen, systemInsets, stableInsets, resizeMode);
                            initialBounds, fullscreen, systemInsets, stableInsets);
                }
            }
            mFullRedrawNeeded = true;
Loading