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

Skip to content
Commit 2e8d81ad authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

Improve default crops on tablet

The fix is pretty targeted: only for tablets (not foldable), only when
we're trying to figure out the crop on portrait.

This only applies when there are no suggested crops: on Pixel it will
mostly affect the default wallpaper.

The specs are:
 - first compute the crop on landscape (left-aligned)
 - if there is parallax, compute the crop without parallax
 - the crop on portrait is the largest crop with the same center as the
   computed crop on landscape.
 - add parallax to the portrait crop so that its virtual right-end (or
   left-end if RTL) is the same as the crop on landscape

I think this should work well on all cases (even if the full image is
not landscape).

Flag: ACONFIG com.android.window.flags.multi_crop TEAMFOOD
Bug: 266594282
Test: manual debug
Test: atest WallpaperCropperTest
Test: atest WallpaperManagerTest
Change-Id: I3a842a4dffd4e298ef364700706bd7f4682a75dc
parent 2c11e704
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment