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

Skip to content
Commit d90dd503 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: Ie12d5125f1feeeb1a5dd661a744f86d00796d126
Merged-In: I946333b86b2658ec1b70cb1e3110f5eae1b81486
parent 47a3e1b8
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