Use String8/16 c_str [audio]
Bug: 295394788
Test: make checkbuild
Change-Id: Idd3610f6820093bd8710a401f87a136cc26279c5
Merged-In: Idd3610f6820093bd8710a401f87a136cc26279c5
diff --git a/media/libmediahelper/AudioParameter.cpp b/media/libmediahelper/AudioParameter.cpp
index c081629..f21ea53 100644
--- a/media/libmediahelper/AudioParameter.cpp
+++ b/media/libmediahelper/AudioParameter.cpp
@@ -96,7 +96,7 @@
mKeyValuePairs = keyValuePairs;
char *last;
- strcpy(str, keyValuePairs.string());
+ strcpy(str, keyValuePairs.c_str());
char *pair = strtok_r(str, ";", &last);
while (pair != NULL) {
if (strlen(pair) != 0) {
@@ -208,7 +208,7 @@
value = 0;
if (result == NO_ERROR) {
int val;
- if (sscanf(str8.string(), "%d", &val) == 1) {
+ if (sscanf(str8.c_str(), "%d", &val) == 1) {
value = val;
} else {
result = INVALID_OPERATION;
@@ -224,7 +224,7 @@
value = 0;
if (result == NO_ERROR) {
float val;
- if (sscanf(str8.string(), "%f", &val) == 1) {
+ if (sscanf(str8.c_str(), "%f", &val) == 1) {
value = val;
} else {
result = INVALID_OPERATION;