Skip to content

Commit

Permalink
actions: less warnings is more (fixes #3671) (#3672)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
ewhang5 and dogi authored Jun 25, 2024
1 parent e7a55fe commit b22ef29
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ android {
defaultConfig {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1616
versionName "0.16.16"
targetSdkVersion 34
versionCode 1617
versionName "0.16.17"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
14 changes: 10 additions & 4 deletions app/src/main/java/org/ole/planet/myplanet/ui/sync/LoginActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.ole.planet.myplanet.ui.sync
import android.content.*
import android.graphics.drawable.AnimationDrawable
import android.os.*
import android.os.Build.VERSION_CODES.TIRAMISU
import android.text.*
import android.view.*
import android.view.inputmethod.EditorInfo
Expand Down Expand Up @@ -60,10 +61,15 @@ class LoginActivity : SyncActivity(), TeamListAdapter.OnItemClickListener {
if (forceSync) {
isSync = false
}
if (intent.hasExtra("versionInfo")) {
onUpdateAvailable((intent.getSerializableExtra("versionInfo") as MyPlanet?),
intent.getBooleanExtra("cancelable", false)
)
val versionInfo = if (Build.VERSION.SDK_INT >= TIRAMISU) {
intent.getSerializableExtra("versionInfo", MyPlanet::class.java)
} else {
@Suppress("DEPRECATION")
intent.getSerializableExtra("versionInfo") as? MyPlanet
}

if (versionInfo != null) {
onUpdateAvailable(versionInfo, intent.getBooleanExtra("cancelable", false))
} else {
service.checkVersion(this, settings)
}
Expand Down

0 comments on commit b22ef29

Please sign in to comment.