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
b3d777bb
Commit
b3d777bb
authored
Jul 10, 2019
by
Viktor De Pasquale
Committed by
John Wu
Jul 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated configuration to hold data when necessary
parent
12e00c30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
CompoundDownloadService.kt
...opjohnwu/magisk/model/download/CompoundDownloadService.kt
+4
-4
Configuration.kt
...m/topjohnwu/magisk/model/entity/internal/Configuration.kt
+18
-2
No files found.
app/src/main/java/com/topjohnwu/magisk/model/download/CompoundDownloadService.kt
View file @
b3d777bb
...
@@ -26,7 +26,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
...
@@ -26,7 +26,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
file
:
File
,
file
:
File
,
subject
:
DownloadSubject
.
Magisk
subject
:
DownloadSubject
.
Magisk
)
=
when
(
subject
.
configuration
)
{
)
=
when
(
subject
.
configuration
)
{
Configuration
.
F
LASH
->
FlashActivity
.
flash
(
this
,
file
)
Configuration
.
F
lash
->
FlashActivity
.
flash
(
this
,
file
)
else
->
Unit
else
->
Unit
}
}
...
@@ -34,7 +34,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
...
@@ -34,7 +34,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
file
:
File
,
file
:
File
,
subject
:
DownloadSubject
.
Module
subject
:
DownloadSubject
.
Module
)
=
when
(
subject
.
configuration
)
{
)
=
when
(
subject
.
configuration
)
{
Configuration
.
F
LASH
->
FlashActivity
.
install
(
this
,
file
)
Configuration
.
F
lash
->
FlashActivity
.
install
(
this
,
file
)
else
->
Unit
else
->
Unit
}
}
...
@@ -52,7 +52,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
...
@@ -52,7 +52,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
file
:
File
,
file
:
File
,
subject
:
DownloadSubject
.
Magisk
subject
:
DownloadSubject
.
Magisk
)
=
when
(
subject
.
configuration
)
{
)
=
when
(
subject
.
configuration
)
{
Configuration
.
F
LASH
->
setContentIntent
(
FlashActivity
.
flashIntent
(
context
,
file
))
Configuration
.
F
lash
->
setContentIntent
(
FlashActivity
.
flashIntent
(
context
,
file
))
else
->
this
else
->
this
}
}
...
@@ -60,7 +60,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
...
@@ -60,7 +60,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
file
:
File
,
file
:
File
,
subject
:
DownloadSubject
.
Module
subject
:
DownloadSubject
.
Module
)
=
when
(
subject
.
configuration
)
{
)
=
when
(
subject
.
configuration
)
{
Configuration
.
F
LASH
->
setContentIntent
(
FlashActivity
.
installIntent
(
context
,
file
))
Configuration
.
F
lash
->
setContentIntent
(
FlashActivity
.
installIntent
(
context
,
file
))
else
->
this
else
->
this
}
}
...
...
app/src/main/java/com/topjohnwu/magisk/model/entity/internal/Configuration.kt
View file @
b3d777bb
package
com.topjohnwu.magisk.model.entity.internal
package
com.topjohnwu.magisk.model.entity.internal
enum
class
Configuration
{
import
android.net.Uri
FLASH
,
DOWNLOAD
,
UNINSTALL
,
PATCH
import
android.os.Parcelable
import
kotlinx.android.parcel.Parcelize
sealed
class
Configuration
:
Parcelable
{
@Parcelize
object
Flash
:
Configuration
()
@Parcelize
object
Download
:
Configuration
()
@Parcelize
object
Uninstall
:
Configuration
()
@Parcelize
data class
Patch
(
val
fileUri
:
Uri
)
:
Configuration
()
}
}
\ No newline at end of file
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