Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile with SDK 34 (Android 14) #948

Merged
merged 3 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,10 @@ class SgPreferencesFragment : BasePreferencesFragment(),
super.onActivityResult(requestCode, resultCode, data)
}

override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
if (key == null) {
return // Preferences were cleared, do nothing.
}
val pref: Preference? = findPreference(key)
if (pref != null) {
BackupManager(pref.context).dataChanged()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ class ShowsFragment : Fragment() {
override fun onSignInClicked() {
startActivity(Intent(requireActivity(), MoreOptionsActivity::class.java))
// Launching a top activity, adjust animation to match.
@Suppress("DEPRECATION") // just deprecated for predictive back
requireActivity().overridePendingTransition(
R.anim.activity_fade_enter_sg, R.anim.activity_fade_exit_sg
)
Expand Down Expand Up @@ -368,7 +369,7 @@ class ShowsFragment : Fragment() {
}

private val onPreferenceChangeListener =
OnSharedPreferenceChangeListener { _: SharedPreferences?, key: String ->
OnSharedPreferenceChangeListener { _: SharedPreferences?, key: String? ->
if (key == AdvancedSettings.KEY_UPCOMING_LIMIT) {
updateShowsQuery()
// refresh all list widgets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ abstract class BaseTopActivity : BaseMessageActivity() {
// Use a custom animation when navigating away from a top activity
// but not when exiting the app (use the default system animations).
if (!isTaskRoot) {
@Suppress("DEPRECATION") // just deprecated for predictive back
overridePendingTransition(
R.anim.activity_fade_enter_sg,
R.anim.activity_fade_exit_sg
Expand Down Expand Up @@ -126,6 +127,7 @@ abstract class BaseTopActivity : BaseMessageActivity() {
}
if (launchIntent != null) {
startActivity(launchIntent)
@Suppress("DEPRECATION") // just deprecated for predictive back
overridePendingTransition(R.anim.activity_fade_enter_sg, R.anim.activity_fade_exit_sg)
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
}

buildscript {
val sgCompileSdk by extra(33) // Android 13 (T)
val sgCompileSdk by extra(34) // Android 14 (U)
val sgMinSdk by extra(21) // Android 5 (L)
val sgTargetSdk by extra(33) // Android 13 (T)

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ truth = "com.google.truth:truth:1.1.5" # https://github.com/google/truth/release

[plugins]
# https://developer.android.com/build/releases/gradle-plugin
android = { id = "com.android.application", version = "8.1.0" }
android = { id = "com.android.application", version = "8.1.2" }
# https://kotlinlang.org/docs/releases.html#release-details
kotlin = { id = "org.jetbrains.kotlin.android", version = "1.8.22" }
# https://github.com/ben-manes/gradle-versions-plugin/releases
Expand Down