mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +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,7 +51,9 @@ class FlashFragment : BaseFragment<FragmentFlashMd2Binding>() {
|
||||
|
||||
defaultOrientation = activity?.requestedOrientation ?: -1
|
||||
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR
|
||||
viewModel.startFlashing()
|
||||
if (savedInstanceState == null) {
|
||||
viewModel.startFlashing()
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("WrongConstant")
|
||||
|
Loading…
Reference in New Issue
Block a user