Loading
Allow for replaceable clock within Looper
Handler, Looper, and MessageQueue are all difficult to test since their internal implementations implicitly rely on the system clock. By making their clock replaceable in tests, we can make their behavior more deterministic, allowing for less flaky tests overall. Also, update TestLooper to take advantage of the replaceable clock. Bug: 184781936 Test: atest LooperTest MessageQueueTest HandlerTest Change-Id: I215d2eab99888a162175c37157d7be2be911b96d