OnTrimMemoryProvider

Interface for components that can dispatch calls from ComponentCallbacks2.onTrimMemory.

Functions

Link copied to clipboard
abstract fun addOnTrimMemoryListener(listener: Consumer<Int>)

Add a new listener that will get a callback associated with ComponentCallbacks2.onTrimMemory with the int representing the level of trimming.

Link copied to clipboard
abstract fun removeOnTrimMemoryListener(listener: Consumer<Int>)

Remove a previously added listener. It will not receive any future callbacks.