recovery: Do not abort install on detecting older security patch level
* This allows going back to stock ROM to progress
Change-Id: If8a3ab7347e51c90337c4044826226ea11d6a327
diff --git a/install/install.cpp b/install/install.cpp
index 00cd331..c93f45c 100644
--- a/install/install.cpp
+++ b/install/install.cpp
@@ -379,7 +379,8 @@
bool device_supports_virtual_ab = android::base::GetBoolProperty("ro.virtual_ab.enabled", false);
const auto current_spl = android::base::GetProperty("ro.build.version.security_patch", "");
- if (ViolatesSPLDowngrade(zip, current_spl)) {
+ if (ViolatesSPLDowngrade(zip, current_spl) &&
+ !(ui->IsTextVisible() && ask_to_continue_downgrade(ui->GetDevice()))) {
LOG(ERROR) << "Denying OTA because it's SPL downgrade";
return INSTALL_ERROR;
}