Skip to content
Commit afed0351 authored by Ned Burns's avatar Ned Burns
Browse files

Implement message handling in ExecutorImpl

Previously, we were posting runnables to the queue but never doing
anything when their messages came due.

 - Implements message handling (in onHandleMessage).
 - Inlines HandlerExecutor superclass. It was only offering one, very
   simple, method and the required super() call was awkward.
 - Changes ExecutorImpl to take in a Looper instead of a Handler; we
   construct the Handler for ourselves.
 - Changes ExecutorImpl to be a singleton per-looper (since we're
   constructing a new Handler each time).
 - Changes our token to be an instance of ExecutionToken. This serves as
   wrapper around the Runnable that we need to run and itself serves as
   cancellation token that can be returned to the caller of
   executeDelayed() etc.i

Test: manual
Change-Id: Ia986d48c675a794c6f16dca6a82cb8cbd4010741
parent b4632bca
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