Skip to content

Commit

Permalink
recovery: Make recovery usable on user builds
Browse files Browse the repository at this point in the history
Remove restrictions introduced for user builds of recovery.

Change-Id: Ib84de6e1fc1d5874a3bd993bd3ec581c07890ef8
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
  • Loading branch information
Myself5 authored and neobuddy89 committed Sep 1, 2022
1 parent 6a79428 commit dc90a4a
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions recovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,13 @@ static bool yes_no(Device* device, const char* question1, const char* question2)
}

bool ask_to_continue_unverified(Device* device) {
if (get_build_type() == "user") {
return false;
} else {
device->GetUI()->SetProgressType(RecoveryUI::EMPTY);
return yes_no(device, "Signature verification failed", "Install anyway?");
}
device->GetUI()->SetProgressType(RecoveryUI::EMPTY);
return yes_no(device, "Signature verification failed", "Install anyway?");
}

bool ask_to_continue_downgrade(Device* device) {
if (get_build_type() == "user") {
return false;
} else {
device->GetUI()->SetProgressType(RecoveryUI::EMPTY);
return yes_no(device, "This package will downgrade your system", "Install anyway?");
}
device->GetUI()->SetProgressType(RecoveryUI::EMPTY);
return yes_no(device, "This package will downgrade your system", "Install anyway?");
}

static bool ask_to_wipe_data(Device* device) {
Expand Down

0 comments on commit dc90a4a

Please sign in to comment.