Set WallpaperData flag in constructor
This mWhich field was really meant to be set in the WallpaperData constructor. Otherwise, calling bindWallpaperComponentLocked(new WallpaperData(..., FLAG_LOCK)) will actually try to set the wallpaper on system only (since the which flag will be 0), causing all sorts of problems. This happens when trying to temporarily bind a fallback wallpaper after a reboot, in case the home+lock wallpaper is not direct-boot aware. Take this opportunity to remove the old WallpaperData constructor (this does not change any logic, and the old constructor was only used in a test), and add a test for the new constructor. Bug: 286197596 Test: manually verify that the bug is fixed Test: atest WallpaperManagerTest Change-Id: Ic55a1d894134405bb325aba04eb42aaca9a1a318
Loading
Please register or sign in to comment