Skip to content

Commit b0e2a0b

Browse files
committed
Fix bugs on vbmeta flashing and checking recovery image
1 parent 3789f82 commit b0e2a0b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

openandroidinstaller/views/select_view.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,12 +555,13 @@ def pick_vbmeta_result(self, e: FilePickerResultEvent):
555555
if e.files:
556556
# check if the vbmeta works with the device and show the filename in different colors accordingly
557557
if path == "vbmeta.img":
558-
self.selected_vbmeta.color = colors.GREEN
558+
self.selected_vbmeta.fill_color = colors.GREEN
559559
self.selected_vbmeta.value = True
560560
self.state.vbmeta_path = e.files[0].path
561561
logger.info(f"Selected vbmeta from {self.state.vbmeta_path}")
562562
else:
563-
self.selected_vbmeta.color = colors.RED
563+
self.selected_vbmeta.fill_color = colors.RED
564+
self.selected_vbmeta.value = False
564565
else:
565566
logger.info("No image selected.")
566567
# update
@@ -589,14 +590,14 @@ def enable_button_if_ready(self, e):
589590
if (".zip" in self.selected_image.value) and (
590591
".img" in self.selected_recovery.value
591592
):
592-
device_code = self.state.config.device_code
593593
if not (
594594
image_works_with_device(
595595
supported_device_codes=self.state.config.supported_device_codes,
596596
image_path=self.state.image_path,
597597
)
598598
and recovery_works_with_device(
599-
device_code=device_code, recovery_path=self.state.recovery_path
599+
supported_device_codes=self.state.config.supported_device_codes,
600+
recovery_path=self.state.recovery_path
600601
)
601602
):
602603
# if image and recovery work for device allow to move on, otherwise display message

0 commit comments

Comments
 (0)