diff --git a/app/src/main/java/com/topjohnwu/magisk/core/Const.kt b/app/src/main/java/com/topjohnwu/magisk/core/Const.kt index edd10c3f5..3e6444fe0 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/Const.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/Const.kt @@ -21,8 +21,6 @@ object Const { const val MAGISK_LOG = "/cache/magisk.log" // Versions - const val SNET_EXT_VER = 17 - const val SNET_REVISION = "23.0" const val BOOTCTL_REVISION = "22.0" // Misc @@ -59,7 +57,6 @@ object Const { const val GITHUB_API_URL = "https://api.github.com/" const val GITHUB_PAGE_URL = "https://topjohnwu.github.io/magisk-files/" const val JS_DELIVR_URL = "https://cdn.jsdelivr.net/gh/" - const val OFFICIAL_REPO = "https://magisk-modules-repo.github.io/submission/modules.json" } object Key { diff --git a/app/src/main/java/com/topjohnwu/magisk/core/model/UpdateInfo.kt b/app/src/main/java/com/topjohnwu/magisk/core/model/UpdateInfo.kt index 1f85d2a54..bbfea49c1 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/model/UpdateInfo.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/model/UpdateInfo.kt @@ -35,13 +35,6 @@ data class ModuleJson( val notes_url: String ) -@JsonClass(generateAdapter = true) -data class RepoJson( - val name: String, - val last_update: Long, - val modules: List -) - @JsonClass(generateAdapter = true) data class CommitInfo( val sha: String diff --git a/app/src/main/java/com/topjohnwu/magisk/data/network/NetworkServices.kt b/app/src/main/java/com/topjohnwu/magisk/data/network/NetworkServices.kt index 6eb0d847b..eba3f0ac1 100644 --- a/app/src/main/java/com/topjohnwu/magisk/data/network/NetworkServices.kt +++ b/app/src/main/java/com/topjohnwu/magisk/data/network/NetworkServices.kt @@ -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 } - diff --git a/app/src/main/java/com/topjohnwu/magisk/data/repository/NetworkService.kt b/app/src/main/java/com/topjohnwu/magisk/data/repository/NetworkService.kt index ac63765dd..62d7c5c16 100644 --- a/app/src/main/java/com/topjohnwu/magisk/data/repository/NetworkService.kt +++ b/app/src/main/java/com/topjohnwu/magisk/data/repository/NetworkService.kt @@ -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()