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

Commit 16b93644 authored by Jeff Chang's avatar Jeff Chang Committed by Automerger Merge Worker
Browse files

Merge "Update the split layout while density changed" into udc-dev am:...

Merge "Update the split layout while density changed" into udc-dev am: c3662a31 am: 415ca03d am: 8eefd16c

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



Change-Id: I2b22c0d9dfd4339fc13184b8e8e69a886048f1b8
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 30168b35 8eefd16c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -717,6 +717,10 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
        return bounds.width() > bounds.height();
    }

    public boolean isDensityChanged(int densityDpi) {
        return mDensity != densityDpi;
    }

    /**
     * Return if this layout is landscape.
     */
+8 −0
Original line number Diff line number Diff line
@@ -2175,6 +2175,14 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
            return;
        }
        mDisplayLayout.set(mDisplayController.getDisplayLayout(displayId));

        if (mSplitLayout != null && mSplitLayout.isDensityChanged(newConfig.densityDpi)
                && mMainStage.isActive()
                && mSplitLayout.updateConfiguration(newConfig)
                && ENABLE_SHELL_TRANSITIONS) {
            mSplitLayout.update(null /* t */);
            onLayoutSizeChanged(mSplitLayout);
        }
    }

    void updateSurfaces(SurfaceControl.Transaction transaction) {