Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
b6298f86
Commit
b6298f86
authored
Sep 13, 2021
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove more code
parent
abfec579
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
26 deletions
+0
-26
Const.kt
app/src/main/java/com/topjohnwu/magisk/core/Const.kt
+0
-3
UpdateInfo.kt
...c/main/java/com/topjohnwu/magisk/core/model/UpdateInfo.kt
+0
-7
NetworkServices.kt
...java/com/topjohnwu/magisk/data/network/NetworkServices.kt
+0
-9
NetworkService.kt
...va/com/topjohnwu/magisk/data/repository/NetworkService.kt
+0
-7
No files found.
app/src/main/java/com/topjohnwu/magisk/core/Const.kt
View file @
b6298f86
...
@@ -21,8 +21,6 @@ object Const {
...
@@ -21,8 +21,6 @@ object Const {
const
val
MAGISK_LOG
=
"/cache/magisk.log"
const
val
MAGISK_LOG
=
"/cache/magisk.log"
// Versions
// Versions
const
val
SNET_EXT_VER
=
17
const
val
SNET_REVISION
=
"23.0"
const
val
BOOTCTL_REVISION
=
"22.0"
const
val
BOOTCTL_REVISION
=
"22.0"
// Misc
// Misc
...
@@ -59,7 +57,6 @@ object Const {
...
@@ -59,7 +57,6 @@ object Const {
const
val
GITHUB_API_URL
=
"https://api.github.com/"
const
val
GITHUB_API_URL
=
"https://api.github.com/"
const
val
GITHUB_PAGE_URL
=
"https://topjohnwu.github.io/magisk-files/"
const
val
GITHUB_PAGE_URL
=
"https://topjohnwu.github.io/magisk-files/"
const
val
JS_DELIVR_URL
=
"https://cdn.jsdelivr.net/gh/"
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
{
object
Key
{
...
...
app/src/main/java/com/topjohnwu/magisk/core/model/UpdateInfo.kt
View file @
b6298f86
...
@@ -35,13 +35,6 @@ data class ModuleJson(
...
@@ -35,13 +35,6 @@ data class ModuleJson(
val
notes_url
:
String
val
notes_url
:
String
)
)
@JsonClass
(
generateAdapter
=
true
)
data class
RepoJson
(
val
name
:
String
,
val
last_update
:
Long
,
val
modules
:
List
<
ModuleJson
>
)
@JsonClass
(
generateAdapter
=
true
)
@JsonClass
(
generateAdapter
=
true
)
data class
CommitInfo
(
data class
CommitInfo
(
val
sha
:
String
val
sha
:
String
...
...
app/src/main/java/com/topjohnwu/magisk/data/network/NetworkServices.kt
View file @
b6298f86
...
@@ -2,7 +2,6 @@ package com.topjohnwu.magisk.data.network
...
@@ -2,7 +2,6 @@ package com.topjohnwu.magisk.data.network
import
com.topjohnwu.magisk.core.Const
import
com.topjohnwu.magisk.core.Const
import
com.topjohnwu.magisk.core.model.BranchInfo
import
com.topjohnwu.magisk.core.model.BranchInfo
import
com.topjohnwu.magisk.core.model.RepoJson
import
com.topjohnwu.magisk.core.model.UpdateInfo
import
com.topjohnwu.magisk.core.model.UpdateInfo
import
okhttp3.ResponseBody
import
okhttp3.ResponseBody
import
retrofit2.http.*
import
retrofit2.http.*
...
@@ -23,10 +22,6 @@ interface GithubPageServices {
...
@@ -23,10 +22,6 @@ interface GithubPageServices {
interface
JSDelivrServices
{
interface
JSDelivrServices
{
@GET
(
"$MAGISK_FILES@{$REVISION}/snet"
)
@Streaming
suspend
fun
fetchSafetynet
(
@Path
(
REVISION
)
revision
:
String
=
Const
.
SNET_REVISION
):
ResponseBody
@GET
(
"$MAGISK_FILES@{$REVISION}/bootctl"
)
@GET
(
"$MAGISK_FILES@{$REVISION}/bootctl"
)
@Streaming
@Streaming
suspend
fun
fetchBootctl
(
@Path
(
REVISION
)
revision
:
String
=
Const
.
BOOTCTL_REVISION
):
ResponseBody
suspend
fun
fetchBootctl
(
@Path
(
REVISION
)
revision
:
String
=
Const
.
BOOTCTL_REVISION
):
ResponseBody
...
@@ -41,9 +36,6 @@ interface RawServices {
...
@@ -41,9 +36,6 @@ interface RawServices {
@GET
@GET
suspend
fun
fetchCustomUpdate
(
@Url
url
:
String
):
UpdateInfo
suspend
fun
fetchCustomUpdate
(
@Url
url
:
String
):
UpdateInfo
@GET
suspend
fun
fetchRepoInfo
(
@Url
url
:
String
):
RepoJson
@GET
@GET
@Streaming
@Streaming
suspend
fun
fetchFile
(
@Url
url
:
String
):
ResponseBody
suspend
fun
fetchFile
(
@Url
url
:
String
):
ResponseBody
...
@@ -62,4 +54,3 @@ interface GithubApiServices {
...
@@ -62,4 +54,3 @@ interface GithubApiServices {
@Path
(
BRANCH
)
branch
:
String
@Path
(
BRANCH
)
branch
:
String
):
BranchInfo
):
BranchInfo
}
}
app/src/main/java/com/topjohnwu/magisk/data/repository/NetworkService.kt
View file @
b6298f86
...
@@ -6,7 +6,6 @@ import com.topjohnwu.magisk.core.Config.Value.CANARY_CHANNEL
...
@@ -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.CUSTOM_CHANNEL
import
com.topjohnwu.magisk.core.Config.Value.DEFAULT_CHANNEL
import
com.topjohnwu.magisk.core.Config.Value.DEFAULT_CHANNEL
import
com.topjohnwu.magisk.core.Config.Value.STABLE_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.core.Info
import
com.topjohnwu.magisk.data.network.*
import
com.topjohnwu.magisk.data.network.*
import
retrofit2.HttpException
import
retrofit2.HttpException
...
@@ -59,13 +58,7 @@ class NetworkService(
...
@@ -59,13 +58,7 @@ class NetworkService(
}
}
}
}
// Modules related
suspend
fun
fetchRepoInfo
(
url
:
String
=
Const
.
Url
.
OFFICIAL_REPO
)
=
safe
{
raw
.
fetchRepoInfo
(
url
)
}
// Fetch files
// Fetch files
suspend
fun
fetchSafetynet
()
=
wrap
{
jsd
.
fetchSafetynet
()
}
suspend
fun
fetchBootctl
()
=
wrap
{
jsd
.
fetchBootctl
()
}
suspend
fun
fetchBootctl
()
=
wrap
{
jsd
.
fetchBootctl
()
}
suspend
fun
fetchInstaller
()
=
wrap
{
suspend
fun
fetchInstaller
()
=
wrap
{
val
sha
=
fetchMainVersion
()
val
sha
=
fetchMainVersion
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment