From 51db5e9705e4b037d8a0358b52d0969e90846ee2 Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Mon, 9 Oct 2023 21:41:12 +0800 Subject: gralloc960/mali_gralloc_debug.cpp: migrate to String8.c_str() as suggested by the commit here: https://android-review.googlesource.com/c/platform/system/core/+/2706173 otherwise the following build error will be reported: ---------->8---------- device/linaro/hikey/gralloc960/mali_gralloc_debug.cpp:140:34: error: 'string' is a private member of 'android::String8' memcpy(outBuffer, dumpStrings.string(), *outSize); ^ system/core/libutils/include/utils/String8.h:157:33: note: declared private here inline const char* string() const; ^ 1 error generated. ----------8<---------- Test: build successfully and boot to the homescreen Change-Id: Id7ba2ef926534cc8225450439e53258a19d5c21e Signed-off-by: Amit Pundir Signed-off-by: Yongqin Liu --- gralloc960/mali_gralloc_debug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gralloc960/mali_gralloc_debug.cpp b/gralloc960/mali_gralloc_debug.cpp index 2b2b4a7b..3737fbca 100644 --- a/gralloc960/mali_gralloc_debug.cpp +++ b/gralloc960/mali_gralloc_debug.cpp @@ -137,7 +137,7 @@ void mali_gralloc_dump_internal(uint32_t *outSize, char *outBuffer) { dumpSize = dumpStrings.size(); *outSize = (dumpSize < *outSize) ? dumpSize : *outSize; - memcpy(outBuffer, dumpStrings.string(), *outSize); + memcpy(outBuffer, dumpStrings.c_str(), *outSize); } } } -- cgit v1.2.3