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

Commit 952339c8 authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/lineage-20.0' into v1-t

parents 791e86b5 a18688e5
Loading
Loading
Loading
Loading
+10 −2
Original line number Original line Diff line number Diff line
@@ -46,6 +46,7 @@
#include <android-base/strings.h>
#include <android-base/strings.h>
#include <android-base/unique_fd.h>
#include <android-base/unique_fd.h>


#include "bootloader_message/bootloader_message.h"
#include "install/snapshot_utils.h"
#include "install/snapshot_utils.h"
#include "install/spl_check.h"
#include "install/spl_check.h"
#include "install/wipe_data.h"
#include "install/wipe_data.h"
@@ -384,10 +385,17 @@ static InstallResult TryUpdateBinary(Package* package, bool* wipe_cache,
    return INSTALL_ERROR;
    return INSTALL_ERROR;
  }
  }


  const auto reboot_to_recovery = [] {
    if (std::string err; !clear_bootloader_message(&err)) {
      LOG(ERROR) << "Failed to clear BCB message: " << err;
    }
    Reboot("recovery");
  };

  static bool ab_package_installed = false;
  static bool ab_package_installed = false;
  if (ab_package_installed) {
  if (ab_package_installed) {
    if (ask_to_ab_reboot(device)) {
    if (ask_to_ab_reboot(device)) {
      Reboot("userrequested,recovery,ui");
      reboot_to_recovery();
    }
    }
    return INSTALL_ERROR;
    return INSTALL_ERROR;
  }
  }
@@ -580,7 +588,7 @@ static InstallResult TryUpdateBinary(Package* package, bool* wipe_cache,
    ab_package_installed = true;
    ab_package_installed = true;
    PerformPowerwashIfRequired(zip, device);
    PerformPowerwashIfRequired(zip, device);
    if (ask_to_ab_reboot(device)) {
    if (ask_to_ab_reboot(device)) {
      Reboot("userrequested,recovery,ui");
      reboot_to_recovery();
    }
    }
  }
  }