Use String8/16 c_str (mainline modules)
Bug: 295394788
Test: make checkbuild
Change-Id: Ia266bccfc9100da25d8605d93c1298a341d2b11a
diff --git a/media/module/id3/test/ID3Test.cpp b/media/module/id3/test/ID3Test.cpp
index a0a84ec..9da28d2 100644
--- a/media/module/id3/test/ID3Test.cpp
+++ b/media/module/id3/test/ID3Test.cpp
@@ -94,7 +94,7 @@
String8 text;
countTextFrames++;
it.getString(&text);
- ALOGV("Found text frame %s : %s \n", id.string(), text.string());
+ ALOGV("Found text frame %s : %s \n", id.c_str(), text.c_str());
}
it.next();
}
@@ -106,10 +106,10 @@
ASSERT_GT(id.length(), 0) << "Found an ID3 tag of 0 size";
it.getString(&text);
// if the tag has a value
- if (strcmp(text.string(), "")) {
+ if (strcmp(text.c_str(), "")) {
countTextFrames++;
ALOGV("ID: %s\n", id.c_str());
- ALOGV("Text string: %s\n", text.string());
+ ALOGV("Text string: %s\n", text.c_str());
}
it.next();
}
@@ -134,7 +134,7 @@
if (albumArtPresent) {
if (data) {
- ALOGV("Found album art: size = %zu mime = %s \n", dataSize, mime.string());
+ ALOGV("Found album art: size = %zu mime = %s \n", dataSize, mime.c_str());
}
ASSERT_NE(data, nullptr) << "Expected album art, found none! " << path;
} else {
@@ -168,7 +168,7 @@
String8 mime;
const void *data = tag.getAlbumArt(&dataSize, &mime);
if (data) {
- ALOGV("Found album art: size = %zu mime = %s \n", dataSize, mime.string());
+ ALOGV("Found album art: size = %zu mime = %s \n", dataSize, mime.c_str());
#if (LOG_NDEBUG == 0)
hexdump(data, dataSize > 128 ? 128 : dataSize);
#endif