mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-07-19 10:18:30 +00: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
|
doPreload = false
|
||||||
if (isRunningAsStub) {
|
if (isRunningAsStub) {
|
||||||
// Re-launch main activity without splash theme
|
// Re-launch main activity without splash theme
|
||||||
recreate()
|
relaunch()
|
||||||
} else {
|
} else {
|
||||||
showMainUI(savedInstanceState)
|
showMainUI(savedInstanceState)
|
||||||
}
|
}
|
||||||
|
@ -69,4 +69,9 @@ abstract class BaseActivity : AppCompatActivity() {
|
|||||||
startActivity(Intent().setComponent(intent.component))
|
startActivity(Intent().setComponent(intent.component))
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun relaunch() {
|
||||||
|
startActivity(Intent(intent).setFlags(0))
|
||||||
|
finish()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user