Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2371010f authored by Lee Shombert's avatar Lee Shombert
Browse files

Abstract clock functions in AnrTimerService

This abstracts the notion of "clock", as used by the native
AnrTimerService.  A Clock object has attributes of current time and
alarm time and a method to wait until the current time is greater than
or equal to the alarm time.

This is the groundwork for creating ain injectable clock for testing.

Production timers use a singleton clock that is based on the OS clock
and timerfd routimes.

There is no behavioral change in this CL.

Flag: EXEMPT refactor
Bug: 407584606
Test: atest
 * FrameworksServicesTests:AnrTimerTest
 * FrameworksServicesTests:com.android.server.am
 * FrameworksMockingServicesTests:com.android.server.am
Change-Id: Ia150b776325ad596ba55b8af738e4383b38316af
parent 7884618a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment