mirror of
https://github.com/kalarina-bit/Sparkledns.git
synced 2026-11-22 07:36:09 +00:00
Free decoded app icons once the UI is hidden
The VPN service keeps the process alive in the background, and with it up to 256 icon bitmaps from the Apps tab.
This commit is contained in:
@@ -81,6 +81,8 @@ private class AppItem(val label: String, val packageName: String, val group: App
|
||||
// Decoded icons survive scrolling and tab switches instead of being rendered again every time
|
||||
private val IconCache = LruCache<String, ImageBitmap>(256)
|
||||
|
||||
internal fun clearAppIconCache() = IconCache.evictAll()
|
||||
|
||||
// Shown right away when the tab opens again, while the list is read anew in the background.
|
||||
// Only touched on the main thread.
|
||||
private var lastAppList: List<AppItem>? = null
|
||||
|
||||
Reference in New Issue
Block a user