OSDN Git Service

Fix qs tiles disappearing when leaving edit
authorEvan Laird <evanlaird@google.com>
Tue, 28 Feb 2017 22:27:04 +0000 (17:27 -0500)
committerEvan Laird <evanlaird@google.com>
Fri, 3 Mar 2017 15:34:36 +0000 (10:34 -0500)
commit6b28473635e5c9550b7a57c7ec23e60ed9185b2b
tree0ccd1863578361342bfe3646f3a3d53f8b18ffe6
parent596ec855c369b652194f20c198cc8e00d9aadfe0
Fix qs tiles disappearing when leaving edit

On presenting the customizer view to edit quick settings tiles, the
tiles were fetched in background threads (2 different ones). If the user
then managed to dismiss the view too quickly, a save would occur before
all tiles were loaded and they would disappear. This change coerces
tiles to load on the same background thread and allows the customizer
view to know when that operation is complete. Thus, it can save only
when it knows that all possible tiles were loaded.

Fixes:35556395
Test: runtest -x SystemUI/tests/src/com/android/systemui/qs/customize/TileQueryHelperTest.java
Change-Id: Ie232d3c28645d38aad97a8763b7418e6b044b5cc
packages/SystemUI/src/com/android/systemui/qs/QSTile.java
packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
packages/SystemUI/tests/src/com/android/systemui/qs/customize/TileQueryHelperTest.java [new file with mode: 0644]