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

Commit 5bbd7717 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "lshal: use libbase HexString" am: 7b2c012f am: d184634f am: 140731f6

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1781959

Change-Id: I914ad046bc1692501cd96dfe3415a60863c6ea31
parents 1b22374f 140731f6
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 "?";