Always relaunch process after package migration

This commit is contained in:
topjohnwu 2022-06-19 02:07:35 -07:00
parent c1ab348673
commit 9fd1f41e8b
1 changed files with 4 additions and 3 deletions

View File

@ -9,6 +9,7 @@ import androidx.databinding.ViewDataBinding
import androidx.lifecycle.lifecycleScope
import com.topjohnwu.magisk.BuildConfig.APPLICATION_ID
import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.StubApk
import com.topjohnwu.magisk.arch.NavigationActivity
import com.topjohnwu.magisk.core.Config
import com.topjohnwu.magisk.core.Const
@ -98,10 +99,10 @@ abstract class SplashActivity<Binding : ViewDataBinding> : NavigationActivity<Bi
Config.load(prevPkg)
handleRepackage(prevPkg)
if (prevPkg != null && !isRunningAsStub) {
if (prevPkg != null) {
runOnUiThread {
// Might have new configuration loaded, relaunch the activity
relaunch()
// Relaunch the process after package migration
StubApk.restartProcess(this)
}
return
}