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

Skip to content
Commit 40d3f397 authored by Lee Shombert's avatar Lee Shombert
Browse files

Small modifications to AnrTimer

This change has three small modifications to AnrTimer:

 1. In AnrTimer.start(), instead of testing if the timer exists before
    canceling it, just cancel it.  The cancel() method does the same
    test internally.  Starting a timer that is already running is a
    restart: keep a count.

 2. Remove an obsolete synchronization block around mTimerArgMap.  The
    code was left over from an older revision in which mTimerArgMap
    was static.

 3. Do not restart the ticker when a timer is canceled.  Starting the
    ticker is expensive and is inline with the cancel operation.  In
    normal operation the timer will not have to be restarted very
    often at all.

Test: atest
 * FrameworksServicesTests:AnrTimerTest

Flag: com.android.server.utils.anr_timer_service
Bug: 325594551
Change-Id: I929e51fec5fd433f4a636f372c39b3e9e2bc9b8f
parent e6e2ada8
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