diff options
| author | 2023-11-15 14:27:50 +0000 | |
|---|---|---|
| committer | 2023-11-16 15:59:44 +0000 | |
| commit | a7dd276c14a94ac105c81bab215233233ab8a16d (patch) | |
| tree | fc35c1da058730196b83d1995abe11823a6ab37e /libs/androidfw/FileStream.cpp | |
| parent | 845d3abce54576e192a5831163576c3230c76cc6 (diff) | |
Deflake wallpaper color events
The main changes are:
  - do not get fetch the "wallpaper.mWhich" flag in advance before
    computing the color. Notify the with "wallpaper.mWhich" once the
    colors are computed. This way, we won't send colors for an outdated
    which flag if there is a migrattion while the colors are processed
  - do not send any color event for the old wallpaper if the wallpaper
    changes while the colors are computed
  - do not send color events for the fallback wallpaper if another
    wallpaper is changed.
This avoids some race conditions when wallpapers are set quickly with a
script (like in our tests).
Flag: NONE
Test: atest WallpaperManagerTest --iterations 100
Test: (note: those two tests is the sequence that caused failures in b/308757171) atest WallpaperManagerTest#setResource_homeScreen_homeLive_lockScreenUnset_setsLockToHomeAndUpdatesHome WallpaperManagerTest#invokeOnColorsChangedListenerTest_systemOnly --iterations 1000
Bug: 308757171
Change-Id: I5d38ef84ab5088a227b1b39f06296113fb6dea9c
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions