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

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

Remove configstore 1.2

the configstore functionality was added in Q. But The configstore will
be deleted. So additional function is deleted.

Bug: 124531214
Test: build & boot
Test: adb shell lshal | grep configstore & check configstore 1.2
Change-Id: Idbb00b972bc082bd75bba94dbff9cee19df48b89
parent 4bd5d096
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -72,3 +72,11 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.co
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.cas@1.0*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.cas@1.0*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.cas@1.0*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.configstore@1.2-service.rc)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.configstore@1.2-service)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/seccomp_policy/configstore.policy)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/apex/com.android.media.swcodec/lib64/android.hardware.configstore@1.2.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/vndk-Q/android.hardware.configstore@1.2.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/android.hardware.configstore@1.2.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-Q/android.hardware.configstore@1.2.so)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hardware.configstore@1.2.so)
+6 −7
Original line number Diff line number Diff line
@@ -2,15 +2,15 @@ LOCAL_PATH := $(call my-dir)

################################################################################
include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.configstore@1.2-service
LOCAL_MODULE := android.hardware.configstore@1.1-service
# seccomp is not required for coverage build.
ifneq ($(NATIVE_COVERAGE),true)
LOCAL_REQUIRED_MODULES_arm64 := configstore.policy
LOCAL_REQUIRED_MODULES_arm64 := configstore@1.1.policy
endif
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_INIT_RC := android.hardware.configstore@1.2-service.rc
LOCAL_INIT_RC := android.hardware.configstore@1.1-service.rc
LOCAL_SRC_FILES:= service.cpp

include $(LOCAL_PATH)/surfaceflinger.mk
@@ -23,17 +23,16 @@ LOCAL_SHARED_LIBRARIES := \
    liblog \
    libutils \
    android.hardware.configstore@1.0 \
    android.hardware.configstore@1.1 \
    android.hardware.configstore@1.2
    android.hardware.configstore@1.1

include $(BUILD_EXECUTABLE)

# seccomp filter for configstore
ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), arm64))
include $(CLEAR_VARS)
LOCAL_MODULE := configstore.policy
LOCAL_MODULE := configstore@1.1.policy
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/seccomp_policy
LOCAL_SRC_FILES := seccomp_policy/configstore-$(TARGET_ARCH).policy
LOCAL_SRC_FILES := seccomp_policy/configstore@1.1-$(TARGET_ARCH).policy
include $(BUILD_PREBUILT)
endif
+7 −139
Original line number Diff line number Diff line
@@ -17,19 +17,14 @@
#include "SurfaceFlingerConfigs.h"

#include <android/hardware/configstore/1.1/types.h>
#include <android/hardware/configstore/1.2/types.h>
#include <android/hardware/graphics/common/1.1/types.h>
#include <log/log.h>

namespace android {
namespace hardware {
namespace configstore {
namespace V1_2 {
namespace V1_1 {
namespace implementation {

using ::android::hardware::graphics::common::V1_2::Dataspace;
using ::android::hardware::graphics::common::V1_2::PixelFormat;

// ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs implementation.
Return<void> SurfaceFlingerConfigs::vsyncEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
#ifdef VSYNC_EVENT_PHASE_OFFSET_NS
@@ -194,135 +189,8 @@ Return<void> SurfaceFlingerConfigs::primaryDisplayOrientation(
    return Void();
}

// ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs implementation.
Return<void> SurfaceFlingerConfigs::useColorManagement(useColorManagement_cb _hidl_cb) {
#if defined(USE_COLOR_MANAGEMENT) || defined(HAS_WIDE_COLOR_DISPLAY) || defined(HAS_HDR_DISPLAY)
    _hidl_cb({true, true});
#else
    _hidl_cb({true, false});
#endif
    return Void();
}

#ifdef DEFAULT_COMPOSITION_DATA_SPACE
static_assert(DEFAULT_COMPOSITION_DATA_SPACE != 0,
              "Default composition data space must not be UNKNOWN");
#endif

#ifdef WCG_COMPOSITION_DATA_SPACE
static_assert(WCG_COMPOSITION_DATA_SPACE != 0,
              "Wide color gamut composition data space must not be UNKNOWN");
#endif

Return<void> SurfaceFlingerConfigs::getCompositionPreference(getCompositionPreference_cb _hidl_cb) {
    Dataspace defaultDataspace = Dataspace::V0_SRGB;
    PixelFormat defaultPixelFormat = PixelFormat::RGBA_8888;

#ifdef DEFAULT_COMPOSITION_DATA_SPACE
    defaultDataspace = static_cast<Dataspace>(DEFAULT_COMPOSITION_DATA_SPACE);
#endif

#ifdef DEFAULT_COMPOSITION_PIXEL_FORMAT
    defaultPixelFormat = static_cast<PixelFormat>(DEFAULT_COMPOSITION_PIXEL_FORMAT);
#endif

    Dataspace wideColorGamutDataspace = Dataspace::V0_SRGB;
    PixelFormat wideColorGamutPixelFormat = PixelFormat::RGBA_8888;

#ifdef WCG_COMPOSITION_DATA_SPACE
    wideColorGamutDataspace = static_cast<Dataspace>(WCG_COMPOSITION_DATA_SPACE);
#endif

#ifdef WCG_COMPOSITION_PIXEL_FORMAT
    wideColorGamutPixelFormat = static_cast<PixelFormat>(WCG_COMPOSITION_PIXEL_FORMAT);
#endif

    _hidl_cb(defaultDataspace, defaultPixelFormat, wideColorGamutDataspace,
             wideColorGamutPixelFormat);
    return Void();
}

Return<void> SurfaceFlingerConfigs::getDisplayNativePrimaries(getDisplayNativePrimaries_cb _hidl_cb) {
    DisplayPrimaries primaries;
    // The default XYZ is sRGB gamut in CIE1931 color space
#ifdef TARGET_DISPLAY_PRIMARY_RED_X
    primaries.red.X = TARGET_DISPLAY_PRIMARY_RED_X;
#else
    primaries.red.X = 0.4123;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_RED_Y
    primaries.red.Y = TARGET_DISPLAY_PRIMARY_RED_Y;
#else
    primaries.red.Y = 0.2126;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_RED_Z
    primaries.red.Z = TARGET_DISPLAY_PRIMARY_RED_Z;
#else
    primaries.red.Z = 0.0193;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_GREEN_X
    primaries.green.X = TARGET_DISPLAY_PRIMARY_GREEN_X;
#else
    primaries.green.X = 0.3576;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_GREEN_Y
    primaries.green.Y = TARGET_DISPLAY_PRIMARY_GREEN_Y;
#else
    primaries.green.Y = 0.7152;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_GREEN_Z
    primaries.green.Z = TARGET_DISPLAY_PRIMARY_GREEN_Z;
#else
    primaries.green.Z = 0.1192;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_BLUE_X
    primaries.blue.X = TARGET_DISPLAY_PRIMARY_BLUE_X;
#else
    primaries.blue.X = 0.1805;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_BLUE_Y
    primaries.blue.Y = TARGET_DISPLAY_PRIMARY_BLUE_Y;
#else
    primaries.blue.Y = 0.0722;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_BLUE_Z
    primaries.blue.Z = TARGET_DISPLAY_PRIMARY_BLUE_Z;
#else
    primaries.blue.Z = 0.9506;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_WHITE_X
    primaries.white.X = TARGET_DISPLAY_PRIMARY_WHITE_X;
#else
    primaries.white.X = 0.9505;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_WHITE_Y
    primaries.white.Y = TARGET_DISPLAY_PRIMARY_WHITE_Y;
#else
    primaries.white.Y = 1.0000;
#endif

#ifdef TARGET_DISPLAY_PRIMARY_WHITE_Z
    primaries.white.Z = TARGET_DISPLAY_PRIMARY_WHITE_Z;
#else
    primaries.white.Z = 1.0891;
#endif

    _hidl_cb(primaries);
    return Void();
}

}  // namespace implementation
}  // namespace V1_2
}  // namespace V1_1
}  // namespace configstore
}  // namespace hardware
}  // namespace android
+7 −12
Original line number Diff line number Diff line
@@ -14,23 +14,23 @@
 * limitations under the License.
 */

#ifndef ANDROID_HARDWARE_CONFIGSTORE_V1_2_SURFACEFLINGERCONFIGS_H
#define ANDROID_HARDWARE_CONFIGSTORE_V1_2_SURFACEFLINGERCONFIGS_H
#ifndef ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
#define ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H

#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>

namespace android {
namespace hardware {
namespace configstore {
namespace V1_2 {
namespace V1_1 {
namespace implementation {

using ::android::sp;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs;
using ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs;

struct SurfaceFlingerConfigs : public ISurfaceFlingerConfigs {
    // ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs implementation.
@@ -49,17 +49,12 @@ struct SurfaceFlingerConfigs : public ISurfaceFlingerConfigs {

    // ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs follow implementation.
    Return<void> primaryDisplayOrientation(primaryDisplayOrientation_cb _hidl_cb) override;

    // ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs follow implementation.
    Return<void> useColorManagement(useColorManagement_cb _hidl_cb) override;
    Return<void> getCompositionPreference(getCompositionPreference_cb _hidl_cb) override;
    Return<void> getDisplayNativePrimaries(getDisplayNativePrimaries_cb _hidl_cb) override;
};

}  // namespace implementation
}  // namespace V1_2
}  // namespace V1_1
}  // namespace configstore
}  // namespace hardware
}  // namespace android

#endif  // ANDROID_HARDWARE_CONFIGSTORE_V1_2_SURFACEFLINGERCONFIGS_H
#endif  // ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
+1 −1
Original line number Diff line number Diff line
service vendor.configstore-hal /vendor/bin/hw/android.hardware.configstore@1.2-service
service vendor.configstore-hal /vendor/bin/hw/android.hardware.configstore@1.1-service
    class hal animation
    user system
    group system
Loading