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

Skip to content
Commit 43e54140 authored by Lee Shombert's avatar Lee Shombert
Browse files

Small reflow of the AnrTimer class

The AnrTimer class is now abstract and requires two methods when
instantiated with a type V.  The methods extract a Linux pid and uid
from an object of type V.  The public start() method, which used to
take an explicit pid and uid now computes the necessary pid/uid from
the supplied instance of V.

It is permitted to for the pid/uid methods to simply return 0, to
indicate that there is no value.

This change allows AnrTimer clients to compute pid/uid as necessary,
without storing the information in the AnTimer system itself.

Test: atest
 * FrameworksServicesTests:com.android.server.am
 * FrameworksMockingServicesTests:com.android.server.am
 * FrameworksServicesTests:AnrTimerTest

Flag: com.android.server.utils.anr_timer_service
Bug: 325594551

Change-Id: Ifc7779ce23d0884a7943b52d16aadc1419db96b7
parent 582b66b9
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