mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 20:15:29 +00:00
Fix "double install" caused by config changes
Configuration changes in FlashFragment may cause the installation process to be triggered twice. The simplest way to reproduce this behavior is to choose a module ZIP file in landscape mode (which is the default on some tablets). This commit fixes the problem by ensuring `savedInstanceState == null` before starting installation.
This commit is contained in:
parent
90545057e9
commit
42e5f5150a
@ -51,8 +51,10 @@ class FlashFragment : BaseFragment<FragmentFlashMd2Binding>() {
|
||||
|
||||
defaultOrientation = activity?.requestedOrientation ?: -1
|
||||
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR
|
||||
if (savedInstanceState == null) {
|
||||
viewModel.startFlashing()
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("WrongConstant")
|
||||
override fun onDestroyView() {
|
||||
|
Loading…
Reference in New Issue
Block a user