Remove more code

This commit is contained in:
topjohnwu
2021-09-13 02:00:04 -07:00
parent abfec57972
commit b6298f8602
4 changed files with 0 additions and 26 deletions
@@ -2,7 +2,6 @@ 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.RepoJson
import com.topjohnwu.magisk.core.model.UpdateInfo
import okhttp3.ResponseBody
import retrofit2.http.*
@@ -23,10 +22,6 @@ interface GithubPageServices {
interface JSDelivrServices {
@GET("$MAGISK_FILES@{$REVISION}/snet")
@Streaming
suspend fun fetchSafetynet(@Path(REVISION) revision: String = Const.SNET_REVISION): ResponseBody
@GET("$MAGISK_FILES@{$REVISION}/bootctl")
@Streaming
suspend fun fetchBootctl(@Path(REVISION) revision: String = Const.BOOTCTL_REVISION): ResponseBody
@@ -41,9 +36,6 @@ interface RawServices {
@GET
suspend fun fetchCustomUpdate(@Url url: String): UpdateInfo
@GET
suspend fun fetchRepoInfo(@Url url: String): RepoJson
@GET
@Streaming
suspend fun fetchFile(@Url url: String): ResponseBody
@@ -62,4 +54,3 @@ interface GithubApiServices {
@Path(BRANCH) branch: String
): BranchInfo
}
@@ -6,7 +6,6 @@ import com.topjohnwu.magisk.core.Config.Value.CANARY_CHANNEL
import com.topjohnwu.magisk.core.Config.Value.CUSTOM_CHANNEL
import com.topjohnwu.magisk.core.Config.Value.DEFAULT_CHANNEL
import com.topjohnwu.magisk.core.Config.Value.STABLE_CHANNEL
import com.topjohnwu.magisk.core.Const
import com.topjohnwu.magisk.core.Info
import com.topjohnwu.magisk.data.network.*
import retrofit2.HttpException
@@ -59,13 +58,7 @@ class NetworkService(
}
}
// Modules related
suspend fun fetchRepoInfo(url: String = Const.Url.OFFICIAL_REPO) = safe {
raw.fetchRepoInfo(url)
}
// Fetch files
suspend fun fetchSafetynet() = wrap { jsd.fetchSafetynet() }
suspend fun fetchBootctl() = wrap { jsd.fetchBootctl() }
suspend fun fetchInstaller() = wrap {
val sha = fetchMainVersion()