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

Commit b4d6c57c authored by Steven Moreland's avatar Steven Moreland
Browse files

lshal: use libbase HexString

Now that it is removed from libhidl-gen-hash.

Bug: N/A
Test: lshal
Change-Id: Iafd8fce29e685375d8c6ce28ea02eaf3640c41ea
parent f05210f7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include <sstream>

#include <android-base/file.h>
#include <android-base/hex.h>
#include <android-base/logging.h>
#include <android/hidl/manager/1.0/IServiceManager.h>
#include <hidl-hash/Hash.h>
@@ -691,8 +692,7 @@ Status ListCommand::fetchBinderizedEntry(const sp<IServiceManager> &manager,
            }

            auto&& hashArray = hashChain[hashIndex];
            std::vector<uint8_t> hashVec{hashArray.data(), hashArray.data() + hashArray.size()};
            entry->hash = Hash::hexString(hashVec);
            entry->hash = android::base::HexString(hashArray.data(), hashArray.size());
        });
        if (!hashRet.isOk()) {
            handleError(TRANSACTION_ERROR, "getHashChain failed: " + hashRet.description());
+3 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <map>

#include <android-base/hex.h>
#include <android-base/strings.h>
#include <hidl-hash/Hash.h>
#include <vintf/parse_string.h>
@@ -104,7 +105,8 @@ std::string TableEntry::getField(TableColumnType type) const {
}

std::string TableEntry::isReleased() const {
    static const std::string unreleased = Hash::hexString(Hash::kEmptyHash);
    static const std::string unreleased = android::base::HexString(Hash::kEmptyHash.data(),
                                                                   Hash::kEmptyHash.size());

    if (hash.empty()) {
        return "?";