Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53e19a76 authored by Michael Hoisie's avatar Michael Hoisie
Browse files

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
parent 50f6c0e2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -19,8 +19,6 @@

#define ATRACE_TAG ATRACE_TAG_GRAPHICS

#include <cutils/properties.h>

#include <gui/BLASTBufferQueue.h>
#include <gui/BufferItemConsumer.h>
#include <gui/GLConsumer.h>
+0 −1
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@

#include <inttypes.h>

#include <cutils/properties.h>
#include <cutils/atomic.h>

#include <gui/BufferItem.h>
+3 −5
Original line number Diff line number Diff line
@@ -14,13 +14,14 @@
 * limitations under the License.
 */

#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <cutils/properties.h>
#include <gui/DebugEGLImageTracker.h>

#include <cinttypes>
#include <unordered_map>

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<bool>(atoi(value));

        const bool enabled = GetBoolProperty("debug.sf.enable_egl_image_tracker", false);
        if (enabled) {
            mInstance = new DebugEGLImageTrackerImpl();
        } else {
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
#include <binder/ProcessState.h>
#include <configstore/Utils.h>
#include <cutils/properties.h>
#include <gui/BufferItemConsumer.h>
#include <gui/IDisplayEventConnection.h>
#include <gui/IProducerListener.h>