Loading automotive/can/aidl/default/CanController.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -20,10 +20,10 @@ #include "CanBusSlcan.h" #include "CanBusVirtual.h" #include <android-base/format.h> #include <android-base/logging.h> #include <filesystem> #include <format> #include <fstream> #include <regex> Loading Loading @@ -235,7 +235,7 @@ ndk::ScopedAStatus CanController::getInterfaceName(const std::string& busName, std::string* ifaceName) { *ifaceName = {}; if (mBusesByName.find(busName) == mBusesByName.end()) { return resultToStatus(Result::BAD_BUS_NAME, fmt::format("{} doesn't exist", busName)); return resultToStatus(Result::BAD_BUS_NAME, std::format("{} doesn't exist", busName)); } *ifaceName = std::string(mBusesByName[busName]->getIfaceName()); return ok(); Loading @@ -245,11 +245,11 @@ ndk::ScopedAStatus CanController::upBus(const BusConfig& config, std::string* if if (!isValidName(config.name)) { LOG(ERROR) << "Bus name " << config.name << " is invalid"; return resultToStatus(Result::BAD_BUS_NAME, fmt::format("{} is not a valid bus name", config.name)); std::format("{} is not a valid bus name", config.name)); } else if (mBusesByName.find(config.name) != mBusesByName.end()) { LOG(ERROR) << "A bus named " << config.name << " already exists!"; return resultToStatus(Result::INVALID_STATE, fmt::format("A bus named {} already exists", config.name)); std::format("A bus named {} already exists", config.name)); } if (config.interfaceId.getTag() == BusConfig::InterfaceId::Tag::virtualif) { Loading Loading @@ -310,7 +310,7 @@ ndk::ScopedAStatus CanController::upBus(const BusConfig& config, std::string* if if (result != Result::OK) { // the bus failed to come up, don't leave a broken entry in the map. mBusesByName.erase(config.name); return resultToStatus(result, fmt::format("CanBus::up failed for {}", config.name)); return resultToStatus(result, std::format("CanBus::up failed for {}", config.name)); } *ifaceName = mBusesByName[config.name]->getIfaceName(); Loading @@ -321,11 +321,11 @@ ndk::ScopedAStatus CanController::downBus(const std::string& busName) { if (mBusesByName.find(busName) == mBusesByName.end()) { return resultToStatus( Result::UNKNOWN_ERROR, fmt::format("Couldn't bring down {}, because it doesn't exist", busName)); std::format("Couldn't bring down {}, because it doesn't exist", busName)); } Result result = mBusesByName[busName]->down(); if (result != Result::OK) { return resultToStatus(result, fmt::format("Couldn't bring down {}!", busName)); return resultToStatus(result, std::format("Couldn't bring down {}!", busName)); } mBusesByName.erase(busName); return ok(); Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHalServer.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -16,10 +16,10 @@ #define LOG_TAG "DefaultVehicleHalServer" #include <format> #include <fstream> #include <regex> #include <android-base/format.h> #include <android-base/logging.h> #include <android-base/parsedouble.h> #include <android-base/parseint.h> Loading Loading @@ -237,7 +237,7 @@ IVehicleServer::DumpResult DefaultVehicleHalServer::onDump( auto values = mServerSidePropStore.readAllValues(); size_t i = 0; for (const auto& value : values) { result.buffer += fmt::format("[{}]: {}\n", i, toString(value)); result.buffer += std::format("[{}]: {}\n", i, toString(value)); i++; } return result; Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/userhal/FakeUserHal.cpp +11 −9 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ */ #define LOG_TAG "FakeUserHal" #include <format> #include <cutils/log.h> #include <utils/SystemClock.h> Loading Loading @@ -312,34 +314,34 @@ Result<std::unique_ptr<VehiclePropValue>> FakeUserHal::sendUserHalResponse( } std::string FakeUserHal::showDumpHelp() { return fmt::format("{}: dumps state used for user management\n", kUserHalDumpOption); return std::format("{}: dumps state used for user management\n", kUserHalDumpOption); } std::string FakeUserHal::dump(std::string indent) { std::string info; if (mInitialUserResponseFromCmd != nullptr) { info += fmt::format("{}InitialUserInfo response: {}\n", indent.c_str(), info += std::format("{}InitialUserInfo response: {}\n", indent.c_str(), toString(*mInitialUserResponseFromCmd).c_str()); } else { info += fmt::format("{}No InitialUserInfo response\n", indent.c_str()); info += std::format("{}No InitialUserInfo response\n", indent.c_str()); } if (mSwitchUserResponseFromCmd != nullptr) { info += fmt::format("{}SwitchUser response: {}\n", indent.c_str(), info += std::format("{}SwitchUser response: {}\n", indent.c_str(), toString(*mSwitchUserResponseFromCmd).c_str()); } else { info += fmt::format("{}No SwitchUser response\n", indent.c_str()); info += std::format("{}No SwitchUser response\n", indent.c_str()); } if (mCreateUserResponseFromCmd != nullptr) { info += fmt::format("{}CreateUser response: {}\n", indent.c_str(), info += std::format("{}CreateUser response: {}\n", indent.c_str(), toString(*mCreateUserResponseFromCmd).c_str()); } else { info += fmt::format("{}No CreateUser response\n", indent.c_str()); info += std::format("{}No CreateUser response\n", indent.c_str()); } if (mSetUserIdentificationAssociationResponseFromCmd != nullptr) { info += fmt::format("{}SetUserIdentificationAssociation response: {}\n", indent.c_str(), info += std::format("{}SetUserIdentificationAssociation response: {}\n", indent.c_str(), toString(*mSetUserIdentificationAssociationResponseFromCmd).c_str()); } else { info += fmt::format("{}No SetUserIdentificationAssociation response\n", indent.c_str()); info += std::format("{}No SetUserIdentificationAssociation response\n", indent.c_str()); } return info; } Loading automotive/vehicle/2.0/default/impl/vhal_v2_0/userhal/include/FakeUserHal.h +0 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #ifndef android_hardware_automotive_vehicle_V2_0_impl_FakeUserHal_H_ #define android_hardware_automotive_vehicle_V2_0_impl_FakeUserHal_H_ #include <android-base/format.h> #include <android-base/result.h> #include <android/hardware/automotive/vehicle/2.0/types.h> Loading automotive/vehicle/aidl/impl/fake_impl/userhal/include/FakeUserHal.h +0 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #ifndef android_hardware_automotive_vehicle_aidl_impl_fake_impl_userhal_include_FakeUserHal_H_ #define android_hardware_automotive_vehicle_aidl_impl_fake_impl_userhal_include_FakeUserHal_H_ #include <android-base/format.h> #include <android-base/result.h> #include <android-base/thread_annotations.h> Loading Loading
automotive/can/aidl/default/CanController.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -20,10 +20,10 @@ #include "CanBusSlcan.h" #include "CanBusVirtual.h" #include <android-base/format.h> #include <android-base/logging.h> #include <filesystem> #include <format> #include <fstream> #include <regex> Loading Loading @@ -235,7 +235,7 @@ ndk::ScopedAStatus CanController::getInterfaceName(const std::string& busName, std::string* ifaceName) { *ifaceName = {}; if (mBusesByName.find(busName) == mBusesByName.end()) { return resultToStatus(Result::BAD_BUS_NAME, fmt::format("{} doesn't exist", busName)); return resultToStatus(Result::BAD_BUS_NAME, std::format("{} doesn't exist", busName)); } *ifaceName = std::string(mBusesByName[busName]->getIfaceName()); return ok(); Loading @@ -245,11 +245,11 @@ ndk::ScopedAStatus CanController::upBus(const BusConfig& config, std::string* if if (!isValidName(config.name)) { LOG(ERROR) << "Bus name " << config.name << " is invalid"; return resultToStatus(Result::BAD_BUS_NAME, fmt::format("{} is not a valid bus name", config.name)); std::format("{} is not a valid bus name", config.name)); } else if (mBusesByName.find(config.name) != mBusesByName.end()) { LOG(ERROR) << "A bus named " << config.name << " already exists!"; return resultToStatus(Result::INVALID_STATE, fmt::format("A bus named {} already exists", config.name)); std::format("A bus named {} already exists", config.name)); } if (config.interfaceId.getTag() == BusConfig::InterfaceId::Tag::virtualif) { Loading Loading @@ -310,7 +310,7 @@ ndk::ScopedAStatus CanController::upBus(const BusConfig& config, std::string* if if (result != Result::OK) { // the bus failed to come up, don't leave a broken entry in the map. mBusesByName.erase(config.name); return resultToStatus(result, fmt::format("CanBus::up failed for {}", config.name)); return resultToStatus(result, std::format("CanBus::up failed for {}", config.name)); } *ifaceName = mBusesByName[config.name]->getIfaceName(); Loading @@ -321,11 +321,11 @@ ndk::ScopedAStatus CanController::downBus(const std::string& busName) { if (mBusesByName.find(busName) == mBusesByName.end()) { return resultToStatus( Result::UNKNOWN_ERROR, fmt::format("Couldn't bring down {}, because it doesn't exist", busName)); std::format("Couldn't bring down {}, because it doesn't exist", busName)); } Result result = mBusesByName[busName]->down(); if (result != Result::OK) { return resultToStatus(result, fmt::format("Couldn't bring down {}!", busName)); return resultToStatus(result, std::format("Couldn't bring down {}!", busName)); } mBusesByName.erase(busName); return ok(); Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHalServer.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -16,10 +16,10 @@ #define LOG_TAG "DefaultVehicleHalServer" #include <format> #include <fstream> #include <regex> #include <android-base/format.h> #include <android-base/logging.h> #include <android-base/parsedouble.h> #include <android-base/parseint.h> Loading Loading @@ -237,7 +237,7 @@ IVehicleServer::DumpResult DefaultVehicleHalServer::onDump( auto values = mServerSidePropStore.readAllValues(); size_t i = 0; for (const auto& value : values) { result.buffer += fmt::format("[{}]: {}\n", i, toString(value)); result.buffer += std::format("[{}]: {}\n", i, toString(value)); i++; } return result; Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/userhal/FakeUserHal.cpp +11 −9 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ */ #define LOG_TAG "FakeUserHal" #include <format> #include <cutils/log.h> #include <utils/SystemClock.h> Loading Loading @@ -312,34 +314,34 @@ Result<std::unique_ptr<VehiclePropValue>> FakeUserHal::sendUserHalResponse( } std::string FakeUserHal::showDumpHelp() { return fmt::format("{}: dumps state used for user management\n", kUserHalDumpOption); return std::format("{}: dumps state used for user management\n", kUserHalDumpOption); } std::string FakeUserHal::dump(std::string indent) { std::string info; if (mInitialUserResponseFromCmd != nullptr) { info += fmt::format("{}InitialUserInfo response: {}\n", indent.c_str(), info += std::format("{}InitialUserInfo response: {}\n", indent.c_str(), toString(*mInitialUserResponseFromCmd).c_str()); } else { info += fmt::format("{}No InitialUserInfo response\n", indent.c_str()); info += std::format("{}No InitialUserInfo response\n", indent.c_str()); } if (mSwitchUserResponseFromCmd != nullptr) { info += fmt::format("{}SwitchUser response: {}\n", indent.c_str(), info += std::format("{}SwitchUser response: {}\n", indent.c_str(), toString(*mSwitchUserResponseFromCmd).c_str()); } else { info += fmt::format("{}No SwitchUser response\n", indent.c_str()); info += std::format("{}No SwitchUser response\n", indent.c_str()); } if (mCreateUserResponseFromCmd != nullptr) { info += fmt::format("{}CreateUser response: {}\n", indent.c_str(), info += std::format("{}CreateUser response: {}\n", indent.c_str(), toString(*mCreateUserResponseFromCmd).c_str()); } else { info += fmt::format("{}No CreateUser response\n", indent.c_str()); info += std::format("{}No CreateUser response\n", indent.c_str()); } if (mSetUserIdentificationAssociationResponseFromCmd != nullptr) { info += fmt::format("{}SetUserIdentificationAssociation response: {}\n", indent.c_str(), info += std::format("{}SetUserIdentificationAssociation response: {}\n", indent.c_str(), toString(*mSetUserIdentificationAssociationResponseFromCmd).c_str()); } else { info += fmt::format("{}No SetUserIdentificationAssociation response\n", indent.c_str()); info += std::format("{}No SetUserIdentificationAssociation response\n", indent.c_str()); } return info; } Loading
automotive/vehicle/2.0/default/impl/vhal_v2_0/userhal/include/FakeUserHal.h +0 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #ifndef android_hardware_automotive_vehicle_V2_0_impl_FakeUserHal_H_ #define android_hardware_automotive_vehicle_V2_0_impl_FakeUserHal_H_ #include <android-base/format.h> #include <android-base/result.h> #include <android/hardware/automotive/vehicle/2.0/types.h> Loading
automotive/vehicle/aidl/impl/fake_impl/userhal/include/FakeUserHal.h +0 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ #ifndef android_hardware_automotive_vehicle_aidl_impl_fake_impl_userhal_include_FakeUserHal_H_ #define android_hardware_automotive_vehicle_aidl_impl_fake_impl_userhal_include_FakeUserHal_H_ #include <android-base/format.h> #include <android-base/result.h> #include <android-base/thread_annotations.h> Loading