Skip to content

Commit

Permalink
Merge pull request #250 from hannesa2/work-runtime-ktx-2.10.0
Browse files Browse the repository at this point in the history
Work runtime ktx 2.10.0
  • Loading branch information
hannesa2 authored Nov 20, 2024
2 parents d0a3b44 + b77da45 commit dcc457c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion githubAppUpdate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'com.google.code.gson:gson:2.11.0'
implementation "androidx.work:work-runtime-ktx:2.9.1"
implementation "androidx.work:work-runtime-ktx:2.10.0"

implementation "com.squareup.retrofit2:retrofit:2.11.0"
implementation "androidx.appcompat:appcompat:1.7.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.coroutineScope
import androidx.preference.PreferenceManager
import androidx.work.*
import info.hannes.github.model.Asset
import info.hannes.github.model.GithubVersion
import kotlinx.coroutines.Dispatchers
Expand All @@ -35,7 +34,7 @@ object AppUpdateHelper {
""
}

fun Context.getPackageInfo(): PackageInfo {
private fun Context.getPackageInfo(): PackageInfo {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
packageManager.getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(0))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DownloadWorker(private val appContext: Context, workerParams: WorkerParame
}

companion object {
fun run(context: Context, currentVersionName: String, repoUrl: String, repeatTime : Long, timeUnit: TimeUnit, token: String? = null): ListenableFuture<MutableList<WorkInfo>> {
fun run(context: Context, currentVersionName: String, repoUrl: String, repeatTime : Long, timeUnit: TimeUnit, token: String? = null): ListenableFuture<List<WorkInfo>> {
val data = workDataOf(
Pair(CURRENT_VERSION, currentVersionName),
Pair(REPO_URL, repoUrl),
Expand Down

0 comments on commit dcc457c

Please sign in to comment.