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

Replace WallpaperData File fields with methods

WallpaperData objects do not need to store File objects directly. There
are 4 wallpaper files per user, and since File objects are immutable in
java we can keep a global reference of them. WallpaperData objects can
retrieve the right files using their mWhich and userId fields.

Doing so prevents ending up in weird states, e.g. if the mWhich flag
changes but not the wallpaperFile or cropFile.

Test: atest WallpaperManagerTest
Test: atest WallpaperManagerServiceTests
Bug: 286909680
Change-Id: I4cf9fc6311238d94213c4af3c6fb8beed9fc9023
parent 66f3f48e
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