Skip to content

Commit

Permalink
Update compile sdk to 35.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Aug 28, 2024
1 parent a318747 commit 66ba704
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ internal actual fun SystemCallbacks(
* it be freed automatically by the garbage collector. If the [imageLoader] is freed, it unregisters
* its callbacks.
*/
@Suppress("DEPRECATION", "OVERRIDE_DEPRECATION")
internal class AndroidSystemCallbacks(
imageLoader: RealImageLoader,
) : SystemCallbacks, ComponentCallbacks2 {
Expand Down Expand Up @@ -55,8 +56,10 @@ internal class AndroidSystemCallbacks(
"trimMemory, level=$level"
}
if (level >= TRIM_MEMORY_BACKGROUND) {
// The app is in the background.
imageLoader.memoryCache?.clear()
} else if (level in TRIM_MEMORY_RUNNING_LOW until TRIM_MEMORY_UI_HIDDEN) {
} else if (level >= TRIM_MEMORY_RUNNING_LOW) {
// The app is in the foreground, but is running low on memory.
imageLoader.memoryCache?.apply { trimToSize(size / 2) }
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ org.jetbrains.compose.experimental.wasm.enabled=true

# Config
minSdk=21
targetSdk=34
compileSdk=34
targetSdk=35
compileSdk=35

# Maven
SONATYPE_HOST=DEFAULT
Expand Down

0 comments on commit 66ba704

Please sign in to comment.