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

Commit d153c4f6 authored by Chong Zhang's avatar Chong Zhang
Browse files

Fix flicker when releasing drag of divider

bug: 25564523
Change-Id: I9c19f40f27cc80b8e6e0e98a0d6455941bd624e7
parent b226c153
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5659,7 +5659,8 @@ public final class ViewRootImpl implements ViewParent,
        if (DEBUG_LAYOUT) Log.v(TAG, "Resizing " + this + ": frame=" + frame.toShortString()
                + " contentInsets=" + contentInsets.toShortString()
                + " visibleInsets=" + visibleInsets.toShortString()
                + " reportDraw=" + reportDraw);
                + " reportDraw=" + reportDraw
                + " backDropFrame=" + backDropFrame);

        // Tell all listeners that we are resizing the window so that the chrome can get
        // updated as fast as possible on a separate thread,
+9 −3
Original line number Diff line number Diff line
@@ -1886,10 +1886,16 @@ final class WindowState implements WindowManagerPolicy.WindowState {
            Configuration newConfig) throws RemoteException {
        DisplayInfo displayInfo = getDisplayInfo();
        mTmpRect.set(0, 0, displayInfo.logicalWidth, displayInfo.logicalHeight);
        boolean resizing = computeDragResizing();
        // When the task is docked, we send fullscreen sized backDropFrame as soon as resizing
        // start even if we haven't received the relayout window, so that the client requests
        // the relayout sooner. When dragging stops, backDropFrame needs to stay fullscreen
        // until the window to small size, otherwise the multithread renderer will shift last
        // one or more frame to wrong offset. So here we send fullscreen backdrop if either
        // isDragResizing() or isDragResizeChanged() is true.
        boolean resizing = isDragResizing() || isDragResizeChanged();
        final Rect backDropFrame = (inFreeformWorkspace() || !resizing) ? frame : mTmpRect;
        mClient.resized(frame, overscanInsets, contentInsets, visibleInsets, stableInsets,
                outsets, reportDraw, newConfig, inFreeformWorkspace() || !resizing
                         ? frame : mTmpRect);
                outsets, reportDraw, newConfig, backDropFrame);
    }

    public void registerFocusObserver(IWindowFocusObserver observer) {