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
This commit is contained in:
shawnlin
2020-11-25 15:05:06 +08:00
parent 23a1669512
commit 4da861b614

View File

@@ -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