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

Commit f33c9f1e authored by Sundong Ahn's avatar Sundong Ahn
Browse files

Change to using sysprop for libgui_tests

The configstore service was deprecated. So change to use sysprop
instead of configstore

Bug: 124531214
Test: atest SurfaceTest#CreateSurfaceReturnsErrorBadClient &&
      check reading property values
Change-Id: I1825a304c4fe40e3ef9f54e1e8fef05b1f9a2e8f
Merged-In: I1825a304c4fe40e3ef9f54e1e8fef05b1f9a2e8f
(cherry picked from commit e6e7d44e)
parent dc64a603
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -39,6 +39,7 @@ cc_test {
    shared_libs: [
    shared_libs: [
        "android.hardware.configstore@1.0",
        "android.hardware.configstore@1.0",
        "android.hardware.configstore-utils",
        "android.hardware.configstore-utils",
        "libSurfaceFlingerProp",
        "libbase",
        "libbase",
        "liblog",
        "liblog",
        "libEGL",
        "libEGL",
@@ -53,6 +54,8 @@ cc_test {
        "libutils",
        "libutils",
        "libnativewindow"
        "libnativewindow"
    ],
    ],

    header_libs: ["libsurfaceflinger_headers"],
}
}


// Build a separate binary to $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
// Build a separate binary to $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
+4 −5
Original line number Original line Diff line number Diff line
@@ -18,17 +18,18 @@


#include <gtest/gtest.h>
#include <gtest/gtest.h>


#include <SurfaceFlingerProperties.h>
#include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
#include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
#include <binder/ProcessState.h>
#include <binder/ProcessState.h>
#include <configstore/Utils.h>
#include <configstore/Utils.h>
#include <cutils/properties.h>
#include <cutils/properties.h>
#include <inttypes.h>
#include <gui/BufferItemConsumer.h>
#include <gui/BufferItemConsumer.h>
#include <gui/IDisplayEventConnection.h>
#include <gui/IDisplayEventConnection.h>
#include <gui/IProducerListener.h>
#include <gui/IProducerListener.h>
#include <gui/ISurfaceComposer.h>
#include <gui/ISurfaceComposer.h>
#include <gui/Surface.h>
#include <gui/Surface.h>
#include <gui/SurfaceComposerClient.h>
#include <gui/SurfaceComposerClient.h>
#include <inttypes.h>
#include <private/gui/ComposerService.h>
#include <private/gui/ComposerService.h>
#include <ui/Rect.h>
#include <ui/Rect.h>
#include <utils/String8.h>
#include <utils/String8.h>
@@ -46,11 +47,9 @@ using ui::ColorMode;


using Transaction = SurfaceComposerClient::Transaction;
using Transaction = SurfaceComposerClient::Transaction;


static bool hasWideColorDisplay =
static bool hasWideColorDisplay = android::sysprop::has_wide_color_display(false);
        getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasWideColorDisplay>(false);


static bool hasHdrDisplay =
static bool hasHdrDisplay = android::sysprop::has_HDR_display(false);
        getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasHDRDisplay>(false);


class FakeSurfaceComposer;
class FakeSurfaceComposer;
class FakeProducerFrameEventHistory;
class FakeProducerFrameEventHistory;