Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d43ec47f authored by Hannah.Hsu's avatar Hannah.Hsu
Browse files

Fix doing silent update,power cut/restoration,screen is turned on

[Description]
1. In the current code, when tv enter recovery mode, it will
write "boot-recovery" into the BCB command field by default.
This is a protection mechanism to ensure that tv can re-enter
recovery mode continues OTA upgrade after power cut/power restoration.
So, when re-enter recovery mode, since there is no "quiescent"
in the boot parameters, the screen will turn on.

2. And we hope the screen will be turned off when tv re-enter
recovery mode to continue OTA upgrade.

3. We made the following modify:
In reocvery mode,According to GetBoolProperty
"ro.boot.quiescent"to determine whether it is a quiescent
boot this time,and then write "boot-recovery, quiescent"
or"boot-recovery" accordingly.

[Test Report]
1.boot up ok.
2.silent update ok.
(the screen is turned off when interrupting/
resume or complete the upgrade)
3.OTA update ok.
(the screen is turned on when interrupting/
resume or complete the upgrade)

Change-Id: Ic68898f1a8e9ab176556ee2b61efec4d8d5d36e2
parent 3f125fa8
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -209,7 +209,11 @@ bool update_bootloader_message_in_struct(bootloader_message* boot,
  memset(boot->command, 0, sizeof(boot->command));
  memset(boot->recovery, 0, sizeof(boot->recovery));

  if (android::base::GetBoolProperty("ro.boot.quiescent", false)) {
    strlcpy(boot->command, "boot-recovery,quiescent", sizeof(boot->command));
  } else {
    strlcpy(boot->command, "boot-recovery", sizeof(boot->command));
  }

  std::string recovery = "recovery\n";
  for (const auto& s : options) {