diff options
author | David Anderson <dvander@google.com> | 2019-11-19 00:49:44 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-11-19 00:49:44 +0000 |
commit | bf55a76fd9ce15b288d8cfa5425fb889bd069d51 (patch) | |
tree | e0d004d0184c2839c9f7b7bb65a5a7d09e9c322d /fastboot/device/variables.cpp | |
parent | 7d16aedc47552bbb67563ef6754a77c88b5821ea (diff) | |
parent | 220ddb1f0fb9d0e47f7c812c93da174ea3a8c037 (diff) |
Merge "fastbootd: Disallow certain operations during snapshot updates."
Diffstat (limited to 'fastboot/device/variables.cpp')
-rw-r--r-- | fastboot/device/variables.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fastboot/device/variables.cpp b/fastboot/device/variables.cpp index 717db064f..10eac01b5 100644 --- a/fastboot/device/variables.cpp +++ b/fastboot/device/variables.cpp @@ -432,19 +432,13 @@ bool GetSnapshotUpdateStatus(FastbootDevice* device, const std::vector<std::stri std::string* message) { // Note that we use the HAL rather than mounting /metadata, since we want // our results to match the bootloader. - auto hal = device->boot_control_hal(); + auto hal = device->boot1_1(); if (!hal) { *message = "not supported"; return false; } - android::sp<IBootControl1_1> hal11 = IBootControl1_1::castFrom(hal); - if (!hal11) { - *message = "not supported"; - return false; - } - - MergeStatus status = hal11->getSnapshotMergeStatus(); + MergeStatus status = hal->getSnapshotMergeStatus(); switch (status) { case MergeStatus::SNAPSHOTTED: *message = "snapshotted"; |