82bcb2a43449caedc18a300f2dd2a7bc81541602
QSTileHost had three problems that caused a race condition:
* Calls to add/remove tiles could come and be executed in any thread.
* Different paths to add/remove tiles used different ground truths on
what tiles were currently active.
* The list of tiles contained in mTileSpecs was not necessarily the
same as the visible tiles.
This caused the following problem:
* If two tiles (usually CustomTile) were removed roughly at the same
time, only one of them would actually be removed from the Setting, as
both of them would race to remove from the same list. This caused...
* There would be leftover tiles that cannot connect to a TileService
and therefore show empty UI.
The solution is as follows:
* Make sure that all operations that modify the tiles are performed in
the main thread.
* Make sure that all operations that modify the tiles use the same
truth for the current state.
* Make sure that mTileSpecs always reflects the setting at the end of
onTuningChanged. This means that tiles that are destroyed or removed
will never be in this list.
Test: atest com.android.systemui.qs
Test: manual, start Guest user and notice that there are no blank tiles.
Fixes: 235561921
Change-Id: I6ffbb7510e6854f18bc427d1ae1e782918c799dc
Merged-In: I6ffbb7510e6854f18bc427d1ae1e782918c799dc
(cherry picked from commit 7f2bb15f4e)
(cherry picked from commit 2d3949485591a31a90e7abec5ac7a3dc8597072a)
Merged-In: I6ffbb7510e6854f18bc427d1ae1e782918c799dc
Merge "Fix ZipFilePerfTest issues by closing the file in each loop iteration." am:
90c3935195 am: 9c051367f8 am: 4c2143df58 am: 10eceff1b1 am: b90b509fc7
…
…
…
…
…
…
…
…
Merge "Remove unused empty filegroups from frameworks/base." am:
5ee9c55130 am: 76e9b955c5 am: 735d0192f6
…
…
Description
No description provided
Languages
Java
73.7%
Kotlin
14%
PowerBuilder
5.8%
C++
5.2%
AIDL
1%