Search in sources :

Example 1 with WindowManagerGlobal

use of android.view.WindowManagerGlobal in project android_frameworks_base by ParanoidAndroid.

the class ActivityThread method handleTrimMemory.

final void handleTrimMemory(int level) {
    if (DEBUG_MEMORY_TRIM)
        Slog.v(TAG, "Trimming memory to level: " + level);
    final WindowManagerGlobal windowManager = WindowManagerGlobal.getInstance();
    windowManager.startTrimMemory(level);
    ArrayList<ComponentCallbacks2> callbacks = collectComponentCallbacks(true, null);
    final int N = callbacks.size();
    for (int i = 0; i < N; i++) {
        callbacks.get(i).onTrimMemory(level);
    }
    windowManager.endTrimMemory();
}
Also used : WindowManagerGlobal(android.view.WindowManagerGlobal) ComponentCallbacks2(android.content.ComponentCallbacks2)

Aggregations

ComponentCallbacks2 (android.content.ComponentCallbacks2)1 WindowManagerGlobal (android.view.WindowManagerGlobal)1