gralloc960/mali_gralloc_debug.cpp: migrate to String.empty()
as suggested by the commit here:
https://android-review.googlesource.com/c/platform/system/core/+/2705824
otherwise the following build error will be reported:
device/linaro/hikey/gralloc960/mali_gralloc_debug.cpp:123:20: error: 'isEmpty' is a private member of 'android::String8'
if (!dumpStrings.isEmpty())
^
system/core/libutils/include/utils/String8.h:158:33: note: declared private here
inline bool isEmpty() const;
^
device/linaro/hikey/gralloc960/mali_gralloc_debug.cpp:132:19: error: 'isEmpty' is a private member of 'android::String8'
if (dumpStrings.isEmpty())
^
system/core/libutils/include/utils/String8.h:158:33: note: declared private here
inline bool isEmpty() const;
^
2 errors generated.
ninja: build stopped: subcommand failed.
ninja failed with: exit status 1
Test: build and boot hikey960 build successfully
Change-Id: Ibeb9c99b7c0f2fe4b1991541ba9d29c4ea3929a3
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
diff --git a/gralloc960/mali_gralloc_debug.cpp b/gralloc960/mali_gralloc_debug.cpp
index d4473ed..2b2b4a7 100644
--- a/gralloc960/mali_gralloc_debug.cpp
+++ b/gralloc960/mali_gralloc_debug.cpp
@@ -120,7 +120,7 @@
if (NULL == outBuffer)
{
- if (!dumpStrings.isEmpty())
+ if (!dumpStrings.empty())
{
dumpStrings.clear();
}
@@ -129,7 +129,7 @@
}
else
{
- if (dumpStrings.isEmpty())
+ if (dumpStrings.empty())
{
*outSize = 0;
}