Don't use String8::empty

With the current definition, it's an alias of default constructor. This
has very different meaning from std::string empty, especially that
static method String8::empty can still be called from instance context.

One of such bugs are present in in ParametersUtil.

Bug: 295394788
Test: make checkbuild
Change-Id: I9116a0c42a6a9e94116eaaaa0fd60568db428838
This commit is contained in:
Tomasz Wasilczyk
2023-08-14 16:20:20 +00:00
parent 77971b371b
commit fed7d54dfc

View File

@@ -51,7 +51,7 @@ Result ParametersUtil::getParam(const char* name, bool* value) {
Result retval = getParam(name, &halValue);
*value = false;
if (retval == Result::OK) {
if (halValue.empty()) {
if (halValue.length() == 0) {
return Result::NOT_SUPPORTED;
}
*value = !(halValue == AudioParameter::valueOff);