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

Work runtime ktx 2.10.0 #250

Merged
merged 2 commits into from
Nov 20, 2024
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
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