mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 02:25:28 +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
|
defaultOrientation = activity?.requestedOrientation ?: -1
|
||||||
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR
|
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR
|
||||||
viewModel.startFlashing()
|
if (savedInstanceState == null) {
|
||||||
|
viewModel.startFlashing()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("WrongConstant")
|
@SuppressLint("WrongConstant")
|
||||||
|
Loading…
Reference in New Issue
Block a user