File tree Expand file tree Collapse file tree
app/src/main/java/me/bmax/apatch/ui/screen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,13 +163,8 @@ fun Patches(mode: PatchesViewModel.PatchMode) {
163163 KernelPatchImageView (viewModel.kpimgInfo)
164164 CustomKPImgView (viewModel)
165165
166- if ((mode == PatchesViewModel .PatchMode .PATCH_ONLY || mode == PatchesViewModel .PatchMode .RESTORE ) && selectedBootImage != null && viewModel.kimgInfo.banner.isEmpty()) {
166+ if ((mode == PatchesViewModel .PatchMode .PATCH_ONLY || mode == PatchesViewModel .PatchMode .RESTORE ) && selectedBootImage != null && viewModel.kimgInfo.banner.isEmpty() && ! viewModel.running ) {
167167 viewModel.copyAndParseBootimg(selectedBootImage!! )
168- // Fix endless loop. It's not normal if (parse done && working thread is not working) but banner still null
169- // Leave user re-choose
170- if (! viewModel.running && viewModel.kimgInfo.banner.isEmpty()) {
171- selectedBootImage = null
172- }
173168 }
174169
175170 // select boot.img
@@ -269,7 +264,7 @@ fun Patches(mode: PatchesViewModel.PatchMode) {
269264 // patch start
270265 if (mode != PatchesViewModel .PatchMode .UNPATCH && mode != PatchesViewModel .PatchMode .RESTORE ) {
271266 val isKeyReady = ! needKey || viewModel.superkey.isNotEmpty()
272- if (isKeyReady) {
267+ if (isKeyReady && viewModel.kimgInfo.banner.isNotEmpty() ) {
273268 StartButton (stringResource(id = R .string.patch_start_patch_btn)) {
274269 viewModel.doPatch(mode, needKey)
275270 }
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ fun getGitDescribe(): String {
3434}
3535
3636fun getVersionCode (): Int {
37- return 114236
37+ return 114237
3838}
3939
4040fun getbranch (): String {
You can’t perform that action at this time.
0 commit comments