Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[M116] wallpaper: safer saving policy/custom wallpaper
There is a race condition when first logging in between reading and saving wallpaper policy image. If the stars align, the login sequence that reads policy-controlled.jpeg will get a partial read while the sequence that refreshes policy wallpaper is re-saving it. Mitigate this by writing wallpaper data to a tmp file and then moving it to the desired location. (cherry picked from commit 35d9156) Bug: b:280578317 Test: ash_unittests --gtest_filter=*WallpaperController* Change-Id: If78ba85e0ebb7cb8bfab99f90a9deaa3a19da579 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4628564 Commit-Queue: Jeffrey Young <cowmoo@google.com> Reviewed-by: Xiaohui Chen <xiaohuic@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1160809} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4651446 Cr-Commit-Position: refs/branch-heads/5845@{#196} Cr-Branched-From: 5a5dff6-refs/heads/main@{#1160321}
- Loading branch information