Add criticalLowMemory trace to LowMemDetector

Added a "criticalLowMemory" trace which tracks the duration of high
memory pressure state. When the native PSI monitor detects a memory PSI
event where the pressure state is ADJ_MEM_FACTOR_CRITICAL (highest
memory PSI level), we start tracing until the next PSI event is
detected.

Test: atest CtsAppTestCases:ActivityManagerTest
Bug: 306202359
Change-Id: I00acc9de180f3e65a9fe2cf84028a0c9eb66a008
1 file changed