Remove dependency with configstore 1.2
The configstore 1.2 is deleted. So cut the dependency with configstore
1.2.
Bug: 124531214
Test: build & boot
Test: adb shell lshal | grep configstore & check configstore 1.2
Change-Id: Ic6b1875e4cf62d45176b83f69a48382c4d9c05c8
diff --git a/services/surfaceflinger/Android.bp b/services/surfaceflinger/Android.bp
index 948b689..ac1d492 100644
--- a/services/surfaceflinger/Android.bp
+++ b/services/surfaceflinger/Android.bp
@@ -23,7 +23,6 @@
"android.hardware.configstore-utils",
"android.hardware.configstore@1.0",
"android.hardware.configstore@1.1",
- "android.hardware.configstore@1.2",
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.allocator@3.0",
"android.hardware.graphics.common@1.2",
@@ -188,7 +187,6 @@
"android.frameworks.displayservice@1.0",
"android.hardware.configstore-utils",
"android.hardware.configstore@1.0",
- "android.hardware.configstore@1.2",
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.allocator@3.0",
"libbinder",
@@ -243,13 +241,15 @@
"android.hardware.configstore-utils",
"android.hardware.configstore@1.0",
"android.hardware.configstore@1.1",
- "android.hardware.configstore@1.2",
+ "android.hardware.graphics.common@1.2",
"libhidlbase",
"libhidltransport",
"libhwbinder",
+ "libui",
"libutils",
],
export_shared_lib_headers: [
+ "android.hardware.graphics.common@1.2",
"libhidlbase",
"libhidltransport",
"libhwbinder",
diff --git a/services/surfaceflinger/Scheduler/Scheduler.cpp b/services/surfaceflinger/Scheduler/Scheduler.cpp
index 990318a..5b4af4a 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.cpp
+++ b/services/surfaceflinger/Scheduler/Scheduler.cpp
@@ -26,7 +26,6 @@
#include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
-#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
#include <configstore/Utils.h>
#include <cutils/properties.h>
#include <ui/DisplayStatInfo.h>
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index d924cab..e50dd08 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -109,7 +109,6 @@
#include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
-#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
#include <android/hardware/configstore/1.1/types.h>
#include <configstore/Utils.h>
diff --git a/services/surfaceflinger/SurfaceFlingerProperties.cpp b/services/surfaceflinger/SurfaceFlingerProperties.cpp
index e676d20..f2881f5 100644
--- a/services/surfaceflinger/SurfaceFlingerProperties.cpp
+++ b/services/surfaceflinger/SurfaceFlingerProperties.cpp
@@ -4,7 +4,6 @@
#include <android/hardware/configstore/1.0/ISurfaceFlingerConfigs.h>
#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
#include <android/hardware/configstore/1.1/types.h>
-#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
#include <configstore/Utils.h>
#include <cstdlib>
@@ -16,9 +15,9 @@
namespace sysprop {
using namespace android::hardware::configstore;
using namespace android::hardware::configstore::V1_0;
-using ::android::hardware::configstore::V1_2::DisplayPrimaries;
-using ::android::hardware::graphics::common::V1_2::Dataspace;
-using ::android::hardware::graphics::common::V1_2::PixelFormat;
+using android::hardware::graphics::common::V1_2::Dataspace;
+using android::hardware::graphics::common::V1_2::PixelFormat;
+using android::ui::DisplayPrimaries;
int64_t vsync_event_phase_offset_ns(int64_t defaultValue) {
auto temp = SurfaceFlingerProperties::vsync_event_phase_offset_ns();
@@ -171,40 +170,14 @@
tmpHasWideColorDisplay.has_value()) {
return *tmpuseColorManagement || *tmpHasHDRDisplay || *tmpHasWideColorDisplay;
}
- auto surfaceFlingerConfigsServiceV1_2 = ISurfaceFlingerConfigs::getService();
- if (surfaceFlingerConfigsServiceV1_2) {
- return getBool<V1_2::ISurfaceFlingerConfigs,
- &V1_2::ISurfaceFlingerConfigs::useColorManagement>(defaultValue);
- }
return defaultValue;
}
-auto getCompositionPreference(sp<V1_2::ISurfaceFlingerConfigs> configsServiceV1_2) {
- Dataspace defaultCompositionDataspace = Dataspace::V0_SRGB;
- PixelFormat defaultCompositionPixelFormat = PixelFormat::RGBA_8888;
- Dataspace wideColorGamutCompositionDataspace = Dataspace::V0_SRGB;
- PixelFormat wideColorGamutCompositionPixelFormat = PixelFormat::RGBA_8888;
- configsServiceV1_2->getCompositionPreference(
- [&](auto tmpDefaultDataspace, auto tmpDefaultPixelFormat,
- auto tmpWideColorGamutDataspace, auto tmpWideColorGamutPixelFormat) {
- defaultCompositionDataspace = tmpDefaultDataspace;
- defaultCompositionPixelFormat = tmpDefaultPixelFormat;
- wideColorGamutCompositionDataspace = tmpWideColorGamutDataspace;
- wideColorGamutCompositionPixelFormat = tmpWideColorGamutPixelFormat;
- });
- return std::tuple(defaultCompositionDataspace, defaultCompositionPixelFormat,
- wideColorGamutCompositionDataspace, wideColorGamutCompositionPixelFormat);
-}
-
int64_t default_composition_dataspace(Dataspace defaultValue) {
auto temp = SurfaceFlingerProperties::default_composition_dataspace();
if (temp.has_value()) {
return *temp;
}
- auto configsServiceV1_2 = V1_2::ISurfaceFlingerConfigs::getService();
- if (configsServiceV1_2) {
- return static_cast<int64_t>(get<0>(getCompositionPreference(configsServiceV1_2)));
- }
return static_cast<int64_t>(defaultValue);
}
@@ -213,10 +186,6 @@
if (temp.has_value()) {
return *temp;
}
- auto configsServiceV1_2 = V1_2::ISurfaceFlingerConfigs::getService();
- if (configsServiceV1_2) {
- return static_cast<int32_t>(get<1>(getCompositionPreference(configsServiceV1_2)));
- }
return static_cast<int32_t>(defaultValue);
}
@@ -225,10 +194,6 @@
if (temp.has_value()) {
return *temp;
}
- auto configsServiceV1_2 = V1_2::ISurfaceFlingerConfigs::getService();
- if (configsServiceV1_2) {
- return static_cast<int64_t>(get<2>(getCompositionPreference(configsServiceV1_2)));
- }
return static_cast<int64_t>(defaultValue);
}
@@ -237,10 +202,6 @@
if (temp.has_value()) {
return *temp;
}
- auto configsServiceV1_2 = V1_2::ISurfaceFlingerConfigs::getService();
- if (configsServiceV1_2) {
- return static_cast<int32_t>(get<3>(getCompositionPreference(configsServiceV1_2)));
- }
return static_cast<int32_t>(defaultValue);
}
diff --git a/services/surfaceflinger/SurfaceFlingerProperties.h b/services/surfaceflinger/SurfaceFlingerProperties.h
index c86880e..9917683 100644
--- a/services/surfaceflinger/SurfaceFlingerProperties.h
+++ b/services/surfaceflinger/SurfaceFlingerProperties.h
@@ -3,8 +3,9 @@
#define SURFACEFLINGERPROPERTIES_H_
#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
-#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
+#include <android/hardware/graphics/common/1.2/types.h>
#include <sysprop/SurfaceFlingerProperties.sysprop.h>
+#include <ui/ConfigStoreTypes.h>
#include <cstdint>
#include <optional>
@@ -54,7 +55,7 @@
int32_t wcg_composition_pixel_format(
android::hardware::graphics::common::V1_2::PixelFormat defaultValue);
-android::hardware::configstore::V1_2::DisplayPrimaries getDisplayNativePrimaries();
+android::ui::DisplayPrimaries getDisplayNativePrimaries();
} // namespace sysprop
} // namespace android
#endif // SURFACEFLINGERPROPERTIES_H_