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

Commit 77ebe859 authored by Tiger Huang's avatar Tiger Huang Committed by Automerger Merge Worker
Browse files

Merge "Use the copy constructor to create simulated sources" into udc-dev am:...

Merge "Use the copy constructor to create simulated sources" into udc-dev am: 80ed45a7 am: 5b35ce69

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23487478



Change-Id: If9a90a65aa277f8e18874e7faddd7a470e1979f7
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 8d084e7f 5b35ce69
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -272,15 +272,17 @@ class InsetsSourceProvider {

    /** @return A new source computed by the specified window frame in the given display frames. */
    InsetsSource createSimulatedSource(DisplayFrames displayFrames, Rect frame) {
        // Don't copy visible frame because it might not be calculated in the provided display
        // frames and it is not significant for this usage.
        final InsetsSource source = new InsetsSource(mSource.getId(), mSource.getType());
        source.setVisible(mSource.isVisible());
        final InsetsSource source = new InsetsSource(mSource);
        mTmpRect.set(frame);
        if (mFrameProvider != null) {
            mFrameProvider.apply(displayFrames, mWindowContainer, mTmpRect);
        }
        source.setFrame(mTmpRect);

        // Don't copy visible frame because it might not be calculated in the provided display
        // frames and it is not significant for this usage.
        source.setVisibleFrame(null);

        return source;
    }