mirror of
https://github.com/topjohnwu/Magisk
synced 2024-11-16 00:13:57 +01:00
Relaunch and recreate is slightly different
This commit is contained in:
parent
1bdd6e1a9d
commit
2115bcd8b0
@ -59,7 +59,7 @@ abstract class BaseMainActivity<VM : BaseViewModel, Binding : ViewDataBinding>
|
||||
doPreload = false
|
||||
if (isRunningAsStub) {
|
||||
// Re-launch main activity without splash theme
|
||||
recreate()
|
||||
relaunch()
|
||||
} else {
|
||||
showMainUI(savedInstanceState)
|
||||
}
|
||||
|
@ -69,4 +69,9 @@ abstract class BaseActivity : AppCompatActivity() {
|
||||
startActivity(Intent().setComponent(intent.component))
|
||||
finish()
|
||||
}
|
||||
|
||||
fun relaunch() {
|
||||
startActivity(Intent(intent).setFlags(0))
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user