diff --git a/githubAppUpdate/src/main/java/info/hannes/github/AppUpdateHelper.kt b/githubAppUpdate/src/main/java/info/hannes/github/AppUpdateHelper.kt index 648e5fb..9ebe15b 100644 --- a/githubAppUpdate/src/main/java/info/hannes/github/AppUpdateHelper.kt +++ b/githubAppUpdate/src/main/java/info/hannes/github/AppUpdateHelper.kt @@ -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 @@ -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 { diff --git a/githubAppUpdate/src/main/java/info/hannes/github/DownloadWorker.kt b/githubAppUpdate/src/main/java/info/hannes/github/DownloadWorker.kt index 05a4ec0..a780c52 100644 --- a/githubAppUpdate/src/main/java/info/hannes/github/DownloadWorker.kt +++ b/githubAppUpdate/src/main/java/info/hannes/github/DownloadWorker.kt @@ -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> { + fun run(context: Context, currentVersionName: String, repoUrl: String, repeatTime : Long, timeUnit: TimeUnit, token: String? = null): ListenableFuture> { val data = workDataOf( Pair(CURRENT_VERSION, currentVersionName), Pair(REPO_URL, repoUrl),