forked from MarcoBuster/Magisk
Do not run pm install on main thread
This commit is contained in:
parent
5ac0e64edb
commit
a1096b5bf0
|
@ -160,7 +160,9 @@ object HideAPK {
|
||||||
fun restore(activity: Activity) {
|
fun restore(activity: Activity) {
|
||||||
val apk = DynAPK.current(activity)
|
val apk = DynAPK.current(activity)
|
||||||
APKInstall.registerInstallReceiver(activity, WaitPackageReceiver(APPLICATION_ID, activity))
|
APKInstall.registerInstallReceiver(activity, WaitPackageReceiver(APPLICATION_ID, activity))
|
||||||
if (!Shell.su("adb_pm_install $apk").exec().isSuccess)
|
Shell.su("adb_pm_install $apk").submit {
|
||||||
APKInstall.installHideResult(activity, apk)
|
if (!it.isSuccess)
|
||||||
|
APKInstall.installHideResult(activity, apk)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user