Update bootctl

Close #5134
This commit is contained in:
topjohnwu
2022-01-13 02:24:02 -08:00
parent 21505a7470
commit 9c93fe6003
7 changed files with 35 additions and 12 deletions
@@ -1,6 +1,5 @@
package com.topjohnwu.magisk.data.network
import com.topjohnwu.magisk.core.Const
import com.topjohnwu.magisk.core.model.BranchInfo
import com.topjohnwu.magisk.core.model.UpdateInfo
import okhttp3.ResponseBody
@@ -11,7 +10,6 @@ private const val BRANCH = "branch"
private const val REPO = "repo"
private const val FILE = "file"
const val MAGISK_FILES = "topjohnwu/magisk-files"
const val MAGISK_MAIN = "topjohnwu/Magisk"
interface GithubPageServices {
@@ -22,10 +20,6 @@ interface GithubPageServices {
interface JSDelivrServices {
@GET("$MAGISK_FILES@{$REVISION}/bootctl")
@Streaming
suspend fun fetchBootctl(@Path(REVISION) revision: String = Const.BOOTCTL_REVISION): ResponseBody
@GET("$MAGISK_MAIN@{$REVISION}/scripts/module_installer.sh")
@Streaming
suspend fun fetchInstaller(@Path(REVISION) revision: String): ResponseBody
@@ -59,7 +59,6 @@ class NetworkService(
}
// Fetch files
suspend fun fetchBootctl() = wrap { jsd.fetchBootctl() }
suspend fun fetchInstaller() = wrap {
val sha = fetchMainVersion()
jsd.fetchInstaller(sha)