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

Skip to content
Commit 05b60e21 authored by Lee Shombert's avatar Lee Shombert
Browse files

Put AnrTimer behind a feature flag

Add the trunk-stable flag anr_timer_service_enabled that gates the
AnrTimer feature.  If the feature is disabled, the AnrTimer external
methods short-circuit and provide the basic message handler behaviors
of sendMessageDelayed() and removeMessages().

The AnrTimer class can take the flag value from an Injector; this is
used in the unit test so that AnrTimer can be tested even when the
flag is disabled in the build.

The notion of a soft delivery timeout is reinstated in
BroadcastQueueModernImpl.  AnrTimer handles this internally but the
stubbed class (with the feature disabled) cannot handle it internally.

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

Bug: 282428924

Change-Id: I5c9e03543539e66a0b84df4eb0de66588ffc6e8b
parent 576786cf
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