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

Commit 4da861b6 authored by shawnlin's avatar shawnlin
Browse files

Image wallpaper is scaled to the cutout area when enable hide display cutout

Image wallpaper has a scale animation when entering launcher which make
the wallpaper scale to the cutout area.

Set window crop to prevent this

Bug: 174210114
Test: manual
      1. set image wallpaper
      2. enable hide display cutout
      3. back to launcher
Change-Id: Ie2edc5974dcf6efc9554d70732af46f650888fd4
parent 23a16695
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -272,8 +272,9 @@ class HideDisplayCutoutOrganizer extends DisplayAreaOrganizer {
    @VisibleForTesting
    void applyBoundsAndOffsets(WindowContainerToken token, SurfaceControl leash,
            WindowContainerTransaction wct, SurfaceControl.Transaction t) {
        wct.setBounds(token, mCurrentDisplayBounds.isEmpty() ? null : mCurrentDisplayBounds);
        wct.setBounds(token, mCurrentDisplayBounds);
        t.setPosition(leash, mOffsetX,  mOffsetY);
        t.setWindowCrop(leash, mCurrentDisplayBounds.width(), mCurrentDisplayBounds.height());
    }

    @VisibleForTesting