Always return the system default wallpaper with openDefaultWallpaper
This change is gated by flag. If the lockscreen live wallpaper flag is enabled, never return null with openDefaultWallpaper, otherwise the operation clear(FLAG_LOCK) is compromised. clear will delete the cropFile and create an ImageWallpaper engine, without recreating any crop file. The ImageWallpaper engine will then call getBitmap which returns the cropFile, or, if it does not exist, a bitmap from openDefaultWallpaper. Thus our fallback defense with clear relies on the fact openDefaultWallpaper returns something, which was not the case with FLAG_LOCK Test: manual debugging (call clear(LOCK) by setting wallpapers) Bug: 277098137 Change-Id: Id5b8ce84ceb976e143e4da914f08c99b8c8ff835
Loading
Please register or sign in to comment