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

Skip to content
Commit 5761a0a0 authored by Steven Ng's avatar Steven Ng
Browse files

Use a static function to get wallpaper crop bounds

Previously, WallpaperManagerService initialized WallpaperCropUtils with the default display's settings. In multi-display setups, this resulted in WallpaperCropUtils being null for secondary displays, causing incorrect wallpaper positioning. To resolve this, this change eliminates the per-display initialization of WallpaperCropUtils. Instead, it reuses wallpaper cropping logic through a static function. Furthermore, deafult display data & utilities previously tied to WallpaperCropUtils have been moved to a WallpaperDefaultDisplayInfo.

Flag: EXEMPT a small refactoring to move utilities from a stateful class, WallpaperCropUtils.
Test: atest FrameworksMockingServicesTests:WallpaperManagerServiceTests, atest FrameworksMockingServicesTests:WallpaperCropperTest, atest FrameworksMockingServicesTests:WallpaperDisplayUtilsTest. Manually test wallpaper position in external displays.
Bug: 397605208
Change-Id: I2911380d21de477ed04e6dc6d9b048a55bb9b5ea
parent 62a6069f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment