You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
SDK < 21 is EOL
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.topjohnwu.magisk.data.repository
|
||||
|
||||
import android.os.Build
|
||||
import com.topjohnwu.magisk.core.Config
|
||||
import com.topjohnwu.magisk.core.Config.Value.BETA_CHANNEL
|
||||
import com.topjohnwu.magisk.core.Config.Value.CANARY_CHANNEL
|
||||
@@ -20,6 +21,10 @@ class NetworkService(
|
||||
private val api: GithubApiServices
|
||||
) {
|
||||
suspend fun fetchUpdate() = safe {
|
||||
// Pre SDK 21 no longer receives any major updates
|
||||
if (Build.VERSION.SDK_INT < 21)
|
||||
return fetchStableUpdate()
|
||||
|
||||
var info = when (Config.updateChannel) {
|
||||
DEFAULT_CHANNEL, STABLE_CHANNEL -> fetchStableUpdate()
|
||||
BETA_CHANNEL -> fetchBetaUpdate()
|
||||
|
||||
Reference in New Issue
Block a user