From 53e19a76a441fbc85a094c046ac6a33f2dc5d386 Mon Sep 17 00:00:00 2001 From: Michael Hoisie Date: Fri, 1 May 2020 17:19:57 -0400 Subject: Update libgui to use android::base properties instead of cutils Clean up cutils/properties.h headers as some files were including it and not using it. Also update DebugEGLImageTracker to use android::base properties because it works on host and is generally more concise. Bug: 155436554 Test: build, flash and boot Change-Id: I1dc7060cae9811b69aac9bb36b71b69cd6ecba93 --- libs/gui/DebugEGLImageTracker.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libs/gui/DebugEGLImageTracker.cpp') diff --git a/libs/gui/DebugEGLImageTracker.cpp b/libs/gui/DebugEGLImageTracker.cpp index ab6f36444a..5762dabc55 100644 --- a/libs/gui/DebugEGLImageTracker.cpp +++ b/libs/gui/DebugEGLImageTracker.cpp @@ -14,13 +14,14 @@ * limitations under the License. */ +#include #include -#include #include #include #include +using android::base::GetBoolProperty; using android::base::StringAppendF; std::mutex DebugEGLImageTracker::mInstanceLock; @@ -57,10 +58,7 @@ private: DebugEGLImageTracker *DebugEGLImageTracker::getInstance() { std::lock_guard lock(mInstanceLock); if (mInstance == nullptr) { - char value[PROPERTY_VALUE_MAX]; - property_get("debug.sf.enable_egl_image_tracker", value, "0"); - const bool enabled = static_cast(atoi(value)); - + const bool enabled = GetBoolProperty("debug.sf.enable_egl_image_tracker", false); if (enabled) { mInstance = new DebugEGLImageTrackerImpl(); } else { -- cgit v1.2.3-59-g8ed1b