Skip to content
Commit 7965f4d7 authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

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
parent 844c5aec
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