Update for hiding Status from Return<T> object.
Test: compiles
Change-Id: Ia58b800d741f9074d29638ffd301639586113dea
diff --git a/boot_control_android.cc b/boot_control_android.cc
index 71ccd73..8a15049 100644
--- a/boot_control_android.cc
+++ b/boot_control_android.cc
@@ -115,7 +115,7 @@
};
Return<void> ret = module_->getSuffix(slot, store_suffix_cb);
- if (!ret.getStatus().isOk()) {
+ if (!ret.isOk()) {
LOG(ERROR) << "boot_control impl returned no suffix for slot "
<< SlotName(slot);
return false;
@@ -133,10 +133,10 @@
bool BootControlAndroid::IsSlotBootable(Slot slot) const {
Return<BoolResult> ret = module_->isSlotBootable(slot);
- if (!ret.getStatus().isOk()) {
+ if (!ret.isOk()) {
LOG(ERROR) << "Unable to determine if slot " << SlotName(slot)
<< " is bootable: "
- << ret.getStatus().exceptionMessage().string();
+ << ret.description();
return false;
}
if (ret == BoolResult::INVALID_SLOT) {
@@ -149,10 +149,10 @@
bool BootControlAndroid::MarkSlotUnbootable(Slot slot) {
CommandResult result;
auto ret = module_->setSlotAsUnbootable(slot, StoreResultCallback(&result));
- if (!ret.getStatus().isOk()) {
+ if (!ret.isOk()) {
LOG(ERROR) << "Unable to call MarkSlotUnbootable for slot "
<< SlotName(slot) << ": "
- << ret.getStatus().exceptionMessage().string();
+ << ret.description();
return false;
}
if (!result.success) {
@@ -165,9 +165,9 @@
bool BootControlAndroid::SetActiveBootSlot(Slot slot) {
CommandResult result;
auto ret = module_->setActiveBootSlot(slot, StoreResultCallback(&result));
- if (!ret.getStatus().isOk()) {
+ if (!ret.isOk()) {
LOG(ERROR) << "Unable to call SetActiveBootSlot for slot " << SlotName(slot)
- << ": " << ret.getStatus().exceptionMessage().string();
+ << ": " << ret.description();
return false;
}
if (!result.success) {
@@ -181,9 +181,9 @@
base::Callback<void(bool)> callback) {
CommandResult result;
auto ret = module_->markBootSuccessful(StoreResultCallback(&result));
- if (!ret.getStatus().isOk()) {
+ if (!ret.isOk()) {
LOG(ERROR) << "Unable to call MarkBootSuccessful: "
- << ret.getStatus().exceptionMessage().string();
+ << ret.description();
return false;
}
if (!result.success) {