Memory Pressure Monitor
System memory pressure observer for Android.
Listens to system ComponentCallbacks2.onTrimMemory events and maintains a state indicating whether the device is under critical memory pressure.
Functions
Link copied to clipboard
Checks if the device is currently under critical memory pressure.
Link copied to clipboard
Called by the OS on device configuration changes; not a memory signal, so a no-op here.
Link copied to clipboard
Called by the OS under severe memory pressure; always marks critical.
Link copied to clipboard
Called by the OS as memory pressure rises or falls; updates the critical flag accordingly.
Link copied to clipboard
Unregisters this monitor from the application Context.