Always relaunch process after package migration

This commit is contained in:
topjohnwu 2022-06-19 02:07:35 -07:00
parent c1ab348673
commit 9fd1f41e8b

View File

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