Don't log an error if system wallpaper is applied to lock
Don't log an error if the lock image doesn't exist and the system image exists, since this is an intended behaviour. If the lockscreen was supposed to have an image but the image could not be backed up, we will see the error from the backup side. Adapt the test accordingly. Now, we only call either both restoreFromStage(FLAG_LOCK) and restoreFromStage(FLAG_SYSTEM), or call only restoreFromStage(FLAG_SYSTEM | FLAG_LOCK). Also, use this opportunity to make sure we only call file.exists() at most once, to reduce IO operations. Test: atest WallpaperBackupAgentTest Bug: 283091821 Change-Id: Ia19fcefc1676e8bd1fc0cf80c7a959c4d6f5839f
Loading
Please register or sign in to comment