AndroidMemoryPressure
Implementation of MemoryPressure for Android.
In the Android system, ComponentCallbacks2 is used to monitor memory pressure states. It notifies the memory pressure state based on the level parameter of ComponentCallbacks2.onTrimMemory.
| Android Trim Level | MemoryPressureLevel |
|:-------------------------------|:----------------------|
| TRIM_MEMORY_UI_HIDDEN | Low |
| TRIM_MEMORY_BACKGROUND | Low |
| TRIM_MEMORY_MODERATE | Low |
| TRIM_MEMORY_RUNNING_MODERATE | Low |
| TRIM_MEMORY_RUNNING_LOW | Low |
| TRIM_MEMORY_COMPLETE | Critical |
| TRIM_MEMORY_RUNNING_CRITICAL | Critical |
Content copied to clipboard
Types
Link copied to clipboard
Implementation of ComponentCallbacks2 for observing memory pressure.