mirror of
https://github.com/topjohnwu/Magisk
synced 2024-11-13 20:54:12 +01:00
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) {
|
||||
val apk = DynAPK.current(activity)
|
||||
APKInstall.registerInstallReceiver(activity, WaitPackageReceiver(APPLICATION_ID, activity))
|
||||
if (!Shell.su("adb_pm_install $apk").exec().isSuccess)
|
||||
APKInstall.installHideResult(activity, apk)
|
||||
Shell.su("adb_pm_install $apk").submit {
|
||||
if (!it.isSuccess)
|
||||
APKInstall.installHideResult(activity, apk)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user