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

Skip to content
Commit 3e988f0d authored by Hari Raj Vijayakumar's avatar Hari Raj Vijayakumar Committed by Dmitri Plotnikov
Browse files

Fix AlarmManager high CPU issue

- clampPositive assumes negative value is due to overflow and so sets
   to MAX_VALUE. However it also possible that negative value occurs
    due to addition of negative value(of higher magnitude) with positive
    of lower magnitude. In issue case, NTP sync causes RTC to move
    forward thus pushing whenElapsed to negative range. This means
    maxWhenElapsed would also be negative but is clamped to MAX_VALUE
    causing AlarmManager to go into infinite loop.

Bug: b/308389917
Test: manual
Change-Id: I946333b86b2658ec1b70cb1e3110f5eae1b81486
parent 3a4dedd8
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