New Executor implementaiton for SystemUI.
The implementation is DelayableExecutor. It looks and feels a lot like a Handler (it is currently powered by a Handler under the covers). Developers can now as for an Executor to be injected. By default, this injects the "Background" Executor, but they can also ask for the @Main or @Background Executor explicitly. A FakeExecutor implementation is provided that implements a synchronous version of DelayableExecutor. It can be configured to run everything passed to it immediately, or can queue items to run in a controlled, precise manner. The new Executor is substituted into one place - TileQueryHelper -in place of Handlers as a demonstration of its use. The test for TileQueryHelper no longer requires the @RunWithLooper annotation as a result. Bug: 145135056 Test: atest SystemUITests Change-Id: I76a8a9b2efa4c49e9b06492aca5b336726dc380e
Loading
Please register or sign in to comment