Skip to content

Commit 8ed5609

Browse files
committed
Target SDK 35 and migrate deprecations
1 parent 7ace1d1 commit 8ed5609

File tree

5 files changed

+23
-13
lines changed

5 files changed

+23
-13
lines changed

app/src/main/java/org/fcitx/fcitx5/android/core/Fcitx.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,10 @@ class Fcitx(private val context: Context) : FcitxAPI, FcitxLifecycleOwner {
403403
val libraryNames = arrayListOf<String>()
404404
val libraryDependency = arrayListOf<Array<String>>()
405405
plugins.forEach {
406-
nativeLibDir.append(':')
407-
nativeLibDir.append(it.nativeLibraryDir)
406+
if (it.nativeLibraryDir.isNotBlank()) {
407+
nativeLibDir.append(':')
408+
nativeLibDir.append(it.nativeLibraryDir)
409+
}
408410
it.domain?.let { d ->
409411
extDomains.add(d)
410412
}

app/src/main/java/org/fcitx/fcitx5/android/core/data/DataManager.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ object DataManager {
183183
domain,
184184
description,
185185
hasService,
186-
info.versionName,
187-
info.applicationInfo.nativeLibraryDir,
186+
info.versionName ?: "",
187+
info.applicationInfo?.nativeLibraryDir ?: "",
188188
libraryDependency
189189
)
190190
)

app/src/main/java/org/fcitx/fcitx5/android/input/FcitxInputMethodService.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ class FcitxInputMethodService : LifecycleInputMethodService() {
150150
shouldUpdateNavbarForeground = true
151151
shouldUpdateNavbarBackground = false
152152
WindowCompat.setDecorFitsSystemWindows(w, false)
153+
/**
154+
* Why on earth does it deprecated? It says
155+
* https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-15.0.0_r3/core/java/android/view/Window.java#2720
156+
* "If the app targets VANILLA_ICE_CREAM or above, the color will be transparent and cannot be changed"
157+
* but actually not.
158+
*/
159+
@Suppress("DEPRECATION")
153160
w.navigationBarColor = Color.TRANSPARENT
154161
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
155162
// don't apply scrim to transparent navigation bar
@@ -479,6 +486,7 @@ class FcitxInputMethodService : LifecycleInputMethodService() {
479486
.isAppearanceLightNavigationBars = !theme.isDark
480487
}
481488
if (shouldUpdateNavbarBackground) {
489+
@Suppress("DEPRECATION")
482490
w.navigationBarColor = when (theme) {
483491
is Theme.Builtin -> if (keyBorder) theme.backgroundColor else theme.keyboardColor
484492
is Theme.Custom -> theme.backgroundColor

build-logic/convention/src/main/kotlin/Versions.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import org.gradle.api.JavaVersion
77
object Versions {
88

99
val java = JavaVersion.VERSION_11
10-
const val compileSdk = 34
10+
const val compileSdk = 35
1111
const val minSdk = 23
12-
const val targetSdk = 34
12+
const val targetSdk = 35
1313

1414
const val defaultCMake = "3.22.1"
1515
const val defaultNDK = "25.2.9519653"
16-
const val defaultBuildTools = "34.0.0"
16+
const val defaultBuildTools = "35.0.0"
1717

1818
// NOTE: increase this value to bump version code
1919
const val baseVersionCode = 7

gradle/libs.versions.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[versions]
2-
androidGradlePlugin = "8.7.0"
2+
androidGradlePlugin = "8.7.2"
33
androidDesugarJDKLibs = "2.1.2"
44
kotlin = "2.0.20"
55
ksp = "2.0.20-1.0.25"
6-
lifecycle = "2.8.6"
7-
navigation = "2.8.2"
6+
lifecycle = "2.8.7"
7+
navigation = "2.8.3"
88
room = "2.6.1"
99
splitties = "3.0.0"
1010
aboutlibraries = "11.2.3"
@@ -15,12 +15,12 @@ android-desugarJDKLibs = { group = "com.android.tools", name = "desugar_jdk_libs
1515
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
1616
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version = "1.9.0" }
1717
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.6.3" }
18-
androidx-activity = { module = "androidx.activity:activity-ktx", version = "1.9.2" }
18+
androidx-activity = { module = "androidx.activity:activity-ktx", version = "1.9.3" }
1919
androidx-appcompat = { module = "androidx.appcompat:appcompat", version = "1.7.0" }
2020
androidx-autofill = { module = "androidx.autofill:autofill", version = "1.1.0" }
21-
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version = "2.1.4" }
21+
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version = "2.2.0" }
2222
androidx-coordinatorlayout = { module = "androidx.coordinatorlayout:coordinatorlayout", version = "1.2.0" }
23-
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.13.1" }
23+
androidx-core-ktx = { module = "androidx.core:core-ktx", version = "1.15.0" }
2424
androidx-lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
2525
androidx-lifecycle-livedata = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle" }
2626
androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" }

0 commit comments

Comments
 (0)