Skip to content
Commit 59e7a219 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Wait for state refreshed in TileQueryHelper

When adding the stock tiles for TileAdapter, TileQueryHelper will set
them to listening for a brief period of time to refresh the state and
show the current state. It used to work because all the operations were
done in the background thread.

After switching the lifecycle logic to the main thread, there was a race
condition preventing the new state (between RESUMED and STARTED) to be
collected before it was copied.

This CL adds a class TileCollector that will wait until all tiles have
properly refreshed at least once before collecting their state.

Test: manual
Test: atest TileQueryHelperTest
Fixes: 168444501

Change-Id: I5f356ae4648e837cbe1bcdbaec9ba6d5b7c09891
parent 5f028c99
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment