mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-16 09:01:23 +00: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) {
|
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…
x
Reference in New Issue
Block a user