Merge "Use String8/16 c_str" into main am: d473ecf232 am: bf039d5d64 am: ffa40701a9 am: 6d585009ec am: 0c49564220

Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/2705615

Change-Id: Ibfb9960c6c62b4a00e1f948192d459aa41475c68
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2023-08-17 13:33:35 +00:00 committed by Automerger Merge Worker
commit 7ec653bdf3
2 changed files with 4 additions and 4 deletions

View file

@ -143,7 +143,7 @@ status_t AudioHardwareBase::dumpState(int fd, const Vector<String16>& args)
result.append(buffer);
snprintf(buffer, SIZE, "\tmMode: %d\n", mMode);
result.append(buffer);
::write(fd, result.string(), result.size());
::write(fd, result.c_str(), result.size());
dump(fd, args); // Dump the state of the concrete child.
return NO_ERROR;
}

View file

@ -216,7 +216,7 @@ static char * out_get_parameters(const struct audio_stream *stream, const char *
s8 = parms.toString();
}
return strdup(s8.string());
return strdup(s8.c_str());
}
static uint32_t out_get_latency(const struct audio_stream_out *stream)
@ -367,7 +367,7 @@ static char * in_get_parameters(const struct audio_stream *stream,
s8 = parms.toString();
}
return strdup(s8.string());
return strdup(s8.c_str());
}
static int in_set_gain(struct audio_stream_in *stream, float gain)
@ -474,7 +474,7 @@ static char * adev_get_parameters(const struct audio_hw_device *dev,
String8 s8;
s8 = ladev->hwif->getParameters(String8(keys));
return strdup(s8.string());
return strdup(s8.c_str());
}
static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev,