Commit a1096b5b authored by topjohnwu's avatar topjohnwu

Do not run pm install on main thread

parent 5ac0e64e
......@@ -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)
}
}
}
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