diff options
author | 2021-07-29 12:17:25 -0700 | |
---|---|---|
committer | 2021-07-29 15:18:20 -0700 | |
commit | b4d6c57cce79f2ae1d24be4e059b60fbe3e1afb1 (patch) | |
tree | 4db3aed4753fd9534126b47f1b33f49f0b68f228 | |
parent | f05210f787603477c75838df5f35ebfe52f81a82 (diff) |
lshal: use libbase HexString
Now that it is removed from libhidl-gen-hash.
Bug: N/A
Test: lshal
Change-Id: Iafd8fce29e685375d8c6ce28ea02eaf3640c41ea
-rw-r--r-- | cmds/lshal/ListCommand.cpp | 4 | ||||
-rw-r--r-- | cmds/lshal/TableEntry.cpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/cmds/lshal/ListCommand.cpp b/cmds/lshal/ListCommand.cpp index 2722e214e8..ff73c9499f 100644 --- a/cmds/lshal/ListCommand.cpp +++ b/cmds/lshal/ListCommand.cpp @@ -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()); diff --git a/cmds/lshal/TableEntry.cpp b/cmds/lshal/TableEntry.cpp index 8e21975efa..1753343deb 100644 --- a/cmds/lshal/TableEntry.cpp +++ b/cmds/lshal/TableEntry.cpp @@ -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 "?"; |