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
6bd40066
Commit
6bd40066
authored
Aug 28, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename method
parent
01efe7a4
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
8 deletions
+10
-8
DownloadService.kt
...ava/com/topjohnwu/magisk/core/download/DownloadService.kt
+1
-1
EnvFixDialog.kt
...n/java/com/topjohnwu/magisk/events/dialog/EnvFixDialog.kt
+1
-1
ManagerInstallDialog.kt
...om/topjohnwu/magisk/events/dialog/ManagerInstallDialog.kt
+1
-1
ModuleInstallDialog.kt
...com/topjohnwu/magisk/events/dialog/ModuleInstallDialog.kt
+1
-1
UninstallDialog.kt
...ava/com/topjohnwu/magisk/events/dialog/UninstallDialog.kt
+1
-1
InstallViewModel.kt
.../java/com/topjohnwu/magisk/ui/install/InstallViewModel.kt
+4
-2
SettingsViewModel.kt
...ava/com/topjohnwu/magisk/ui/settings/SettingsViewModel.kt
+1
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/core/download/DownloadService.kt
View file @
6bd40066
...
...
@@ -100,7 +100,7 @@ open class DownloadService : BaseDownloader() {
}
}
operator
fun
invoke
(
context
:
Context
,
subject
:
Subject
)
{
fun
start
(
context
:
Context
,
subject
:
Subject
)
{
val
app
=
context
.
applicationContext
if
(
Build
.
VERSION
.
SDK_INT
>=
26
)
{
app
.
startForegroundService
(
intent
(
app
,
subject
))
...
...
app/src/main/java/com/topjohnwu/magisk/events/dialog/EnvFixDialog.kt
View file @
6bd40066
...
...
@@ -31,7 +31,7 @@ class EnvFixDialog : DialogEvent() {
lbm
.
unregisterReceiver
(
this
)
}
},
IntentFilter
(
DISMISS
))
DownloadService
(
dialog
.
context
,
Magisk
(
EnvFix
))
DownloadService
.
start
(
dialog
.
context
,
Magisk
(
EnvFix
))
}
}
.
applyButton
(
MagiskDialog
.
ButtonType
.
NEGATIVE
)
{
...
...
app/src/main/java/com/topjohnwu/magisk/events/dialog/ManagerInstallDialog.kt
View file @
6bd40066
...
...
@@ -25,7 +25,7 @@ class ManagerInstallDialog : DialogEvent() {
applyButton
(
MagiskDialog
.
ButtonType
.
POSITIVE
)
{
titleRes
=
R
.
string
.
install
onClick
{
DownloadService
(
context
,
subject
)
}
onClick
{
DownloadService
.
start
(
context
,
subject
)
}
}
if
(
Info
.
remote
.
app
.
note
.
isEmpty
())
return
...
...
app/src/main/java/com/topjohnwu/magisk/events/dialog/ModuleInstallDialog.kt
View file @
6bd40066
...
...
@@ -15,7 +15,7 @@ class ModuleInstallDialog(private val item: Repo) : DialogEvent() {
fun
download
(
install
:
Boolean
)
{
val
config
=
if
(
install
)
Action
.
Flash
.
Primary
else
Action
.
Download
val
subject
=
Subject
.
Module
(
item
,
config
)
DownloadService
(
context
,
subject
)
DownloadService
.
start
(
context
,
subject
)
}
applyTitle
(
context
.
getString
(
R
.
string
.
repo_install_title
,
item
.
name
))
...
...
app/src/main/java/com/topjohnwu/magisk/events/dialog/UninstallDialog.kt
View file @
6bd40066
...
...
@@ -47,7 +47,7 @@ class UninstallDialog : DialogEvent() {
}
private
fun
completeUninstall
()
{
DownloadService
(
dialog
.
context
,
Subject
.
Magisk
(
Action
.
Uninstall
))
DownloadService
.
start
(
dialog
.
context
,
Subject
.
Magisk
(
Action
.
Uninstall
))
}
}
app/src/main/java/com/topjohnwu/magisk/ui/install/InstallViewModel.kt
View file @
6bd40066
...
...
@@ -78,8 +78,10 @@ class InstallViewModel(
step
=
nextStep
}
fun
install
()
=
DownloadService
(
get
(),
Subject
.
Magisk
(
resolveAction
())).
also
{
state
=
State
.
LOADING
}
fun
install
()
{
DownloadService
.
start
(
get
(),
Subject
.
Magisk
(
resolveAction
()))
state
=
State
.
LOADING
}
// ---
...
...
app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsViewModel.kt
View file @
6bd40066
...
...
@@ -145,7 +145,7 @@ class SettingsViewModel(
}
private
fun
restoreManager
()
{
DownloadService
(
get
(),
Subject
.
Manager
(
Action
.
APK
.
Restore
))
DownloadService
.
start
(
get
(),
Subject
.
Manager
(
Action
.
APK
.
Restore
))
}
}
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