sweet: Redo libsdmcore shim
Instead of injecting custom dependency into libsdmcore.so, provide a custom hwcomposer implementation that overrides the *unwanted* symbol before loading the vendor implementation. Change-Id: Icc6551f9260a0eb8a7f7a616588c65472a9366e9
This commit is contained in:
parent
d0c51f6735
commit
b4eec28a20
@ -34,7 +34,7 @@ PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/configs/display/qdcm_calib_data_xiaomi_k6_38_0e_0b_fhd_dsc_video_dsi_panel.xml:$(TARGET_COPY_OUT_VENDOR)/etc/qdcm_calib_data_xiaomi_k6_38_0e_0b_fhd_dsc_video_dsi_panel.xml
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
libsdmcore-shim
|
||||
hwcomposer.qcom
|
||||
|
||||
# Init scripts
|
||||
PRODUCT_COPY_FILES += \
|
||||
|
@ -1,8 +0,0 @@
|
||||
cc_library_shared {
|
||||
name: "libsdmcore-shim",
|
||||
srcs: [
|
||||
"display_builtin.cpp"
|
||||
],
|
||||
required: ["libsdmcore-patch"],
|
||||
vendor: true,
|
||||
}
|
@ -1,24 +1,11 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
HWC := hwcomposer.$(TARGET_BOARD_PLATFORM)
|
||||
LIBSDMCORE := $(TARGET_OUT_VENDOR)/lib64/libsdmcore.so
|
||||
HWCOMPOSER := $(TARGET_OUT_VENDOR)/lib64/hw/$(HWC).so
|
||||
|
||||
ORIGINAL_SYMBOL := _ZN3sdm14DisplayBuiltIn14SetRefreshRateEjb
|
||||
CUSTOM_SYMBOL := _ZN3sdm14DisplayBuiltIn14SetRefreshCustEjb
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libsdmcore-patch
|
||||
LOCAL_PREBUILT_MODULE_FILE := /dev/null
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_MODULE := hwcomposer.qcom
|
||||
LOCAL_VENDOR_MODULE := true
|
||||
LOCAL_REQUIRED_MODULES := $(HWC) libsdmcore
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_SHARED_LIBRARIES := hwcomposer.$(TARGET_BOARD_PLATFORM)
|
||||
LOCAL_SRC_FILES := display_builtin.cpp
|
||||
|
||||
LOCAL_POST_INSTALL_CMD := \
|
||||
cp $(PRODUCT_OUT)/symbols/vendor/lib64/libsdmcore.so $(LIBSDMCORE) && \
|
||||
cp $(PRODUCT_OUT)/symbols/vendor/lib64/hw/$(HWC).so $(HWCOMPOSER) && \
|
||||
sed -i s/$(ORIGINAL_SYMBOL)/$(CUSTOM_SYMBOL)/g $(LIBSDMCORE) && \
|
||||
sed -i s/libdisplaydebug/libsdmcore-shim/g $(HWCOMPOSER) && \
|
||||
rm $(TARGET_OUT_VENDOR)/etc/$(LOCAL_MODULE)
|
||||
|
||||
include $(BUILD_PREBUILT)
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include <stdint.h>
|
||||
|
||||
extern "C" void _ZN3sdm14DisplayBuiltIn14SetRefreshCustEjb(uint32_t, bool) {}
|
||||
extern "C" void _ZN3sdm14DisplayBuiltIn14SetRefreshRateEjb(uint32_t, bool) {}
|
||||
|
Loading…
Reference in New Issue
Block a user