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

Commit db7e8980 authored by Tao Bao's avatar Tao Bao
Browse files

recovery: Add SetStage() into 'Run graphics test'.

This allows a quicker test for stage UI.

Bug: 27804510
Test: 'Run graphices test' with the new recovery image.
Change-Id: I47689ae8e4cac6d7e5d1f6a10b9e393d50d713f3
parent a2e7a070
Loading
Loading
Loading
Loading
+37 −25
Original line number Diff line number Diff line
@@ -985,7 +985,7 @@ static void choose_recovery_file(Device* device) {
    }
}

static void run_graphics_test(Device* device) {
static void run_graphics_test() {
  // Switch to graphics screen.
  ui->ShowText(false);

@@ -1002,6 +1002,18 @@ static void run_graphics_test(Device* device) {
  ui->SetBackground(RecoveryUI::ERASING);
  sleep(1);

  // Calling SetBackground() after SetStage() to trigger a redraw.
  ui->SetStage(1, 3);
  ui->SetBackground(RecoveryUI::INSTALLING_UPDATE);
  sleep(1);
  ui->SetStage(2, 3);
  ui->SetBackground(RecoveryUI::INSTALLING_UPDATE);
  sleep(1);
  ui->SetStage(3, 3);
  ui->SetBackground(RecoveryUI::INSTALLING_UPDATE);
  sleep(1);

  ui->SetStage(-1, -1);
  ui->SetBackground(RecoveryUI::INSTALLING_UPDATE);

  ui->SetProgressType(RecoveryUI::DETERMINATE);
@@ -1181,7 +1193,7 @@ prompt_and_wait(Device* device, int status) {
                break;

            case Device::RUN_GRAPHICS_TEST:
                run_graphics_test(device);
                run_graphics_test();
                break;

            case Device::MOUNT_SYSTEM: