Use String8/16 c_str [media]
Bug: 295394788
Test: make checkbuild
Change-Id: I4ba5400f39c769bec59508525844f1daefe1d15c
diff --git a/drm/common/IDrmManagerService.cpp b/drm/common/IDrmManagerService.cpp
index a6d33b0..1b49be1 100644
--- a/drm/common/IDrmManagerService.cpp
+++ b/drm/common/IDrmManagerService.cpp
@@ -303,8 +303,8 @@
const String8 value = drmInforequest->get(key);
if (key == String8("FileDescriptorKey")) {
int fd = -1;
- if (sscanf(value.string(), "FileDescriptor[%d]", &fd) != 1) {
- sscanf(value.string(), "%d", &fd);
+ if (sscanf(value.c_str(), "FileDescriptor[%d]", &fd) != 1) {
+ sscanf(value.c_str(), "%d", &fd);
}
data.writeFileDescriptor(fd);
} else {
@@ -1330,7 +1330,7 @@
const String8 mime = data.readString8();
sp<DecryptHandle> handle
- = openDecryptSession(uniqueId, fd, offset, length, mime.string());
+ = openDecryptSession(uniqueId, fd, offset, length, mime.c_str());
if (NULL != handle.get()) {
writeDecryptHandleToParcelData(handle.get(), reply);
@@ -1349,7 +1349,7 @@
const String8 uri = data.readString8();
const String8 mime = data.readString8();
- sp<DecryptHandle> handle = openDecryptSession(uniqueId, uri.string(), mime.string());
+ sp<DecryptHandle> handle = openDecryptSession(uniqueId, uri.c_str(), mime.c_str());
if (NULL != handle.get()) {
writeDecryptHandleToParcelData(handle.get(), reply);