1 package com.android.systemui.utils
2 
3 import android.graphics.HardwareRenderer.CacheTrimLevel
4 import android.view.WindowManagerGlobal
5 import javax.inject.Inject
6 
7 /** Interface to talk to [WindowManagerGlobal] */
8 class GlobalWindowManager @Inject constructor() {
9     /**
10      * Sends a trim memory command to [WindowManagerGlobal].
11      *
12      * @param level One of levels from [ComponentCallbacks2] starting with TRIM_
13      */
trimMemorynull14     fun trimMemory(level: Int) {
15         WindowManagerGlobal.getInstance().trimMemory(level)
16     }
17 
18     /** Sends a trim caches command to [WindowManagerGlobal]. */
trimCachesnull19     fun trimCaches(@CacheTrimLevel level: Int) {
20         WindowManagerGlobal.getInstance().trimCaches(level)
21     }
22 }
23