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

Commit 34116940 authored by Lee Shombert's avatar Lee Shombert
Browse files

Connect the JobService timeout to AnrTimer

JobServiceContext now uses AnrTimer to timeout ANRs instead of a plain
MessageQueue.  There is one AnrTimer instance per JobServiceContext,
because each JobServiceContext has its own Handler.  This adds about
350 bytes to each JobServiceContext.

Timers created by JobServiceContext have a valid UID but a zero PID.
The PID is difficult to find and is not necessary at this time.

AnrTimer has been slightly simplified (it is no longer abstract) but
the changes do not affect any existing clients.  The native side no
longer generates an informational message when a timer is started with
a zero pid.

Tested with a manual build that induced a timeout

Flag: com.android.server.utils.anr_timer_job_service
Bug: 408440679
Test: atest
 * FrameworksMockingServicesTests_com_android_server_job

Change-Id: I0f80ce8b0939fc81eb67c13a8d0b279e4686c4ea
parent a88fe5ca
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