summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Fabián Kozynski <kozynski@google.com> 2024-01-24 11:43:17 -0500
committer Fabián Kozynski <kozynski@google.com> 2024-01-24 16:32:57 -0500
commitd906f856af3fe285815f8c3d515b7b9c5baa08bf (patch)
tree7e68c2ce0b5e8c2ca744646d17ba7bedd636b0fa /libs/androidfw/FileStream.cpp
parent2791d50e30694e22858abdc66daa0163a0094f14 (diff)
Fix icon update race condition
When the icon is set in QSIconViewImpl there are two different paths that could be followed: * If the `State.state` changes (and then the tint of the icon should change), we animate the color of the existing icon, and only set the new icon when the animation is finished. * If the `State.state` didn't change, we immediately set the new icon. Therefore, if two calls to change the state come in short succession, it could happen that the icon for the first call is set after the one for the second call (because it was set at the end of an animation). If that is the case, with this fix, we ignore the schedule icon change at the end of the animation if another icon has been set in the meantime. Test: atest QSIconViewImplTest_311121830 Test: manual, turn APM on and off multiple times with QS open Fixes: 311121830 Fixes: 293524288 Flag: None Change-Id: Id150f36d10c374f30e72d658bd833e4eae7677b4
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions