Commit a1096b5b authored by topjohnwu's avatar topjohnwu

Do not run pm install on main thread

parent 5ac0e64e
...@@ -160,7 +160,9 @@ object HideAPK { ...@@ -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)
}
} }
} }
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