Fix getHistoricalProcessStartReasons ordering
Ordering is currently done with launch timestamp, however, this is set to monotonic time since boot which can cause an ordering issue with persisted records after a reboot. To fix this, introduce a private created timestamp set to monotonic time that persists across reboots, thereby ensuring that records remain ordered by time they were added across reboots and time changes. Test: Start device, let run for a bit, trigger a record, wait for persist, reboot, trigger another record, check and confirm ordering is correct by making sure they're ordered greatest to lowest by created time and that timestamp 0 is not ordered. Test: run new tests Bug: 360299551 Flag: EXEMPT - bugfix Change-Id: I45cbae99c6e6848498ba0c668bead099042948ce
Loading
Please register or sign in to comment