diff options
| author | 2025-02-27 10:57:21 +0000 | |
|---|---|---|
| committer | 2025-03-06 09:25:03 +0000 | |
| commit | 5761a0a0c01c03a6e0efc934f8e236d506fc940e (patch) | |
| tree | 78c044b0e78dd93e89a3115875fadcb268d8ec58 /libs/androidfw/StringPool.cpp | |
| parent | 62a6069fa8f3f3bbedea1ca515259461bbb09812 (diff) | |
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions