Commit b3d777bb authored by Viktor De Pasquale's avatar Viktor De Pasquale Committed by John Wu

Updated configuration to hold data when necessary

parent 12e00c30
......@@ -26,7 +26,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
file: File,
subject: DownloadSubject.Magisk
) = when (subject.configuration) {
Configuration.FLASH -> FlashActivity.flash(this, file)
Configuration.Flash -> FlashActivity.flash(this, file)
else -> Unit
}
......@@ -34,7 +34,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
file: File,
subject: DownloadSubject.Module
) = when (subject.configuration) {
Configuration.FLASH -> FlashActivity.install(this, file)
Configuration.Flash -> FlashActivity.install(this, file)
else -> Unit
}
......@@ -52,7 +52,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
file: File,
subject: DownloadSubject.Magisk
) = when (subject.configuration) {
Configuration.FLASH -> setContentIntent(FlashActivity.flashIntent(context, file))
Configuration.Flash -> setContentIntent(FlashActivity.flashIntent(context, file))
else -> this
}
......@@ -60,7 +60,7 @@ open class CompoundDownloadService : SubstrateDownloadService() {
file: File,
subject: DownloadSubject.Module
) = when (subject.configuration) {
Configuration.FLASH -> setContentIntent(FlashActivity.installIntent(context, file))
Configuration.Flash -> setContentIntent(FlashActivity.installIntent(context, file))
else -> this
}
......
package com.topjohnwu.magisk.model.entity.internal
enum class Configuration {
FLASH, DOWNLOAD, UNINSTALL, PATCH
import android.net.Uri
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment