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

Commit 4e5f6eeb authored by Kelvin Zhang's avatar Kelvin Zhang Committed by Automerger Merge Worker
Browse files

Return empty suffix for invalid slots am: a6759d5d am: 2dba4ac8 am:...

Return empty suffix for invalid slots am: a6759d5d am: 2dba4ac8 am: 284508d0 am: 1016c8a7 am: 4ebf7ae9

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2166409



Change-Id: I199b772bee6194d58b02c78f0d24881ff9c90741
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 006e5123 4ebf7ae9
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -84,10 +84,12 @@ ScopedAStatus BootControl::getSnapshotMergeStatus(MergeStatus* _aidl_return) {

ScopedAStatus BootControl::getSuffix(int32_t in_slot, std::string* _aidl_return) {
    if (!impl_.IsValidSlot(in_slot)) {
        return ScopedAStatus::fromServiceSpecificErrorWithMessage(
                INVALID_SLOT, (std::string("Invalid slot ") + std::to_string(in_slot)).c_str());
    }
        // Old HIDL hal returns empty string for invalid slots. We should maintain this behavior in
        // AIDL for compatibility.
        _aidl_return->clear();
    } else {
        *_aidl_return = impl_.GetSuffix(in_slot);
    }
    return ScopedAStatus::ok();
}