Make release builds work
This commit is contained in:
parent
433ae89e53
commit
7532477a2f
12
app/proguard-rules.pro
vendored
12
app/proguard-rules.pro
vendored
@ -23,21 +23,15 @@
|
|||||||
void onResponse(int);
|
void onResponse(int);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Keep all fragment constructors
|
# Fragments
|
||||||
-keepclassmembers class * extends androidx.fragment.app.Fragment {
|
-keep,allowobfuscation class * extends androidx.fragment.app.Fragment
|
||||||
public <init>(...);
|
|
||||||
}
|
|
||||||
|
|
||||||
# DelegateWorker
|
# BaseWorkerWrapper
|
||||||
-keep,allowobfuscation class * extends com.topjohnwu.magisk.core.base.BaseWorkerWrapper
|
-keep,allowobfuscation class * extends com.topjohnwu.magisk.core.base.BaseWorkerWrapper
|
||||||
|
|
||||||
# BootSigner
|
# BootSigner
|
||||||
-keep class a.a { *; }
|
-keep class a.a { *; }
|
||||||
|
|
||||||
# Workaround R8 bug
|
|
||||||
-keep,allowobfuscation class com.topjohnwu.magisk.core.GeneralReceiver
|
|
||||||
-keepclassmembers class a.e { *; }
|
|
||||||
|
|
||||||
# Strip logging
|
# Strip logging
|
||||||
-assumenosideeffects class timber.log.Timber.Tree { *; }
|
-assumenosideeffects class timber.log.Timber.Tree { *; }
|
||||||
|
|
||||||
|
@ -5,12 +5,12 @@ import android.content.Intent
|
|||||||
import com.topjohnwu.magisk.core.base.BaseReceiver
|
import com.topjohnwu.magisk.core.base.BaseReceiver
|
||||||
import com.topjohnwu.magisk.core.download.DownloadService
|
import com.topjohnwu.magisk.core.download.DownloadService
|
||||||
import com.topjohnwu.magisk.core.magiskdb.PolicyDao
|
import com.topjohnwu.magisk.core.magiskdb.PolicyDao
|
||||||
import com.topjohnwu.magisk.core.su.SuCallbackHandler
|
|
||||||
import com.topjohnwu.magisk.extensions.reboot
|
|
||||||
import com.topjohnwu.magisk.core.model.ManagerJson
|
import com.topjohnwu.magisk.core.model.ManagerJson
|
||||||
|
import com.topjohnwu.magisk.core.su.SuCallbackHandler
|
||||||
|
import com.topjohnwu.magisk.core.view.Shortcuts
|
||||||
|
import com.topjohnwu.magisk.extensions.reboot
|
||||||
import com.topjohnwu.magisk.model.entity.internal.Configuration
|
import com.topjohnwu.magisk.model.entity.internal.Configuration
|
||||||
import com.topjohnwu.magisk.model.entity.internal.DownloadSubject
|
import com.topjohnwu.magisk.model.entity.internal.DownloadSubject
|
||||||
import com.topjohnwu.magisk.core.view.Shortcuts
|
|
||||||
import com.topjohnwu.superuser.Shell
|
import com.topjohnwu.superuser.Shell
|
||||||
import org.koin.core.inject
|
import org.koin.core.inject
|
||||||
|
|
||||||
@ -27,11 +27,7 @@ open class GeneralReceiver : BaseReceiver() {
|
|||||||
|
|
||||||
when (intent.action ?: return) {
|
when (intent.action ?: return) {
|
||||||
Intent.ACTION_REBOOT -> {
|
Intent.ACTION_REBOOT -> {
|
||||||
SuCallbackHandler(
|
SuCallbackHandler(context, intent.getStringExtra("action"), intent.extras)
|
||||||
context,
|
|
||||||
intent.getStringExtra("action"),
|
|
||||||
intent.extras
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
Intent.ACTION_PACKAGE_REPLACED -> {
|
Intent.ACTION_PACKAGE_REPLACED -> {
|
||||||
// This will only work pre-O
|
// This will only work pre-O
|
||||||
|
Loading…
Reference in New Issue
Block a user