libhwc2.1: Fix incorrect DRM_FORMAT for RGBA_FP16 am: 3ec426448d

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/common/+/25650513

Change-Id: I83fcc5c89f70422888b4e67c9aa15fc3c27a269c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/hwc3/Util.h b/hwc3/Util.h
index 92a8a71..76e0f2d 100644
--- a/hwc3/Util.h
+++ b/hwc3/Util.h
@@ -35,7 +35,7 @@
     if (CC_UNLIKELY(ATRACE_ENABLED())) {                                                \
         ::android::String8 _traceName_;                                                 \
         _traceName_.appendFormat("%s(display=%" PRId64 ",..)", __kFullName__, display); \
-        ATRACE_BEGIN(_traceName_.string());                                             \
+        ATRACE_BEGIN(_traceName_.c_str());                                              \
     }                                                                                   \
     ScopedTraceEnder _traceEnder_
 #else
diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp
index 5df81b0..d8fe206 100644
--- a/hwc3/impl/HalImpl.cpp
+++ b/hwc3/impl/HalImpl.cpp
@@ -582,10 +582,10 @@
 
    // TODO: not expect acceptDisplayChanges if there are no changes to accept
     if (halDisplay->mRenderingState == RENDERING_STATE_VALIDATED) {
-        LOG(INFO) << halDisplay->mDisplayName.string()
+        LOG(INFO) << halDisplay->mDisplayName.c_str()
                    << ": acceptDisplayChanges was not called";
         if (halDisplay->acceptDisplayChanges() != HWC2_ERROR_NONE) {
-            LOG(ERROR) << halDisplay->mDisplayName.string()
+            LOG(ERROR) << halDisplay->mDisplayName.c_str()
             << ": acceptDisplayChanges is failed";
         }
     }
diff --git a/libacryl/acrylic_formats.cpp b/libacryl/acrylic_formats.cpp
index 5bc37ae..b7be04e 100644
--- a/libacryl/acrylic_formats.cpp
+++ b/libacryl/acrylic_formats.cpp
@@ -34,9 +34,9 @@
 #define V4L2_PIX_FMT_NV16M_P210        v4l2_fourcc('P', 'M', '1', '6')
 #define V4L2_PIX_FMT_NV61M_P210        v4l2_fourcc('P', 'M', '6', '1')
 #define V4L2_PIX_FMT_NV12_P010         v4l2_fourcc('P', 'N', '1', '2')
-#define V4L2_PIX_FMT_ARGB2101010       v4l2_fourcc('A', 'B', '1', '0')
+#define V4L2_PIX_FMT_ARGB2101010       v4l2_fourcc('A', 'R', '3', '0')
 #define V4L2_PIX_FMT_ABGR2101010       v4l2_fourcc('A', 'R', '1', '0')
-#define V4L2_PIX_FMT_RGBA1010102       v4l2_fourcc('R', 'A', '1', '0')
+#define V4L2_PIX_FMT_RGBA1010102       v4l2_fourcc('R', 'A', '3', '0')
 #define V4L2_PIX_FMT_BGRA1010102       v4l2_fourcc('B', 'A', '1', '0')
 
 /* 12 Y/CbCr 4:2:0 SBWC */
diff --git a/libhwc2.1/ExynosHWC.cpp b/libhwc2.1/ExynosHWC.cpp
index 16f973a..f83a735 100644
--- a/libhwc2.1/ExynosHWC.cpp
+++ b/libhwc2.1/ExynosHWC.cpp
@@ -520,10 +520,10 @@
 
         if (exynosDisplay->mHWCRenderingState == RENDERING_STATE_VALIDATED) {
             ALOGI("%s:: acceptDisplayChanges was not called",
-                    exynosDisplay->mDisplayName.string());
+                    exynosDisplay->mDisplayName.c_str());
             if (exynosDisplay->acceptDisplayChanges() != HWC2_ERROR_NONE) {
                 ALOGE("%s:: acceptDisplayChanges is failed",
-                        exynosDisplay->mDisplayName.string());
+                        exynosDisplay->mDisplayName.c_str());
             }
         }
         int32_t ret = exynosDisplay->presentDisplay(outRetireFence);
diff --git a/libhwc2.1/ExynosHWCDebug.cpp b/libhwc2.1/ExynosHWCDebug.cpp
index d89dabf..d43f76d 100644
--- a/libhwc2.1/ExynosHWCDebug.cpp
+++ b/libhwc2.1/ExynosHWCDebug.cpp
@@ -32,8 +32,8 @@
     struct timeval tv;
     gettimeofday(&tv, NULL);
 
-    saveString.appendFormat("%s errFrameNumber %" PRIu64 ": %s\n", getLocalTimeStr(tv).string(),
-                            display->mErrorFrameCount, errString.string());
+    saveString.appendFormat("%s errFrameNumber %" PRIu64 ": %s\n", getLocalTimeStr(tv).c_str(),
+                            display->mErrorFrameCount, errString.c_str());
 
     fileWriter.write(saveString);
     fileWriter.flush();
diff --git a/libhwc2.1/ExynosHWCDebug.h b/libhwc2.1/ExynosHWCDebug.h
index 3801962..bd62a2e 100644
--- a/libhwc2.1/ExynosHWCDebug.h
+++ b/libhwc2.1/ExynosHWCDebug.h
@@ -76,8 +76,8 @@
     if (hwcCheckDebugMessages(debugFlag) || CC_UNLIKELY(ATRACE_ENABLED())) { \
         String8 log;                                                         \
         log.appendFormat((fmt), ##__VA_ARGS__);                              \
-        ALOGD("%s", log.string());                                           \
-        if (CC_UNLIKELY(ATRACE_ENABLED())) ATRACE_NAME(log.string());        \
+        ALOGD("%s", log.c_str());                                            \
+        if (CC_UNLIKELY(ATRACE_ENABLED())) ATRACE_NAME(log.c_str());         \
     }
 #endif
 
@@ -106,38 +106,38 @@
 #define DISPLAY_LOGD(type, msg, ...) \
     {\
         if (hwcCheckDebugMessages(type)) \
-            ALOGD("%s:: [%s] " msg, __func__, mDisplayName.string(), ##__VA_ARGS__); \
+            ALOGD("%s:: [%s] " msg, __func__, mDisplayName.c_str(), ##__VA_ARGS__); \
     }
 #define MPP_LOGD(type, msg, ...) \
     {\
     if (hwcCheckDebugMessages(type)) \
-        ALOGD("%s:: [%s][%d] " msg, __func__, mName.string(), mLogicalIndex, ##__VA_ARGS__); \
+        ALOGD("%s:: [%s][%d] " msg, __func__, mName.c_str(), mLogicalIndex, ##__VA_ARGS__); \
     }
 #endif
-#define DISPLAY_LOGV(msg, ...) ALOGV("[%s] " msg, mDisplayName.string(), ##__VA_ARGS__)
-#define DISPLAY_LOGI(msg, ...) ALOGI("[%s] " msg, mDisplayName.string(), ##__VA_ARGS__)
-#define DISPLAY_LOGW(msg, ...) ALOGW("[%s] " msg, mDisplayName.string(), ##__VA_ARGS__)
+#define DISPLAY_LOGV(msg, ...) ALOGV("[%s] " msg, mDisplayName.c_str(), ##__VA_ARGS__)
+#define DISPLAY_LOGI(msg, ...) ALOGI("[%s] " msg, mDisplayName.c_str(), ##__VA_ARGS__)
+#define DISPLAY_LOGW(msg, ...) ALOGW("[%s] " msg, mDisplayName.c_str(), ##__VA_ARGS__)
 #define DISPLAY_LOGE(msg, ...) \
     {\
-        ALOGE("[%s] " msg, mDisplayName.string(), ##__VA_ARGS__); \
+        ALOGE("[%s] " msg, mDisplayName.c_str(), ##__VA_ARGS__); \
         String8 saveString; \
         saveString.appendFormat(msg, ##__VA_ARGS__); \
         saveErrorLog(saveString, this); \
     }
 
 #define DISPLAY_DRM_LOGI(msg, ...) \
-    ALOGI("[%s] " msg, mExynosDisplay->mDisplayName.string(), ##__VA_ARGS__)
+    ALOGI("[%s] " msg, mExynosDisplay->mDisplayName.c_str(), ##__VA_ARGS__)
 #define DISPLAY_DRM_LOGW(msg, ...) \
-    ALOGW("[%s] " msg, mExynosDisplay->mDisplayName.string(), ##__VA_ARGS__)
+    ALOGW("[%s] " msg, mExynosDisplay->mDisplayName.c_str(), ##__VA_ARGS__)
 #define DISPLAY_DRM_LOGE(msg, ...) \
-    ALOGE("[%s] " msg, mExynosDisplay->mDisplayName.string(), ##__VA_ARGS__)
+    ALOGE("[%s] " msg, mExynosDisplay->mDisplayName.c_str(), ##__VA_ARGS__)
 
-#define MPP_LOGV(msg, ...) ALOGV("[%s][%d] " msg, mName.string(), mLogicalIndex, ##__VA_ARGS__)
-#define MPP_LOGI(msg, ...) ALOGI("[%s][%d] " msg, mName.string(), mLogicalIndex, ##__VA_ARGS__)
-#define MPP_LOGW(msg, ...) ALOGW("[%s][%d] " msg, mName.string(), mLogicalIndex, ##__VA_ARGS__)
+#define MPP_LOGV(msg, ...) ALOGV("[%s][%d] " msg, mName.c_str(), mLogicalIndex, ##__VA_ARGS__)
+#define MPP_LOGI(msg, ...) ALOGI("[%s][%d] " msg, mName.c_str(), mLogicalIndex, ##__VA_ARGS__)
+#define MPP_LOGW(msg, ...) ALOGW("[%s][%d] " msg, mName.c_str(), mLogicalIndex, ##__VA_ARGS__)
 #define MPP_LOGE(msg, ...) \
     {\
-        ALOGE("[%s][%d] " msg, mName.string(), mLogicalIndex, ##__VA_ARGS__); \
+        ALOGE("[%s][%d] " msg, mName.c_str(), mLogicalIndex, ##__VA_ARGS__); \
         String8 saveString; \
         saveString.appendFormat(msg, ##__VA_ARGS__); \
         saveErrorLog(saveString, mAssignedDisplay); \
@@ -160,29 +160,29 @@
     if (CC_UNLIKELY(ATRACE_ENABLED())) {            \
         String8 traceName;                          \
         traceName.appendFormat(fmt, ##__VA_ARGS__); \
-        ATRACE_BEGIN(traceName.string());           \
+        ATRACE_BEGIN(traceName.c_str());            \
     }                                               \
     ScopedTraceEnder traceEnder
 
-#define DISPLAY_ATRACE_NAME(name) ATRACE_FORMAT("%s for %s", name, mDisplayTraceName.string())
+#define DISPLAY_ATRACE_NAME(name) ATRACE_FORMAT("%s for %s", name, mDisplayTraceName.c_str())
 #define DISPLAY_ATRACE_CALL() DISPLAY_ATRACE_NAME(__func__)
-#define DISPLAY_ATRACE_INT(name, value)                                                     \
-    if (CC_UNLIKELY(ATRACE_ENABLED())) {                                                    \
-        ATRACE_INT(String8::format("%s for %s", name, mDisplayTraceName.string()).string(), \
-                   value);                                                                  \
+#define DISPLAY_ATRACE_INT(name, value)                                                   \
+    if (CC_UNLIKELY(ATRACE_ENABLED())) {                                                  \
+        ATRACE_INT(String8::format("%s for %s", name, mDisplayTraceName.c_str()).c_str(), \
+                   value);                                                                \
     }
-#define DISPLAY_ATRACE_INT64(name, value)                                                     \
-    if (CC_UNLIKELY(ATRACE_ENABLED())) {                                                      \
-        ATRACE_INT64(String8::format("%s for %s", name, mDisplayTraceName.string()).string(), \
-                     value);                                                                  \
+#define DISPLAY_ATRACE_INT64(name, value)                                                   \
+    if (CC_UNLIKELY(ATRACE_ENABLED())) {                                                    \
+        ATRACE_INT64(String8::format("%s for %s", name, mDisplayTraceName.c_str()).c_str(), \
+                     value);                                                                \
     }
 
 #define DISPLAY_LOGD_AND_ATRACE_NAME(debugFlag, fmt, ...)                    \
     if (hwcCheckDebugMessages(debugFlag) || CC_UNLIKELY(ATRACE_ENABLED())) { \
         String8 log;                                                         \
         log.appendFormat((fmt), ##__VA_ARGS__);                              \
-        DISPLAY_LOGD(debugFlag, "%s", log.string());                         \
-        if (CC_UNLIKELY(ATRACE_ENABLED())) ATRACE_NAME(log.string());        \
+        DISPLAY_LOGD(debugFlag, "%s", log.c_str());                          \
+        if (CC_UNLIKELY(ATRACE_ENABLED())) ATRACE_NAME(log.c_str());         \
     }
 
 #endif
diff --git a/libhwc2.1/libdevice/BrightnessController.cpp b/libhwc2.1/libdevice/BrightnessController.cpp
index 0a62d15..cc36c94 100644
--- a/libhwc2.1/libdevice/BrightnessController.cpp
+++ b/libhwc2.1/libdevice/BrightnessController.cpp
@@ -181,9 +181,9 @@
     String8 nodeName;
     nodeName.appendFormat(kDimBrightnessFileNode, mPanelIndex);
 
-    std::ifstream ifsDimBrightness(nodeName.string());
+    std::ifstream ifsDimBrightness(nodeName.c_str());
     if (ifsDimBrightness.fail()) {
-        ALOGW("%s fail to open %s", __func__, nodeName.string());
+        ALOGW("%s fail to open %s", __func__, nodeName.c_str());
     } else {
         ifsDimBrightness >> mDimBrightness;
         ifsDimBrightness.close();
@@ -210,11 +210,12 @@
     String8 propName;
     propName.appendFormat(kDimmingUsagePropName, mPanelIndex);
 
-    mBrightnessDimmingUsage = static_cast<BrightnessDimmingUsage>(property_get_int32(propName, 0));
+    mBrightnessDimmingUsage =
+            static_cast<BrightnessDimmingUsage>(property_get_int32(propName.c_str(), 0));
 
     propName.clear();
     propName.appendFormat(kDimmingHbmTimePropName, mPanelIndex);
-    mHbmDimmingTimeUs = property_get_int32(propName, kHbmDimmingTimeUs);
+    mHbmDimmingTimeUs = property_get_int32(propName.c_str(), kHbmDimmingTimeUs);
 
     if (mBrightnessDimmingUsage == BrightnessDimmingUsage::NORMAL) {
         mDimming.store(true);
@@ -229,18 +230,18 @@
 void BrightnessController::initBrightnessSysfs() {
     String8 nodeName;
     nodeName.appendFormat(BRIGHTNESS_SYSFS_NODE, mPanelIndex);
-    mBrightnessOfs.open(nodeName.string(), std::ofstream::out);
+    mBrightnessOfs.open(nodeName.c_str(), std::ofstream::out);
     if (mBrightnessOfs.fail()) {
-        ALOGE("%s %s fail to open", __func__, nodeName.string());
+        ALOGE("%s %s fail to open", __func__, nodeName.c_str());
         return;
     }
 
     nodeName.clear();
     nodeName.appendFormat(MAX_BRIGHTNESS_SYSFS_NODE, mPanelIndex);
 
-    std::ifstream ifsMaxBrightness(nodeName.string());
+    std::ifstream ifsMaxBrightness(nodeName.c_str());
     if (ifsMaxBrightness.fail()) {
-        ALOGE("%s fail to open %s", __func__, nodeName.string());
+        ALOGE("%s fail to open %s", __func__, nodeName.c_str());
         return;
     }
 
@@ -249,9 +250,9 @@
 
     nodeName.clear();
     nodeName.appendFormat(kGlobalAclModeFileNode, mPanelIndex);
-    mAclModeOfs.open(nodeName.string(), std::ofstream::out);
+    mAclModeOfs.open(nodeName.c_str(), std::ofstream::out);
     if (mAclModeOfs.fail()) {
-        ALOGI("%s %s not supported", __func__, nodeName.string());
+        ALOGI("%s %s not supported", __func__, nodeName.c_str());
     } else {
         String8 propName;
         propName.appendFormat(kAclModeDefaultPropName, mPanelIndex);
@@ -268,9 +269,9 @@
     String8 nodeName;
     nodeName.appendFormat(kLocalCabcModeFileNode, mPanelIndex);
 
-    mCabcModeOfs.open(nodeName.string(), std::ofstream::out);
+    mCabcModeOfs.open(nodeName.c_str(), std::ofstream::out);
     if (mCabcModeOfs.fail()) {
-        ALOGE("%s %s fail to open", __func__, nodeName.string());
+        ALOGE("%s %s fail to open", __func__, nodeName.c_str());
         return;
     }
 }
diff --git a/libhwc2.1/libdevice/ExynosDevice.cpp b/libhwc2.1/libdevice/ExynosDevice.cpp
index 6cff26a..0f2d202 100644
--- a/libhwc2.1/libdevice/ExynosDevice.cpp
+++ b/libhwc2.1/libdevice/ExynosDevice.cpp
@@ -168,12 +168,12 @@
     }
 
     for (auto it : mDisplays) {
-        std::string displayName = std::string(it->mDisplayName.string());
+        std::string displayName = std::string(it->mDisplayName.c_str());
         it->mErrLogFileWriter.setPrefixName(displayName + "_hwc_error_log");
         it->mDebugDumpFileWriter.setPrefixName(displayName + "_hwc_debug");
         it->mFenceFileWriter.setPrefixName(displayName + "_hwc_fence_state");
         String8 saveString;
-        saveString.appendFormat("ExynosDisplay %s is initialized", it->mDisplayName.string());
+        saveString.appendFormat("ExynosDisplay %s is initialized", it->mDisplayName.c_str());
         saveErrorLog(saveString, it);
     }
 
@@ -409,7 +409,7 @@
         size_t copySize = min(static_cast<size_t>(*outSize), result.size());
         ALOGI("HWC dump:: resultSize(%zu), outSize(%d), copySize(%zu)", result.size(), *outSize,
               copySize);
-        strlcpy(outBuffer, result.string(), copySize);
+        strlcpy(outBuffer, result.c_str(), copySize);
     }
 }
 
@@ -992,7 +992,7 @@
     VendorGraphicBufferMeta gmeta(mBuffer);
 
     snprintf(filePath, MAX_DEV_NAME,
-            "%s/%s", WRITEBACK_CAPTURE_PATH, fileName.string());
+            "%s/%s", WRITEBACK_CAPTURE_PATH, fileName.c_str());
     FILE *fp = fopen(filePath, "w");
     if (fp) {
         uint32_t writeSize =
diff --git a/libhwc2.1/libdevice/ExynosDisplay.cpp b/libhwc2.1/libdevice/ExynosDisplay.cpp
index 81b5840..3688207 100644
--- a/libhwc2.1/libdevice/ExynosDisplay.cpp
+++ b/libhwc2.1/libdevice/ExynosDisplay.cpp
@@ -938,9 +938,9 @@
         if ((mOtfMPP == NULL) && (mM2mMPP == NULL))
             result.appendFormat("\tresource is not assigned\n");
         if (mOtfMPP != NULL)
-            result.appendFormat("\tassignedMPP: %s\n", mOtfMPP->mName.string());
+            result.appendFormat("\tassignedMPP: %s\n", mOtfMPP->mName.c_str());
         if (mM2mMPP != NULL)
-            result.appendFormat("\t%s\n", mM2mMPP->mName.string());
+            result.appendFormat("\t%s\n", mM2mMPP->mName.c_str());
     }
     if (mTargetBuffer != NULL) {
         uint64_t internal_format = 0;
@@ -1553,7 +1553,7 @@
                     android::String8 result;
                     result.appendFormat("config[%zu]\n", i);
                     dumpConfig(result, mLastDpuData.configs[i]);
-                    DISPLAY_LOGE("%s", result.string());
+                    DISPLAY_LOGE("%s", result.c_str());
                 }
                 DISPLAY_LOGE("compositionInfo.mLastWinConfigData config [%d, %d, %d]",
                         compositionInfo.mLastWinConfigData.fd_idma[0],
@@ -2438,8 +2438,8 @@
     struct timeval tv;
     gettimeofday(&tv, NULL);
     reason.appendFormat("errFrameNumber: %" PRId64 " time:%s\n", mErrorFrameCount,
-                        getLocalTimeStr(tv).string());
-    ALOGD("%s", reason.string());
+                        getLocalTimeStr(tv).c_str());
+    ALOGD("%s", reason.c_str());
 
     bool fileOpened = mDebugDumpFileWriter.chooseOpenedFile();
     mDebugDumpFileWriter.write(reason);
@@ -2453,13 +2453,13 @@
     const ExynosCompositionInfo& exynosCompInfo = mExynosCompositionInfo;
     clientCompInfo.dump(result);
     exynosCompInfo.dump(result);
-    ALOGD("%s", result.string());
+    ALOGD("%s", result.c_str());
     mDebugDumpFileWriter.write(result);
     result.clear();
 
     result.appendFormat("=======================  dump exynos layers (%zu)  ================================\n",
             mLayers.size());
-    ALOGD("%s", result.string());
+    ALOGD("%s", result.c_str());
     mDebugDumpFileWriter.write(result);
     result.clear();
     for (uint32_t i = 0; i < mLayers.size(); i++) {
@@ -2475,7 +2475,7 @@
     if (mIgnoreLayers.size()) {
         result.appendFormat("=======================  dump ignore layers (%zu)  ================================\n",
                             mIgnoreLayers.size());
-        ALOGD("%s", result.string());
+        ALOGD("%s", result.c_str());
         mDebugDumpFileWriter.write(result);
         result.clear();
         for (uint32_t i = 0; i < mIgnoreLayers.size(); i++) {
@@ -2490,7 +2490,7 @@
     }
 
     result.appendFormat("=============================  dump win configs  ===================================\n");
-    ALOGD("%s", result.string());
+    ALOGD("%s", result.c_str());
     mDebugDumpFileWriter.write(result);
     result.clear();
     for (size_t i = 0; i < mDpuData.configs.size(); i++) {
@@ -2523,7 +2523,7 @@
                     if ((config.assignedMPP != NULL) &&
                         (config.assignedMPP == compare_config.assignedMPP)) {
                         DISPLAY_LOGE("WIN_CONFIG error: duplicated assignedMPP(%s) between win%zu, win%zu",
-                                config.assignedMPP->mName.string(), i, j);
+                                config.assignedMPP->mName.c_str(), i, j);
                         compare_config.state = compare_config.WIN_STATE_DISABLED;
                         flagValidConfig = false;
                         continue;
@@ -2565,7 +2565,7 @@
                 {
                     DISPLAY_LOGE("WIN_CONFIG error: invalid src alignment : %zu, "\
                             "assignedMPP: %s, mppType:%d, format(%d), s_x: %d(%d), s_y: %d(%d), s_w : %d(%d), s_h : %d(%d)", i,
-                            config.assignedMPP->mName.string(), exynosMPP->mLogicalType, config.format, config.src.x, srcXAlign,
+                            config.assignedMPP->mName.c_str(), exynosMPP->mLogicalType, config.format, config.src.x, srcXAlign,
                             config.src.y, srcYAlign, config.src.w, srcWidthAlign, config.src.h, srcHeightAlign);
                     configInvalid = true;
                 }
@@ -3199,7 +3199,7 @@
                 *outSize, strSize);
         strSize = *outSize;
     }
-    std::strncpy(outName, mDisplayName, strSize);
+    std::strncpy(outName, mDisplayName.c_str(), strSize);
     *outSize = strSize;
 
     return HWC2_ERROR_NONE;
@@ -3676,7 +3676,7 @@
                     mLayers[i]->mExynosCompositionType,
                     mLayers[i]->mValidateCompositionType);
             if (mLayers[i]->mM2mMPP != NULL)
-                DISPLAY_LOGE("\t%s is assigned", mLayers[i]->mM2mMPP->mName.string());
+                DISPLAY_LOGE("\t%s is assigned", mLayers[i]->mM2mMPP->mName.c_str());
             if (mLayers[i]->mAcquireFence > 0)
                 fence_close(mLayers[i]->mAcquireFence, this,
                         FENCE_TYPE_SRC_ACQUIRE, FENCE_IP_LAYER);
@@ -3859,7 +3859,7 @@
             for (size_t i = 0; i < mLastDpuData.configs.size(); i++) {
                 errString.appendFormat("config[%zu]\n", i);
                 dumpConfig(errString, mLastDpuData.configs[i]);
-                DISPLAY_LOGE("\t%s", errString.string());
+                DISPLAY_LOGE("\t%s", errString.c_str());
                 errString.clear();
             }
             errString.appendFormat("%s:: skip flag is enabled but buffer is updated\n",
@@ -4783,7 +4783,7 @@
     Mutex::Autolock lock(mDisplayMutex);
     result.appendFormat("[%s] display information size: %d x %d, vsyncState: %d, colorMode: %d, "
                         "colorTransformHint: %d, orientation %d\n",
-                        mDisplayName.string(), mXres, mYres, mVsyncState, mColorMode,
+                        mDisplayName.c_str(), mXres, mYres, mVsyncState, mColorMode,
                         mColorTransformHint, mMountOrientation);
     mClientCompositionInfo.dump(result);
     mExynosCompositionInfo.dump(result);
@@ -5214,7 +5214,7 @@
             if ((ret = m2mMPP->assignMPP(this, layer)) != NO_ERROR)
             {
                 HWC_LOGE(this, "%s:: %s MPP assignMPP() error (%d)",
-                        __func__, m2mMPP->mName.string(), ret);
+                        __func__, m2mMPP->mName.c_str(), ret);
                 return ret;
             }
             if (layer->mValidateCompositionType == HWC2_COMPOSITION_DEVICE) mWindowNumUsed--;
@@ -5255,7 +5255,7 @@
                 if ((ret = m2mMPP->assignMPP(this, mLayers[maxPriorityIndex])) != NO_ERROR)
                 {
                     ALOGE("%s:: %s MPP assignMPP() error (%d)",
-                            __func__, m2mMPP->mName.string(), ret);
+                            __func__, m2mMPP->mName.c_str(), ret);
                     return ret;
                 }
             }
diff --git a/libhwc2.1/libdevice/ExynosDisplay.h b/libhwc2.1/libdevice/ExynosDisplay.h
index 9d2fd67..51286ad 100644
--- a/libhwc2.1/libdevice/ExynosDisplay.h
+++ b/libhwc2.1/libdevice/ExynosDisplay.h
@@ -1583,7 +1583,7 @@
             bool chooseOpenedFile();
             void write(const String8& content) {
                 if (mFile) {
-                    fwrite(content.string(), 1, content.size(), mFile);
+                    fwrite(content.c_str(), 1, content.size(), mFile);
                 }
             }
             void flush() {
diff --git a/libhwc2.1/libdevice/ExynosLayer.cpp b/libhwc2.1/libdevice/ExynosLayer.cpp
index 2f2850a..5d5a614 100644
--- a/libhwc2.1/libdevice/ExynosLayer.cpp
+++ b/libhwc2.1/libdevice/ExynosLayer.cpp
@@ -327,7 +327,7 @@
         uint32_t minDstHeight = exynosMPPVG->getDstMinHeight(dst_img);
         if ((uint32_t)WIDTH(mDisplayFrame) < minDstWidth) {
             ALOGI("%s DRM layer displayFrame width %d is smaller than otf minWidth %d",
-                    mDisplay->mDisplayName.string(),
+                    mDisplay->mDisplayName.c_str(),
                     WIDTH(mDisplayFrame), minDstWidth);
             mPreprocessedInfo.displayFrame.right = mDisplayFrame.left +
                 pixel_align(WIDTH(mDisplayFrame), minDstWidth);
@@ -340,7 +340,7 @@
         }
         if ((uint32_t)HEIGHT(mDisplayFrame) < minDstHeight) {
             ALOGI("%s DRM layer displayFrame height %d is smaller than vpp minHeight %d",
-                    mDisplay->mDisplayName.string(),
+                    mDisplay->mDisplayName.c_str(),
                     HEIGHT(mDisplayFrame), minDstHeight);
             mPreprocessedInfo.displayFrame.bottom = mDisplayFrame.top +
                 pixel_align(HEIGHT(mDisplayFrame), minDstHeight);
@@ -979,12 +979,12 @@
 {
     int32_t ret = NO_ERROR;
     if (mM2mMPP != NULL) {
-        HDEBUGLOGD(eDebugResourceManager, "\t\t %s mpp is reset", mM2mMPP->mName.string());
+        HDEBUGLOGD(eDebugResourceManager, "\t\t %s mpp is reset", mM2mMPP->mName.c_str());
         mM2mMPP->resetAssignedState(this);
         mM2mMPP = NULL;
     }
     if (mOtfMPP != NULL) {
-        HDEBUGLOGD(eDebugResourceManager, "\t\t %s mpp is reset", mOtfMPP->mName.string());
+        HDEBUGLOGD(eDebugResourceManager, "\t\t %s mpp is reset", mOtfMPP->mName.c_str());
         mOtfMPP->resetAssignedState();
         mOtfMPP = NULL;
     }
@@ -1052,9 +1052,9 @@
         } else {
             tb.add("handle", mLayerBuffer)
                     .add("fd", std::vector<int>({fd, fd1, fd2}))
-                    .add("compression", getCompressionStr(mCompressionInfo).string());
+                    .add("compression", getCompressionStr(mCompressionInfo).c_str());
         }
-        tb.add("format", getFormatStr(format, mCompressionInfo.type).string())
+        tb.add("format", getFormatStr(format, mCompressionInfo.type).c_str())
                 .add("dataSpace", mDataSpace, true)
                 .add("colorTr", mLayerColorTransform.enable)
                 .add("blend", mBlending, true)
@@ -1095,13 +1095,13 @@
     if ((mDisplay != NULL) && (mDisplay->mResourceManager != NULL)) {
         result.appendFormat("MPPFlags for otfMPP\n");
         for (uint32_t i = 0; i < mDisplay->mResourceManager->getOtfMPPSize(); i++) {
-            result.appendFormat("[%s: 0x%" PRIx64 "] ", mDisplay->mResourceManager->getOtfMPP(i)->mName.string(),
+            result.appendFormat("[%s: 0x%" PRIx64 "] ", mDisplay->mResourceManager->getOtfMPP(i)->mName.c_str(),
                     mCheckMPPFlag[mDisplay->mResourceManager->getOtfMPP(i)->mLogicalType]);
         }
         result.appendFormat("\n");
         result.appendFormat("MPPFlags for m2mMPP\n");
         for (uint32_t i = 0; i < mDisplay->mResourceManager->getM2mMPPSize(); i++) {
-            result.appendFormat("[%s: 0x%" PRIx64 "] ", mDisplay->mResourceManager->getM2mMPP(i)->mName.string(),
+            result.appendFormat("[%s: 0x%" PRIx64 "] ", mDisplay->mResourceManager->getM2mMPP(i)->mName.c_str(),
                     mCheckMPPFlag[mDisplay->mResourceManager->getM2mMPP(i)->mLogicalType]);
             if ((i!=0) && (i%4==0)) result.appendFormat("\n");
         }
@@ -1111,9 +1111,9 @@
     if ((mOtfMPP == NULL) && (mM2mMPP == NULL))
         result.appendFormat("\tresource is not assigned.\n");
     if (mOtfMPP != NULL)
-        result.appendFormat("\tassignedMPP: %s\n", mOtfMPP->mName.string());
+        result.appendFormat("\tassignedMPP: %s\n", mOtfMPP->mName.c_str());
     if (mM2mMPP != NULL)
-        result.appendFormat("\tassignedM2mMPP: %s\n", mM2mMPP->mName.string());
+        result.appendFormat("\tassignedM2mMPP: %s\n", mM2mMPP->mName.c_str());
     result.appendFormat("\tdump midImg\n");
     dumpExynosImage(result, mMidImg);
 
@@ -1140,8 +1140,8 @@
     result.appendFormat("handle: %p [fd: %d, %d, %d], acquireFence: %d, tr: 0x%2x, compression: "
                         "%s, dataSpace: 0x%8x, format: %s\n",
                         mLayerBuffer, fd, fd1, fd2, mAcquireFence, mTransform,
-                        getCompressionStr(mCompressionInfo).string(), mDataSpace,
-                        getFormatStr(format, mCompressionInfo.type).string());
+                        getCompressionStr(mCompressionInfo).c_str(), mDataSpace,
+                        getFormatStr(format, mCompressionInfo.type).c_str());
     result.appendFormat("\tblend: 0x%4x, planeAlpha: %3.1f, zOrder: %d, color[0x%2x, 0x%2x, 0x%2x, 0x%2x]\n",
             mBlending, mPlaneAlpha, mZOrder, mColor.r, mColor.g, mColor.b, mColor.a);
     result.appendFormat("\tfps: %.2f, priority: %d, windowIndex: %d\n", mFps, mOverlayPriority,
@@ -1157,31 +1157,31 @@
     if ((mDisplay != NULL) && (mDisplay->mResourceManager != NULL)) {
         result.appendFormat("MPPFlags for otfMPP\n");
         for (uint32_t i = 0; i < mDisplay->mResourceManager->getOtfMPPSize(); i++) {
-            result.appendFormat("[%s: 0x%" PRIx64 "] ", mDisplay->mResourceManager->getOtfMPP(i)->mName.string(),
+            result.appendFormat("[%s: 0x%" PRIx64 "] ", mDisplay->mResourceManager->getOtfMPP(i)->mName.c_str(),
                     mCheckMPPFlag[mDisplay->mResourceManager->getOtfMPP(i)->mLogicalType]);
         }
         result.appendFormat("\n");
         result.appendFormat("MPPFlags for m2mMPP\n");
         for (uint32_t i = 0; i < mDisplay->mResourceManager->getM2mMPPSize(); i++) {
-            result.appendFormat("[%s: 0x%" PRIx64 "] ", mDisplay->mResourceManager->getM2mMPP(i)->mName.string(),
+            result.appendFormat("[%s: 0x%" PRIx64 "] ", mDisplay->mResourceManager->getM2mMPP(i)->mName.c_str(),
                     mCheckMPPFlag[mDisplay->mResourceManager->getM2mMPP(i)->mLogicalType]);
             if ((i!=0) && (i%4==0)) result.appendFormat("\n");
         }
         result.appendFormat("\n");
     }
 
-    ALOGD("%s", result.string());
+    ALOGD("%s", result.c_str());
     result.clear();
 
     if ((mOtfMPP == NULL) && (mM2mMPP == NULL))
         ALOGD("\tresource is not assigned.");
     if (mOtfMPP != NULL)
-        ALOGD("\tassignedMPP: %s", mOtfMPP->mName.string());
+        ALOGD("\tassignedMPP: %s", mOtfMPP->mName.c_str());
     if (mM2mMPP != NULL)
-        ALOGD("\tassignedM2mMPP: %s", mM2mMPP->mName.string());
+        ALOGD("\tassignedM2mMPP: %s", mM2mMPP->mName.c_str());
     ALOGD("\t++ dump midImg ++");
     dumpExynosImage(result, mMidImg);
-    ALOGD("%s", result.string());
+    ALOGD("%s", result.c_str());
 
 }
 
diff --git a/libhwc2.1/libdevice/HistogramDevice.cpp b/libhwc2.1/libdevice/HistogramDevice.cpp
index 3f08193..f31961f 100644
--- a/libhwc2.1/libdevice/HistogramDevice.cpp
+++ b/libhwc2.1/libdevice/HistogramDevice.cpp
@@ -267,7 +267,7 @@
         return;
     }
 
-    ATRACE_NAME(String8::format("handleHistogramDrmEvent #%u", channelId).string());
+    ATRACE_NAME(String8::format("handleHistogramDrmEvent #%u", channelId).c_str());
     if (channelId >= mChannels.size()) {
         ALOGE("%s: histogram channel #%u: invalid channelId", __func__, channelId);
         return;
@@ -491,7 +491,7 @@
 
 void HistogramDevice::getHistogramData(uint8_t channelId, std::vector<char16_t> *histogramBuffer,
                                        HistogramErrorCode *histogramErrorCode) {
-    ATRACE_NAME(String8::format("%s #%u", __func__, channelId).string());
+    ATRACE_NAME(String8::format("%s #%u", __func__, channelId).c_str());
     int32_t ret;
     ExynosDisplayDrmInterface *moduleDisplayInterface =
             static_cast<ExynosDisplayDrmInterface *>(mDisplay->mDisplayInterface.get());
@@ -528,7 +528,7 @@
     channel.histDataCollecting = true;
 
     {
-        ATRACE_NAME(String8::format("waitDrmEvent #%u", channelId).string());
+        ATRACE_NAME(String8::format("waitDrmEvent #%u", channelId).c_str());
         /* Wait until the condition variable is notified or timeout. */
         channel.histDataCollecting_cv.wait_for(lock, std::chrono::milliseconds(50),
                                                [this, &channel]() {
@@ -625,7 +625,7 @@
 }
 
 void HistogramDevice::cleanupChannelInfo(uint8_t channelId) {
-    ATRACE_NAME(String8::format("%s #%u", __func__, channelId).string());
+    ATRACE_NAME(String8::format("%s #%u", __func__, channelId).c_str());
     ChannelInfo &channel = mChannels[channelId];
     std::scoped_lock lock(channel.channelInfoMutex);
     channel.status = ChannelStatus_t::DISABLE_PENDING;
@@ -645,7 +645,7 @@
 
 void HistogramDevice::fillupChannelInfo(uint8_t channelId, const ndk::SpAIBinder &token,
                                         const HistogramConfig &histogramConfig, int threshold) {
-    ATRACE_NAME(String8::format("%s #%u", __func__, channelId).string());
+    ATRACE_NAME(String8::format("%s #%u", __func__, channelId).c_str());
     ChannelInfo &channel = mChannels[channelId];
     std::scoped_lock lock(channel.channelInfoMutex);
     channel.status = ChannelStatus_t::CONFIG_PENDING;
diff --git a/libhwc2.1/libdisplayinterface/ExynosDeviceInterface.cpp b/libhwc2.1/libdisplayinterface/ExynosDeviceInterface.cpp
index fd200e3..4893310 100644
--- a/libhwc2.1/libdisplayinterface/ExynosDeviceInterface.cpp
+++ b/libhwc2.1/libdisplayinterface/ExynosDeviceInterface.cpp
@@ -99,7 +99,7 @@
             queried_format.format = format;
             queried_format.reserved = 0;
             resourceManager->makeFormatRestrictions(queried_format);
-            HDEBUGLOGD(eDebugAttrSetting, "%s : %d", getMPPStr(hwType).string(), format);
+            HDEBUGLOGD(eDebugAttrSetting, "%s : %d", getMPPStr(hwType).c_str(), format);
         }
     }
 
diff --git a/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp b/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
index 66c59c4..e8a4001 100644
--- a/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
+++ b/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
@@ -694,13 +694,13 @@
 
     if ((mDrmCrtc = mDrmDevice->GetCrtcForDisplay(drmDisplayId)) == NULL) {
         ALOGE("%s:: GetCrtcForDisplay is NULL (id: %d)",
-                mExynosDisplay->mDisplayName.string(), drmDisplayId);
+                mExynosDisplay->mDisplayName.c_str(), drmDisplayId);
         return -EINVAL;
     }
 
     if ((mDrmConnector = mDrmDevice->GetConnectorForDisplay(drmDisplayId)) == NULL) {
         ALOGE("%s:: GetConnectorForDisplay is NULL (id: %d)",
-                mExynosDisplay->mDisplayName.string(), drmDisplayId);
+                mExynosDisplay->mDisplayName.c_str(), drmDisplayId);
         return -EINVAL;
     }
 
@@ -708,7 +708,7 @@
     if (((mExynosDisplay->mType == HWC_DISPLAY_PRIMARY) && mDrmConnector->external()) ||
          ((mExynosDisplay->mType == HWC_DISPLAY_EXTERNAL) && mDrmConnector->internal())) {
          ALOGE("%s:: Display(id: %u) is not matched with Connector(id: %u)",
-                 mExynosDisplay->mDisplayName.string(), drmDisplayId, mDrmConnector->id());
+                 mExynosDisplay->mDisplayName.c_str(), drmDisplayId, mDrmConnector->id());
          return -EINVAL;
     }
 
@@ -1094,7 +1094,7 @@
     for (uint32_t i = 0; i < num_modes; i++) {
         auto mode = mDrmConnector->modes().at(i);
         ALOGD("%s display config[%d] %s:: id(%d), clock(%d), flags(%d), type(%d)",
-                mExynosDisplay->mDisplayName.string(), i, mode.name().c_str(), mode.id(), mode.clock(), mode.flags(), mode.type());
+                mExynosDisplay->mDisplayName.c_str(), i, mode.name().c_str(), mode.id(), mode.clock(), mode.flags(), mode.type());
         ALOGD("\th_display(%d), h_sync_start(%d), h_sync_end(%d), h_total(%d), h_skew(%d)",
                 mode.h_display(), mode.h_sync_start(), mode.h_sync_end(), mode.h_total(), mode.h_skew());
         ALOGD("\tv_display(%d), v_sync_start(%d), v_sync_end(%d), v_total(%d), v_scan(%d), v_refresh(%f)",
@@ -1233,7 +1233,7 @@
 {
     std::lock_guard<std::recursive_mutex> lock(mDrmConnector->modesLock());
 
-    ALOGD("%s:: %s config(%d) test(%d)", __func__, mExynosDisplay->mDisplayName.string(), config,
+    ALOGD("%s:: %s config(%d) test(%d)", __func__, mExynosDisplay->mDisplayName.c_str(), config,
           test);
 
     auto mode = std::find_if(mDrmConnector->modes().begin(), mDrmConnector->modes().end(),
@@ -1484,7 +1484,7 @@
     if ((ret == 0) && (hdr_formats & (1 << typeBit))) {
         mExynosDisplay->mHdrTypes.push_back(HAL_HDR_DOLBY_VISION);
         HDEBUGLOGD(eDebugHWC, "%s: supported hdr types : %d",
-                mExynosDisplay->mDisplayName.string(), HAL_HDR_DOLBY_VISION);
+                mExynosDisplay->mDisplayName.c_str(), HAL_HDR_DOLBY_VISION);
     }
     std::tie(typeBit, ret) = prop_hdr_formats.GetEnumValueWithName("HDR10");
     if ((ret == 0) && (hdr_formats & (1 << typeBit))) {
@@ -1493,23 +1493,23 @@
             mExynosDisplay->mHdrTypes.push_back(HAL_HDR_HDR10_PLUS);
         }
         HDEBUGLOGD(eDebugHWC, "%s: supported hdr types : %d",
-                mExynosDisplay->mDisplayName.string(), HAL_HDR_HDR10);
+                mExynosDisplay->mDisplayName.c_str(), HAL_HDR_HDR10);
     }
     std::tie(typeBit, ret) = prop_hdr_formats.GetEnumValueWithName("HLG");
     if ((ret == 0) && (hdr_formats & (1 << typeBit))) {
         mExynosDisplay->mHdrTypes.push_back(HAL_HDR_HLG);
         HDEBUGLOGD(eDebugHWC, "%s: supported hdr types : %d",
-                mExynosDisplay->mDisplayName.string(), HAL_HDR_HLG);
+                mExynosDisplay->mDisplayName.c_str(), HAL_HDR_HLG);
     }
 
     ALOGI("%s: get hdrCapabilities info max_luminance(%" PRId64 "), "
             "max_avg_luminance(%" PRId64 "), min_luminance(%" PRId64 "), "
             "hdr_formats(0x%" PRIx64 ")",
-            mExynosDisplay->mDisplayName.string(),
+            mExynosDisplay->mDisplayName.c_str(),
             max_luminance, max_avg_luminance, min_luminance, hdr_formats);
 
     ALOGI("%s: mHdrTypes size(%zu), maxLuminance(%f), maxAverageLuminance(%f), minLuminance(%f)",
-            mExynosDisplay->mDisplayName.string(), mExynosDisplay->mHdrTypes.size(), mExynosDisplay->mMaxLuminance,
+            mExynosDisplay->mDisplayName.c_str(), mExynosDisplay->mHdrTypes.size(), mExynosDisplay->mMaxLuminance,
             mExynosDisplay->mMaxAverageLuminance, mExynosDisplay->mMinLuminance);
 
     return 0;
@@ -1732,7 +1732,7 @@
 
         HDEBUGLOGD(eDebugWindowUpdate,
                 "%s: partial region updated [%d, %d, %d, %d] -> [%d, %d, %d, %d] blob(%d)",
-                mExynosDisplay->mDisplayName.string(),
+                mExynosDisplay->mDisplayName.c_str(),
                 mPartialRegionState.partial_rect.x1,
                 mPartialRegionState.partial_rect.y1,
                 mPartialRegionState.partial_rect.x2,
@@ -2271,7 +2271,7 @@
         result.appendFormat("atomic commit error\n");
         if (hwcCheckDebugMessages(eDebugDisplayInterfaceConfig) == false)
             dumpAtomicCommitInfo(result);
-        HWC_LOGE(mDrmDisplayInterface->mExynosDisplay, "%s", result.string());
+        HWC_LOGE(mDrmDisplayInterface->mExynosDisplay, "%s", result.c_str());
     }
 
     if(mPset)
@@ -2314,7 +2314,7 @@
         return result;
 
     if (debugPrint)
-        ALOGD("%s atomic config ++++++++++++", mDrmDisplayInterface->mExynosDisplay->mDisplayName.string());
+        ALOGD("%s atomic config ++++++++++++", mDrmDisplayInterface->mExynosDisplay->mDisplayName.c_str());
 
     for (int i = 0; i < drmModeAtomicGetCursor(mPset); i++) {
         const DrmProperty *property = NULL;
@@ -2376,10 +2376,10 @@
 
         if (debugPrint)
             ALOGD("property[%d] %s object_id: %d, property_id: %d, name: %s,  value: %" PRId64 ")\n",
-                    i, objectName.string(), mPset->items[i].object_id, mPset->items[i].property_id, property->name().c_str(), mPset->items[i].value);
+                    i, objectName.c_str(), mPset->items[i].object_id, mPset->items[i].property_id, property->name().c_str(), mPset->items[i].value);
         else
             result.appendFormat("property[%d] %s object_id: %d, property_id: %d, name: %s,  value: %" PRId64 ")\n",
-                i,  objectName.string(), mPset->items[i].object_id, mPset->items[i].property_id, property->name().c_str(), mPset->items[i].value);
+                i,  objectName.c_str(), mPset->items[i].object_id, mPset->items[i].property_id, property->name().c_str(), mPset->items[i].value);
     }
     return result;
 }
@@ -2623,14 +2623,14 @@
 {
     if ((mDrmDevice == nullptr) || (mDrmConnector == nullptr)) {
         ALOGE("%s: display(%s) mDrmDevice(%p), mDrmConnector(%p)",
-                __func__, mExynosDisplay->mDisplayName.string(),
+                __func__, mExynosDisplay->mDisplayName.c_str(),
                 mDrmDevice, mDrmConnector);
         return HWC2_ERROR_UNSUPPORTED;
     }
 
     if (mDrmConnector->edid_property().id() == 0) {
         ALOGD("%s: edid_property is not supported",
-                mExynosDisplay->mDisplayName.string());
+                mExynosDisplay->mDisplayName.c_str());
         return HWC2_ERROR_UNSUPPORTED;
     }
 
@@ -2647,14 +2647,14 @@
     }
     if (blobId == 0) {
         ALOGD("%s: edid_property is supported but blob is not valid",
-                mExynosDisplay->mDisplayName.string());
+                mExynosDisplay->mDisplayName.c_str());
         return getDisplayFakeEdid(*outPort, *outDataSize, outData);
     }
 
     blob = drmModeGetPropertyBlob(mDrmDevice->fd(), blobId);
     if (blob == nullptr) {
         ALOGD("%s: Failed to get blob",
-                mExynosDisplay->mDisplayName.string());
+                mExynosDisplay->mDisplayName.c_str());
         return HWC2_ERROR_UNSUPPORTED;
     }
 
@@ -2720,7 +2720,7 @@
     int ret = NO_ERROR;
     uint32_t blobId = 0;
 
-    ATRACE_NAME(String8::format("%s #%u", __func__, channelId).string());
+    ATRACE_NAME(String8::format("%s #%u", __func__, channelId).c_str());
 
     const DrmProperty &prop = mDrmCrtc->histogram_channel_property(channelId);
     if (!prop.id()) {
@@ -2748,7 +2748,7 @@
         ExynosDisplayDrmInterface::DrmModeAtomicReq &drmReq, uint8_t channelId) {
     int ret = NO_ERROR;
 
-    ATRACE_NAME(String8::format("%s #%u", __func__, channelId).string());
+    ATRACE_NAME(String8::format("%s #%u", __func__, channelId).c_str());
 
     const DrmProperty &prop = mDrmCrtc->histogram_channel_property(channelId);
     if (!prop.id()) {
diff --git a/libhwc2.1/libdrmresource/drm/vsyncworker.cpp b/libhwc2.1/libdrmresource/drm/vsyncworker.cpp
index bd55d47..a795fb3 100644
--- a/libhwc2.1/libdrmresource/drm/vsyncworker.cpp
+++ b/libhwc2.1/libdrmresource/drm/vsyncworker.cpp
@@ -55,8 +55,8 @@
     drm_ = drm;
     display_ = display;
     display_trace_name_ = display_trace_name;
-    hw_vsync_period_tag_.appendFormat("HWVsyncPeriod for %s", display_trace_name.string());
-    hw_vsync_enabled_tag_.appendFormat("HWCVsync for %s", display_trace_name.string());
+    hw_vsync_period_tag_.appendFormat("HWVsyncPeriod for %s", display_trace_name.c_str());
+    hw_vsync_enabled_tag_.appendFormat("HWCVsync for %s", display_trace_name.c_str());
 
     return InitWorker();
 }
@@ -73,8 +73,8 @@
     last_timestamp_ = -1;
     Unlock();
 
-    ATRACE_INT(hw_vsync_enabled_tag_.string(), static_cast<int32_t>(enabled));
-    ATRACE_INT64(hw_vsync_period_tag_.string(), 0);
+    ATRACE_INT(hw_vsync_enabled_tag_.c_str(), static_cast<int32_t>(enabled));
+    ATRACE_INT64(hw_vsync_period_tag_.c_str(), 0);
     Signal();
 }
 
@@ -213,8 +213,8 @@
 
     if (last_timestamp_ >= 0) {
         int64_t period = timestamp - last_timestamp_;
-        ATRACE_INT64(hw_vsync_period_tag_.string(), period);
-        ALOGV("HW vsync period %" PRId64 "ns for %s", period, display_trace_name_.string());
+        ATRACE_INT64(hw_vsync_period_tag_.c_str(), period);
+        ALOGV("HW vsync period %" PRId64 "ns for %s", period, display_trace_name_.c_str());
     }
 
     last_timestamp_ = timestamp;
diff --git a/libhwc2.1/libhwchelper/ExynosHWCHelper.cpp b/libhwc2.1/libhwchelper/ExynosHWCHelper.cpp
index 557df91..56b58c4 100644
--- a/libhwc2.1/libhwchelper/ExynosHWCHelper.cpp
+++ b/libhwc2.1/libhwchelper/ExynosHWCHelper.cpp
@@ -551,7 +551,7 @@
     String8 result;
     dumpExynosImage(result, img);
 
-    ALOGD("%s", result.string());
+    ALOGD("%s", result.c_str());
 }
 
 void dumpExynosImage(String8& result, exynos_image &img)
@@ -559,12 +559,12 @@
     result.appendFormat("\tbufferHandle: %p, fullWidth: %d, fullHeight: %d, x: %d, y: %d, w: %d, "
                         "h: %d, format: %s\n",
                         img.bufferHandle, img.fullWidth, img.fullHeight, img.x, img.y, img.w, img.h,
-                        getFormatStr(img.format, img.compressionInfo.type).string());
+                        getFormatStr(img.format, img.compressionInfo.type).c_str());
     result.appendFormat("\tusageFlags: 0x%" PRIx64 ", layerFlags: 0x%8x, acquireFenceFd: %d, releaseFenceFd: %d\n",
             img.usageFlags, img.layerFlags, img.acquireFenceFd, img.releaseFenceFd);
     result.appendFormat("\tdataSpace(%d), blending(%d), transform(0x%2x), compression: %s\n",
                         img.dataSpace, img.blending, img.transform,
-                        getCompressionStr(img.compressionInfo).string());
+                        getCompressionStr(img.compressionInfo).c_str());
     if (img.bufferHandle != NULL) {
         VendorGraphicBufferMeta gmeta(img.bufferHandle);
         result.appendFormat("\tbuffer's stride: %d, %d\n", gmeta.stride, gmeta.vstride);
@@ -995,7 +995,7 @@
 
     for (const auto &trace : info.traces) {
         FT_LOGD("> dir: %d, type: %d, ip: %d, time:%s", trace.direction, trace.type, trace.ip,
-                getLocalTimeStr(trace.time).string());
+                getLocalTimeStr(trace.time).c_str());
     }
 }
 
@@ -1025,7 +1025,7 @@
             }
         }
 
-        FT_LOGW("%s", errString.string());
+        FT_LOGW("%s", errString.c_str());
     };
 
     reportLeakFdsLocked(+1);
@@ -1123,7 +1123,7 @@
 
     struct timeval tv;
     gettimeofday(&tv, NULL);
-    saveString.appendFormat("\n====== Fences at time:%s ======\n", getLocalTimeStr(tv).string());
+    saveString.appendFormat("\n====== Fences at time:%s ======\n", getLocalTimeStr(tv).c_str());
 
     for (const auto &[fd, info] : mFenceInfos) {
         saveString.appendFormat("---- Fence FD : %d, Display(%d) ----\n", fd, info.displayId);
@@ -1132,7 +1132,7 @@
 
         for (const auto &trace : info.traces) {
             saveString.appendFormat("> dir: %d, type: %d, ip: %d, time:%s\n", trace.direction,
-                                    trace.type, trace.ip, getLocalTimeStr(trace.time).string());
+                                    trace.type, trace.ip, getLocalTimeStr(trace.time).c_str());
         }
     }
 
diff --git a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.cpp b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.cpp
index 6cc6da8..ec1e8ba 100644
--- a/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.cpp
+++ b/libhwc2.1/libmaindisplay/ExynosPrimaryDisplay.cpp
@@ -269,13 +269,13 @@
 
     ALOGD("%s: mode=%s (%d) vsyncPeriod=%d", __func__, modeStr, config,
             mode.vsyncPeriod);
-    ret = property_set(getPropertyBootModeStr(mDisplayId).string(), modeStr);
+    ret = property_set(getPropertyBootModeStr(mDisplayId).c_str(), modeStr);
 
     return !ret ? HWC2_ERROR_NONE : HWC2_ERROR_BAD_CONFIG;
 }
 
 int32_t ExynosPrimaryDisplay::clearBootDisplayConfig() {
-    auto ret = property_set(getPropertyBootModeStr(mDisplayId).string(), nullptr);
+    auto ret = property_set(getPropertyBootModeStr(mDisplayId).c_str(), nullptr);
 
     ALOGD("%s: clearing boot mode", __func__);
     return !ret ? HWC2_ERROR_NONE : HWC2_ERROR_BAD_CONFIG;
@@ -283,7 +283,7 @@
 
 int32_t ExynosPrimaryDisplay::getPreferredDisplayConfigInternal(int32_t *outConfig) {
     char modeStr[PROPERTY_VALUE_MAX];
-    auto ret = property_get(getPropertyBootModeStr(mDisplayId).string(), modeStr, "");
+    auto ret = property_get(getPropertyBootModeStr(mDisplayId).c_str(), modeStr, "");
 
     if (ret <= 0) {
         return mDisplayInterface->getDefaultModeId(outConfig);
diff --git a/libhwc2.1/libresource/ExynosMPP.cpp b/libhwc2.1/libresource/ExynosMPP.cpp
index afc72f3..406996a 100644
--- a/libhwc2.1/libresource/ExynosMPP.cpp
+++ b/libhwc2.1/libresource/ExynosMPP.cpp
@@ -813,7 +813,7 @@
     if (mExynosMPP == NULL)
         return false;
 
-    ALOGI("%s threadLoop is started", mExynosMPP->mName.string());
+    ALOGI("%s threadLoop is started", mExynosMPP->mName.c_str());
     while(mRunning) {
         Mutex::Autolock lock(mMutex);
         while((mFreedBuffers.size() == 0) &&
@@ -830,7 +830,7 @@
             if ((mStateFences.size() != 0) &&
                     (mExynosMPP->mHWState != MPP_HW_STATE_RUNNING)) {
                 ALOGW("%s, mHWState(%d) but mStateFences size(%zu)",
-                        mExynosMPP->mName.string(), mExynosMPP->mHWState,
+                        mExynosMPP->mName.c_str(), mExynosMPP->mHWState,
                         mStateFences.size());
                 checkStateFences();
             }
@@ -858,14 +858,14 @@
         dumpExynosMPPImgInfo(eDebugMPP|eDebugFence|eDebugBuf, freeBuffer);
         if (fence_valid(freeBuffer.acrylicAcquireFenceFd)) {
             if (sync_wait(freeBuffer.acrylicAcquireFenceFd, 1000) < 0)
-                HWC_LOGE(NULL, "%s:: acquire fence sync_wait error", mExynosMPP->mName.string());
+                HWC_LOGE(NULL, "%s:: acquire fence sync_wait error", mExynosMPP->mName.c_str());
             freeBuffer.acrylicAcquireFenceFd =
                 fence_close(freeBuffer.acrylicAcquireFenceFd, mExynosMPP->mAssignedDisplay,
                         FENCE_TYPE_SRC_ACQUIRE, FENCE_IP_ALL);
         }
         if (fence_valid(freeBuffer.acrylicReleaseFenceFd)) {
             if (sync_wait(freeBuffer.acrylicReleaseFenceFd, 1000) < 0)
-                HWC_LOGE(NULL, "%s:: release fence sync_wait error", mExynosMPP->mName.string());
+                HWC_LOGE(NULL, "%s:: release fence sync_wait error", mExynosMPP->mName.c_str());
             freeBuffer.acrylicReleaseFenceFd =
                 fence_close(freeBuffer.acrylicReleaseFenceFd, mExynosMPP->mAssignedDisplay,
                         FENCE_TYPE_SRC_RELEASE, FENCE_IP_ALL);
@@ -891,7 +891,7 @@
         if (fence_valid(fence)) {
             if (sync_wait(fence, 5000) < 0) {
                 HWC_LOGE(NULL, "%s::[%s][%d] sync_wait(%d) error(%s)", __func__,
-                        mExynosMPP->mName.string(), mExynosMPP->mLogicalIndex, fence, strerror(errno));
+                        mExynosMPP->mName.c_str(), mExynosMPP->mLogicalIndex, fence, strerror(errno));
                 ret = false;
             }
             fence = fence_close(fence, mExynosMPP->mAssignedDisplay,
@@ -2896,7 +2896,7 @@
         assignedDisplayType = mAssignedDisplay->mType;
 
     result.appendFormat("%s: types mppType(%d), (p:%d, l:0x%2x), indexs(p:%d, l:%d), preAssignDisplay(0x%2x)\n",
-            mName.string(), mMPPType, mPhysicalType, mLogicalType, mPhysicalIndex, mLogicalIndex, mPreAssignDisplayInfo);
+            mName.c_str(), mMPPType, mPhysicalType, mLogicalType, mPhysicalIndex, mLogicalIndex, mPreAssignDisplayInfo);
     result.appendFormat("\tEnable: %d, HWState: %d, AssignedState: %d, assignedDisplay(%d)\n",
             mEnable, mHWState, mAssignedState, assignedDisplayType);
     result.appendFormat("\tPrevAssignedState: %d, PrevAssignedDisplayType: %d, ReservedDisplay: %d\n",
diff --git a/libhwc2.1/libresource/ExynosResourceManager.cpp b/libhwc2.1/libresource/ExynosResourceManager.cpp
index 4e90717..47a1fb2 100644
--- a/libhwc2.1/libresource/ExynosResourceManager.cpp
+++ b/libhwc2.1/libresource/ExynosResourceManager.cpp
@@ -144,14 +144,14 @@
             HDEBUGLOGD(eDebugResourceManager, "otfMPP[%d]", i);
             String8 dumpMPP;
             mOtfMPPs[i]->dump(dumpMPP);
-            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.string());
+            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.c_str());
         }
         for (uint32_t i = 0; i < mM2mMPPs.size(); i++)
         {
             HDEBUGLOGD(eDebugResourceManager, "m2mMPP[%d]", i);
             String8 dumpMPP;
             mM2mMPPs[i]->dump(dumpMPP);
-            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.string());
+            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.c_str());
         }
     }
 
@@ -443,15 +443,15 @@
         HDEBUGLOGD(eDebugResourceManager, "AssignResource result");
         String8 result;
         display->mClientCompositionInfo.dump(result);
-        HDEBUGLOGD(eDebugResourceManager, "%s", result.string());
+        HDEBUGLOGD(eDebugResourceManager, "%s", result.c_str());
         result.clear();
         display->mExynosCompositionInfo.dump(result);
-        HDEBUGLOGD(eDebugResourceManager, "%s", result.string());
+        HDEBUGLOGD(eDebugResourceManager, "%s", result.c_str());
         for (uint32_t i = 0; i < display->mLayers.size(); i++) {
             result.clear();
             HDEBUGLOGD(eDebugResourceManager, "%d layer(%p) dump", i, display->mLayers[i]);
             display->mLayers[i]->printLayer();
-            HDEBUGLOGD(eDebugResourceManager, "%s", result.string());
+            HDEBUGLOGD(eDebugResourceManager, "%s", result.c_str());
         }
     }
 
@@ -468,7 +468,7 @@
             if ((ret = display->mExynosCompositionInfo.mM2mMPP->assignMPP(display, &display->mClientCompositionInfo)) != NO_ERROR)
             {
                 ALOGE("%s:: %s MPP assignMPP() error (%d)",
-                        __func__, display->mExynosCompositionInfo.mM2mMPP->mName.string(), ret);
+                        __func__, display->mExynosCompositionInfo.mM2mMPP->mName.c_str(), ret);
                 return ret;
             }
             int prevHasCompositionLayer = display->mExynosCompositionInfo.mHasCompositionLayer;
@@ -503,7 +503,7 @@
                 layer->mValidateCompositionType = HWC2_COMPOSITION_DEVICE;
                 ret = EXYNOS_ERROR_CHANGED;
                 HDEBUGLOGD(eDebugResourceManager, "\t%s is reserved without display because of panding work",
-                        m2mMPP->mName.string());
+                        m2mMPP->mName.c_str());
                 m2mMPP->reserveMPP();
                 layer->mCheckMPPFlag[m2mMPP->mLogicalType] = eMPPHWBusy;
             }
@@ -518,7 +518,7 @@
             HWC_LOGE(display, "There is exynos composition layers but resource is null (%p)",
                     m2mMPP);
         } else if ((check_ret = m2mMPP->prioritize(2)) != NO_ERROR) {
-            HDEBUGLOGD(eDebugResourceManager, "%s setting priority error(%d)", m2mMPP->mName.string(), check_ret);
+            HDEBUGLOGD(eDebugResourceManager, "%s setting priority error(%d)", m2mMPP->mName.c_str(), check_ret);
             if (check_ret < 0) {
                 HWC_LOGE(display, "Fail to set exynoscomposition priority(%d)", ret);
             } else {
@@ -537,11 +537,11 @@
                 ret = EXYNOS_ERROR_CHANGED;
                 m2mMPP->resetUsedCapacity();
                 HDEBUGLOGD(eDebugResourceManager, "\t%s is reserved without display because of pending work",
-                        m2mMPP->mName.string());
+                        m2mMPP->mName.c_str());
                 m2mMPP->reserveMPP();
             }
         } else {
-            HDEBUGLOGD(eDebugResourceManager, "%s setting priority is ok", m2mMPP->mName.string());
+            HDEBUGLOGD(eDebugResourceManager, "%s setting priority is ok", m2mMPP->mName.c_str());
         }
     }
 
@@ -662,7 +662,7 @@
             {
                 String8 dumpMPP;
                 mM2mMPPs[i]->dump(dumpMPP);
-                HDEBUGLOGD(eDebugCapacity, "%s", dumpMPP.string());
+                HDEBUGLOGD(eDebugCapacity, "%s", dumpMPP.c_str());
             }
         }
     }
@@ -715,7 +715,7 @@
                         if ((ret = m2mMPP->assignMPP(display, layer)) != NO_ERROR)
                         {
                             ALOGE("%s:: %s MPP assignMPP() error (%d)",
-                                    __func__, m2mMPP->mName.string(), ret);
+                                    __func__, m2mMPP->mName.c_str(), ret);
                             return ret;
                         }
                         layer->setExynosMidImage(dst_img);
@@ -755,7 +755,7 @@
                         if ((ret = m2mMPP->assignMPP(display, layer)) != NO_ERROR)
                         {
                             ALOGE("%s:: %s MPP assignMPP() error (%d)",
-                                    __func__, m2mMPP->mName.string(), ret);
+                                    __func__, m2mMPP->mName.c_str(), ret);
                             return ret;
                         }
                         layer->setExynosMidImage(dst_img);
@@ -794,13 +794,13 @@
                 if ((ret = otfMPP->resetAssignedState()) != NO_ERROR)
                 {
                     ALOGE("%s:: %s MPP resetAssignedState() error (%d)",
-                            __func__, otfMPP->mName.string(), ret);
+                            __func__, otfMPP->mName.c_str(), ret);
                 }
                 // assign otfMPP again
                 if ((ret = otfMPP->assignMPP(display, layer)) != NO_ERROR)
                 {
                     ALOGE("%s:: %s MPP assignMPP() error (%d)",
-                            __func__, otfMPP->mName.string(), ret);
+                            __func__, otfMPP->mName.c_str(), ret);
                 }
             }
         }
@@ -822,22 +822,22 @@
         if ((ret = otfMPP->assignMPP(display, layer)) != NO_ERROR)
         {
             ALOGE("%s:: %s MPP assignMPP() error (%d)",
-                    __func__, otfMPP->mName.string(), ret);
+                    __func__, otfMPP->mName.c_str(), ret);
             return ret;
         }
         HDEBUGLOGD(eDebugResourceAssigning, "\t\t[%d] layer: %s MPP is assigned", layer_index,
-                   otfMPP->mName.string());
+                   otfMPP->mName.c_str());
     }
     if (m2mMPP != NULL) {
         if ((ret = m2mMPP->assignMPP(display, layer)) != NO_ERROR)
         {
             ALOGE("%s:: %s MPP assignMPP() error (%d)",
-                    __func__, m2mMPP->mName.string(), ret);
+                    __func__, m2mMPP->mName.c_str(), ret);
             return ret;
         }
         layer->setExynosMidImage(m2m_out_img);
         HDEBUGLOGD(eDebugResourceAssigning, "\t\t[%d] layer: %s MPP is assigned", layer_index,
-                   m2mMPP->mName.string());
+                   m2mMPP->mName.c_str());
     }
     layer->mValidateCompositionType = HWC2_COMPOSITION_DEVICE;
     display->mWindowNumUsed++;
@@ -1031,18 +1031,18 @@
 
         HDEBUGLOGD(eDebugResourceAssigning,
                    "\t\t check %s: supportedBit(0x%" PRIx64 "), isAssignable(%d)",
-                   mOtfMPPs[i]->mName.string(), -isSupported, isAssignableState);
+                   mOtfMPPs[i]->mName.c_str(), -isSupported, isAssignableState);
         if ((isSupported == NO_ERROR) && (isAssignableState)) {
             if ((ret = mOtfMPPs[i]->assignMPP(display, compositionInfo)) != NO_ERROR)
             {
                 HWC_LOGE(display, "%s:: %s MPP assignMPP() error (%d)",
-                        __func__, mOtfMPPs[i]->mName.string(), ret);
+                        __func__, mOtfMPPs[i]->mName.c_str(), ret);
                 return ret;
             }
             compositionInfo->mOtfMPP = mOtfMPPs[i];
             display->mWindowNumUsed++;
 
-            HDEBUGLOGD(eDebugResourceManager, "%s:: %s is assigned", __func__, mOtfMPPs[i]->mName.string());
+            HDEBUGLOGD(eDebugResourceManager, "%s:: %s is assigned", __func__, mOtfMPPs[i]->mName.c_str());
             return NO_ERROR;
         }
     }
@@ -1206,40 +1206,33 @@
     uint32_t otfMppRatio = 1;
     uint32_t m2mMppRatio = 1;
     if (scaleUp) {
-        std::find_if(mOtfMPPs.begin(), mOtfMPPs.end(),
-                     [&dst_scale_img, &dst_img, &otfMpp, &otfMppRatio](auto m) {
-                         auto ratio = m->getMaxUpscale(dst_scale_img, dst_img);
-                         if (ratio > 1) {
-                             otfMpp = m;
-                             otfMppRatio = ratio;
-                             return true;
-                         }
-                         return false;
-                     });
+        for (ExynosMPP *m : mOtfMPPs) {
+            auto ratio = m->getMaxUpscale(dst_scale_img, dst_img);
+            if (ratio > 1) {
+                otfMpp = m;
+                otfMppRatio = ratio;
+                break;
+            }
+        }
         const auto reqRatio = max(float(dst_img.w) / float(srcWidth * otfMppRatio),
                                   float(dst_img.h) / float(srcHeight * otfMppRatio));
-        std::find_if(mM2mMPPs.begin(), mM2mMPPs.end(),
-                     [&src_img, &dst_scale_img, reqRatio, &m2mMpp, &m2mMppRatio](auto m) {
-                         float ratio = float(m->getMaxUpscale(src_img, dst_scale_img));
-                         if (ratio > reqRatio) {
-                             m2mMpp = m;
-                             m2mMppRatio = ratio;
-                             return true;
-                         }
-                         return false;
-                     });
+        for (ExynosMPP *m : mM2mMPPs) {
+            float ratio = float(m->getMaxUpscale(src_img, dst_scale_img));
+            if (ratio > reqRatio) {
+                m2mMpp = m;
+                m2mMppRatio = ratio;
+                break;
+            }
+        }
     } else {
-        std::find_if(mM2mMPPs.begin(), mM2mMPPs.end(),
-                     [&src_img, &dst_scale_img, display, &m2mMpp, &m2mMppRatio](auto m) {
-                         auto ratio = m->getMaxDownscale(*display, src_img, dst_scale_img);
-                         if (ratio > 1) {
-                             m2mMpp = m;
-                             m2mMppRatio = ratio;
-                             return true;
-                         }
-                         return false;
-                     });
-
+        for (ExynosMPP *m : mM2mMPPs) {
+            auto ratio = m->getMaxDownscale(*display, src_img, dst_scale_img);
+            if (ratio > 1) {
+                m2mMpp = m;
+                m2mMppRatio = ratio;
+                break;
+            }
+        }
         const float otfSrcWidth = float(srcWidth / m2mMppRatio);
         const float scaleRatio_H = otfSrcWidth / float(dst_img.w);
         const float otfSrcHeight = float(srcHeight / m2mMppRatio);
@@ -1247,19 +1240,16 @@
         const float displayRatio_V = float(dst_img.h) / float(display->mYres);
         const float resolution = otfSrcWidth * otfSrcHeight * display->getBtsRefreshRate() / 1000;
 
-        std::find_if(mOtfMPPs.begin(), mOtfMPPs.end(),
-                     [&dst_scale_img, &dst_img, resolution, scaleRatio_H, scaleRatio_V,
-                      displayRatio_V, &otfMpp, &otfMppRatio](auto m) {
-                         auto ratio = m->getDownscaleRestriction(dst_scale_img, dst_img);
+        for (ExynosMPP *m : mOtfMPPs) {
+            auto ratio = m->getDownscaleRestriction(dst_scale_img, dst_img);
 
-                         if (ratio >= scaleRatio_H && ratio >= scaleRatio_V &&
-                             m->checkDownscaleCap(resolution, displayRatio_V)) {
-                             otfMpp = m;
-                             otfMppRatio = ratio;
-                             return true;
-                         }
-                         return false;
-                     });
+            if (ratio >= scaleRatio_H && ratio >= scaleRatio_V &&
+                m->checkDownscaleCap(resolution, displayRatio_V)) {
+                otfMpp = m;
+                otfMppRatio = ratio;
+                break;
+            }
+        }
     }
 
     if (!otfMpp && !m2mMpp) {
@@ -1492,7 +1482,7 @@
 
                 HDEBUGLOGD(eDebugResourceAssigning,
                            "\t\t check %s: flag (%d) supportedBit(%d), isAssignable(%d)",
-                           mOtfMPPs[j]->mName.string(), layer->mSupportedMPPFlag,
+                           mOtfMPPs[j]->mName.c_str(), layer->mSupportedMPPFlag,
                            (layer->mSupportedMPPFlag & mOtfMPPs[j]->mLogicalType),
                            isAssignableFlag);
 
@@ -1532,7 +1522,7 @@
 
             HDEBUGLOGD(eDebugResourceAssigning,
                        "\t\t check %s: supportedBit(%d), isAssignableState(%d)",
-                       mM2mMPPs[j]->mName.string(),
+                       mM2mMPPs[j]->mName.c_str(),
                        (layer->mSupportedMPPFlag & mM2mMPPs[j]->mLogicalType), isAssignableState);
 
             float totalUsedCapa = ExynosResourceManager::getResourceUsedCapa(*mM2mMPPs[j]);
@@ -1578,7 +1568,7 @@
                             HDEBUGLOGD(eDebugResourceAssigning,
                                        "\t\t\t check %s: supportedBit(0x%" PRIx64
                                        "), hasEnoughCapa(%d)",
-                                       mM2mMPPs[j]->mName.string(), -isSupported, isAssignableFlag);
+                                       mM2mMPPs[j]->mName.c_str(), -isSupported, isAssignableFlag);
                             continue;
                         }
 
@@ -1605,7 +1595,7 @@
                             HDEBUGLOGD(eDebugResourceAssigning,
                                        "\t\t\t check %s: supportedBit(0x%" PRIx64
                                        "), isAssignable(%d)",
-                                       mOtfMPPs[k]->mName.string(), -isSupported, isAssignableFlag);
+                                       mOtfMPPs[k]->mName.c_str(), -isSupported, isAssignableFlag);
                             if ((isSupported == NO_ERROR) && isAssignableFlag) {
                                 *m2mMPP = mM2mMPPs[j];
                                 *otfMPP = mOtfMPPs[k];
@@ -1624,7 +1614,7 @@
                         HDEBUGLOGD(eDebugResourceManager,
                                    "\t\t\t check %s: layer's mSupportedMPPFlag(0x%8x), "
                                    "hasEnoughCapa(%d)",
-                                   mM2mMPPs[j]->mName.string(), layer->mSupportedMPPFlag,
+                                   mM2mMPPs[j]->mName.c_str(), layer->mSupportedMPPFlag,
                                    isAssignableFlag);
                     }
                 }
@@ -1680,22 +1670,22 @@
                 if ((ret = otfMPP->assignMPP(display, layer)) != NO_ERROR)
                 {
                     ALOGE("%s:: %s MPP assignMPP() error (%d)",
-                            __func__, otfMPP->mName.string(), ret);
+                            __func__, otfMPP->mName.c_str(), ret);
                     return ret;
                 }
                 HDEBUGLOGD(eDebugResourceAssigning, "\t\t[%d] layer: %s MPP is assigned", i,
-                           otfMPP->mName.string());
+                           otfMPP->mName.c_str());
             }
             if (m2mMPP != NULL) {
                 if ((ret = m2mMPP->assignMPP(display, layer)) != NO_ERROR)
                 {
                     ALOGE("%s:: %s MPP assignMPP() error (%d)",
-                            __func__, m2mMPP->mName.string(), ret);
+                            __func__, m2mMPP->mName.c_str(), ret);
                     return ret;
                 }
                 layer->setExynosMidImage(m2m_out_img);
                 HDEBUGLOGD(eDebugResourceAssigning, "\t\t[%d] layer: %s MPP is assigned", i,
-                           m2mMPP->mName.string());
+                           m2mMPP->mName.c_str());
             }
             layer->mValidateCompositionType = compositionType;
             display->mWindowNumUsed++;
@@ -1707,12 +1697,12 @@
                 if ((ret = m2mMPP->assignMPP(display, layer)) != NO_ERROR)
                 {
                     ALOGE("%s:: %s MPP assignMPP() error (%d)",
-                            __func__, m2mMPP->mName.string(), ret);
+                            __func__, m2mMPP->mName.c_str(), ret);
                     return ret;
                 }
                 totalUsedCapacity = getResourceUsedCapa(*m2mMPP);
                 HDEBUGLOGD(eDebugResourceAssigning, "\t\t[%d] layer: %s MPP is assigned", i,
-                           m2mMPP->mName.string());
+                           m2mMPP->mName.c_str());
             }
             layer->mValidateCompositionType = compositionType;
 
@@ -1810,7 +1800,7 @@
                 (compositionInfo->mLastIndex < 0)) {
                 HWC_LOGE(display, "%s:: Invalid %s CompositionInfo mHasCompositionLayer(%d), "
                         "mFirstIndex(%d), mLastIndex(%d) ",
-                        __func__, compositionInfo->getTypeStr().string(),
+                        __func__, compositionInfo->getTypeStr().c_str(),
                         compositionInfo->mHasCompositionLayer,
                         compositionInfo->mFirstIndex,
                         compositionInfo->mLastIndex);
@@ -1820,7 +1810,7 @@
                 continue;
             compositionInfo->mWindowIndex = windowIndex;
             HDEBUGLOGD(eDebugResourceManager, "\t\t[%d] %s Composition windowIndex: %d",
-                    i, compositionInfo->getTypeStr().string(), windowIndex);
+                    i, compositionInfo->getTypeStr().c_str(), windowIndex);
         } else if (layer->mValidateCompositionType == HWC2_COMPOSITION_DISPLAY_DECORATION) {
             layer->mWindowIndex = -1;
             continue;
@@ -1871,18 +1861,18 @@
         for (uint32_t j = 0; j < mOtfMPPs.size(); j++) {
             if ((ret = mOtfMPPs[j]->isSupported(*display, src_img, dst_img)) == NO_ERROR) {
                 layer->mSupportedMPPFlag |= mOtfMPPs[j]->mLogicalType;
-                HDEBUGLOGD(eDebugResourceAssigning, "\t%s: supported", mOtfMPPs[j]->mName.string());
+                HDEBUGLOGD(eDebugResourceAssigning, "\t%s: supported", mOtfMPPs[j]->mName.c_str());
             } else {
                 if (((-ret) == eMPPUnsupportedFormat) &&
                     ((ret = mOtfMPPs[j]->isSupported(*display, src_img, dst_img_yuv)) == NO_ERROR)) {
                     layer->mSupportedMPPFlag |= mOtfMPPs[j]->mLogicalType;
                     HDEBUGLOGD(eDebugResourceAssigning, "\t%s: supported with yuv dst",
-                               mOtfMPPs[j]->mName.string());
+                               mOtfMPPs[j]->mName.c_str());
                 }
             }
             if (ret < 0) {
                 HDEBUGLOGD(eDebugResourceAssigning, "\t%s: unsupported flag(0x%" PRIx64 ")",
-                           mOtfMPPs[j]->mName.string(), -ret);
+                           mOtfMPPs[j]->mName.c_str(), -ret);
                 uint64_t checkFlag = 0x0;
                 if (layer->mCheckMPPFlag.find(mOtfMPPs[j]->mLogicalType) !=
                         layer->mCheckMPPFlag.end()) {
@@ -1897,18 +1887,18 @@
         for (uint32_t j = 0; j < mM2mMPPs.size(); j++) {
             if ((ret = mM2mMPPs[j]->isSupported(*display, src_img, dst_img)) == NO_ERROR) {
                 layer->mSupportedMPPFlag |= mM2mMPPs[j]->mLogicalType;
-                HDEBUGLOGD(eDebugResourceAssigning, "\t%s: supported", mM2mMPPs[j]->mName.string());
+                HDEBUGLOGD(eDebugResourceAssigning, "\t%s: supported", mM2mMPPs[j]->mName.c_str());
             } else {
                 if (((-ret) == eMPPUnsupportedFormat) &&
                     ((ret = mM2mMPPs[j]->isSupported(*display, src_img, dst_img_yuv)) == NO_ERROR)) {
                     layer->mSupportedMPPFlag |= mM2mMPPs[j]->mLogicalType;
                     HDEBUGLOGD(eDebugResourceAssigning, "\t%s: supported with yuv dst",
-                               mM2mMPPs[j]->mName.string());
+                               mM2mMPPs[j]->mName.c_str());
                 }
             }
             if (ret < 0) {
                 HDEBUGLOGD(eDebugResourceAssigning, "\t%s: unsupported flag(0x%" PRIx64 ")",
-                           mM2mMPPs[j]->mName.string(), -ret);
+                           mM2mMPPs[j]->mName.c_str(), -ret);
                 uint64_t checkFlag = 0x0;
                 if (layer->mCheckMPPFlag.find(mM2mMPPs[j]->mLogicalType) !=
                         layer->mCheckMPPFlag.end()) {
@@ -1935,7 +1925,7 @@
         if (hwcCheckDebugMessages(eDebugResourceManager)) {
             String8 dumpMPP;
             mOtfMPPs[i]->dump(dumpMPP);
-            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.string());
+            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.c_str());
         }
     }
     for (uint32_t i = 0; i < mM2mMPPs.size(); i++) {
@@ -1943,7 +1933,7 @@
         if (hwcCheckDebugMessages(eDebugResourceManager)) {
             String8 dumpMPP;
             mM2mMPPs[i]->dump(dumpMPP);
-            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.string());
+            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.c_str());
         }
     }
 
@@ -1964,7 +1954,7 @@
 
         if (mOtfMPPs[i]->mPreAssignDisplayList[displayMode] != 0) {
             HDEBUGLOGD(eDebugResourceAssigning, "\t%s check, dispMode(%d), 0x%8x",
-                       mOtfMPPs[i]->mName.string(), displayMode,
+                       mOtfMPPs[i]->mName.c_str(), displayMode,
                        mOtfMPPs[i]->mPreAssignDisplayList[displayMode]);
 
             ExynosDisplay *display = NULL;
@@ -2005,7 +1995,7 @@
             mM2mMPPs[i]->reserveMPP();
             continue;
         }
-        HDEBUGLOGD(eDebugResourceAssigning, "\t%s check, 0x%8x", mM2mMPPs[i]->mName.string(),
+        HDEBUGLOGD(eDebugResourceAssigning, "\t%s check, 0x%8x", mM2mMPPs[i]->mName.c_str(),
                    mM2mMPPs[i]->mPreAssignDisplayList[displayMode]);
         if (mM2mMPPs[i]->mPreAssignDisplayList[displayMode] != 0) {
             ExynosDisplay *display = NULL;
@@ -2035,14 +2025,14 @@
         if (hwcCheckDebugMessages(eDebugResourceManager)) {
             String8 dumpMPP;
             mOtfMPPs[i]->dump(dumpMPP);
-            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.string());
+            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.c_str());
         }
     }
     for (uint32_t i = 0; i < mM2mMPPs.size(); i++) {
         if (hwcCheckDebugMessages(eDebugResourceManager)) {
             String8 dumpMPP;
             mM2mMPPs[i]->dump(dumpMPP);
-            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.string());
+            HDEBUGLOGD(eDebugResourceManager, "%s", dumpMPP.c_str());
         }
     }
     HDEBUGLOGD(eDebugResourceManager, "%s-----------",  __func__);
@@ -2161,7 +2151,7 @@
 {
     int fps = ceil(msecsPerSec / mpp.mCapacity);
     HDEBUGLOGD(eDebugResourceAssigning, "%s setFrameRate %d",
-            mpp.mName.string(), fps);
+            mpp.mName.c_str(), fps);
     frame->setFrameRate(fps);
 }
 
@@ -2283,7 +2273,7 @@
     if (mpp.mCapacity < 0)
         return usedCapa;
 
-    HDEBUGLOGD(eDebugResourceAssigning, "%s:: [%s][%d] mpp[%d, %d]", __func__, mpp.mName.string(),
+    HDEBUGLOGD(eDebugResourceAssigning, "%s:: [%s][%d] mpp[%d, %d]", __func__, mpp.mName.c_str(),
                mpp.mLogicalIndex, mpp.mPhysicalType, mpp.mPhysicalIndex);
 
     if (mpp.mMPPType == MPP_TYPE_OTF) {
@@ -2302,7 +2292,7 @@
         }
     }
 
-    HDEBUGLOGD(eDebugResourceAssigning, "\t[%s][%d] mpp usedCapa: %f", mpp.mName.string(),
+    HDEBUGLOGD(eDebugResourceAssigning, "\t[%s][%d] mpp usedCapa: %f", mpp.mName.c_str(),
                mpp.mLogicalIndex, usedCapa);
     return usedCapa;
 }
@@ -2428,7 +2418,7 @@
     mSizeRestrictions[format][mSizeRestrictionCnt[format]++].sizeRestriction = size;
 
     HDEBUGLOGD(eDebugDefault, "MPP : %s, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d",
-            getMPPStr(mppId).string(),
+            getMPPStr(mppId).c_str(),
             size.maxDownScale,
             size.maxUpScale,
             size.maxFullWidth,
@@ -2452,10 +2442,10 @@
     mFormatRestrictions[mFormatRestrictionCnt] = table;
 
     HDEBUGLOGD(eDebugDefault, "MPP : %s, %d, %s, %d",
-               getMPPStr(mFormatRestrictions[mFormatRestrictionCnt].hwType).string(),
+               getMPPStr(mFormatRestrictions[mFormatRestrictionCnt].hwType).c_str(),
                mFormatRestrictions[mFormatRestrictionCnt].nodeType,
                getFormatStr(mFormatRestrictions[mFormatRestrictionCnt].format, COMP_TYPE_MASK)
-                       .string(),
+                       .c_str(),
                mFormatRestrictions[mFormatRestrictionCnt].reserved);
     mFormatRestrictionCnt++;
 }