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
dbd13a20
Commit
dbd13a20
authored
Jan 24, 2021
by
vvb2060
Committed by
topjohnwu
Jan 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean code
parent
06773235
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
13 deletions
+2
-13
UpdateInfo.kt
...c/main/java/com/topjohnwu/magisk/core/model/UpdateInfo.kt
+0
-6
NetworkService.kt
...va/com/topjohnwu/magisk/data/repository/NetworkService.kt
+0
-2
UninstallDialog.kt
...ava/com/topjohnwu/magisk/events/dialog/UninstallDialog.kt
+1
-4
XAndroid.kt
app/src/main/java/com/topjohnwu/magisk/ktx/XAndroid.kt
+1
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/core/model/UpdateInfo.kt
View file @
dbd13a20
...
@@ -7,16 +7,10 @@ import kotlinx.parcelize.Parcelize
...
@@ -7,16 +7,10 @@ import kotlinx.parcelize.Parcelize
@JsonClass
(
generateAdapter
=
true
)
@JsonClass
(
generateAdapter
=
true
)
data class
UpdateInfo
(
data class
UpdateInfo
(
val
app
:
ManagerJson
=
ManagerJson
(),
val
app
:
ManagerJson
=
ManagerJson
(),
val
uninstaller
:
UninstallerJson
=
UninstallerJson
(),
val
magisk
:
MagiskJson
=
MagiskJson
(),
val
magisk
:
MagiskJson
=
MagiskJson
(),
val
stub
:
StubJson
=
StubJson
()
val
stub
:
StubJson
=
StubJson
()
)
)
@JsonClass
(
generateAdapter
=
true
)
data class
UninstallerJson
(
val
link
:
String
=
""
)
@JsonClass
(
generateAdapter
=
true
)
@JsonClass
(
generateAdapter
=
true
)
data class
MagiskJson
(
data class
MagiskJson
(
val
version
:
String
=
""
,
val
version
:
String
=
""
,
...
...
app/src/main/java/com/topjohnwu/magisk/data/repository/NetworkService.kt
View file @
dbd13a20
...
@@ -50,13 +50,11 @@ class NetworkService(
...
@@ -50,13 +50,11 @@ class NetworkService(
fun
ManagerJson
.
updateCopy
()
=
copy
(
link
=
genCDNUrl
(
link
),
note
=
genCDNUrl
(
note
))
fun
ManagerJson
.
updateCopy
()
=
copy
(
link
=
genCDNUrl
(
link
),
note
=
genCDNUrl
(
note
))
fun
MagiskJson
.
updateCopy
()
=
copy
(
link
=
genCDNUrl
(
link
),
note
=
genCDNUrl
(
note
))
fun
MagiskJson
.
updateCopy
()
=
copy
(
link
=
genCDNUrl
(
link
),
note
=
genCDNUrl
(
note
))
fun
StubJson
.
updateCopy
()
=
copy
(
link
=
genCDNUrl
(
link
))
fun
StubJson
.
updateCopy
()
=
copy
(
link
=
genCDNUrl
(
link
))
fun
UninstallerJson
.
updateCopy
()
=
copy
(
link
=
genCDNUrl
(
link
))
return
info
.
copy
(
return
info
.
copy
(
app
=
info
.
app
.
updateCopy
(),
app
=
info
.
app
.
updateCopy
(),
magisk
=
info
.
magisk
.
updateCopy
(),
magisk
=
info
.
magisk
.
updateCopy
(),
stub
=
info
.
stub
.
updateCopy
(),
stub
=
info
.
stub
.
updateCopy
(),
uninstaller
=
info
.
uninstaller
.
updateCopy
()
)
)
}
}
...
...
app/src/main/java/com/topjohnwu/magisk/events/dialog/UninstallDialog.kt
View file @
dbd13a20
...
@@ -3,7 +3,6 @@ package com.topjohnwu.magisk.events.dialog
...
@@ -3,7 +3,6 @@ package com.topjohnwu.magisk.events.dialog
import
android.app.ProgressDialog
import
android.app.ProgressDialog
import
android.widget.Toast
import
android.widget.Toast
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.core.Info
import
com.topjohnwu.magisk.ui.flash.FlashFragment
import
com.topjohnwu.magisk.ui.flash.FlashFragment
import
com.topjohnwu.magisk.utils.Utils
import
com.topjohnwu.magisk.utils.Utils
import
com.topjohnwu.magisk.view.MagiskDialog
import
com.topjohnwu.magisk.view.MagiskDialog
...
@@ -18,12 +17,10 @@ class UninstallDialog : DialogEvent() {
...
@@ -18,12 +17,10 @@ class UninstallDialog : DialogEvent() {
titleRes
=
R
.
string
.
restore_img
titleRes
=
R
.
string
.
restore_img
onClick
{
restore
()
}
onClick
{
restore
()
}
}
}
if
(
Info
.
remote
.
uninstaller
.
link
.
isNotEmpty
())
{
.
applyButton
(
MagiskDialog
.
ButtonType
.
NEGATIVE
)
{
dialog
.
applyButton
(
MagiskDialog
.
ButtonType
.
NEGATIVE
)
{
titleRes
=
R
.
string
.
complete_uninstall
titleRes
=
R
.
string
.
complete_uninstall
onClick
{
completeUninstall
()
}
onClick
{
completeUninstall
()
}
}
}
}
}
}
@Suppress
(
"DEPRECATION"
)
@Suppress
(
"DEPRECATION"
)
...
...
app/src/main/java/com/topjohnwu/magisk/ktx/XAndroid.kt
View file @
dbd13a20
...
@@ -45,8 +45,8 @@ import androidx.interpolator.view.animation.FastOutSlowInInterpolator
...
@@ -45,8 +45,8 @@ import androidx.interpolator.view.animation.FastOutSlowInInterpolator
import
androidx.transition.AutoTransition
import
androidx.transition.AutoTransition
import
androidx.transition.TransitionManager
import
androidx.transition.TransitionManager
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.core.Const
import
com.topjohnwu.magisk.core.AssetHack
import
com.topjohnwu.magisk.core.AssetHack
import
com.topjohnwu.magisk.core.Const
import
com.topjohnwu.magisk.core.utils.currentLocale
import
com.topjohnwu.magisk.core.utils.currentLocale
import
com.topjohnwu.magisk.utils.DynamicClassLoader
import
com.topjohnwu.magisk.utils.DynamicClassLoader
import
com.topjohnwu.magisk.utils.Utils
import
com.topjohnwu.magisk.utils.Utils
...
...
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