Android OS

资源覆盖

2019-01-11  本文已影响0人  古风子

filter

$(filter word1 word2,$(VARIANTS))

判断变量VARIANTS中是否包含word1和 word2,如果包含,则取出包含的值

示例:

VARIANTS := mon tue wed thu fri sat sun

DAY := $(filter sat sun,$(VARIANTS))

$(info $(DAY))

输出结果为:

sat sun

filter-out

$(filter-out word1 word2,$(VARIANTS))

判断变量VARIANTS中是否包含word1和 word2,如果包含,则去除包含的值

示例:

VARIANTS := mon tue wed thu fri sat sun

DAY := $(filter-out sat sun,$(VARIANTS))

$(info $(DAY))

输出结果为:

mon tue wed thu fri 

例子:

//filter-out::PRODUCT_PROPERTY_OVERRIDES中是否包含persist.sys.qcr=0,如果是,则得到删除persist.sys.qcr=0之后的字符创
QKSYSTEM_PRODUCT_PROPERTY_OVERRIDES := $(filter-out persist.sys.qcr=0 ,$(QKSYSTEM_PRODUCT_PROPERTY_OVERRIDES))
QKSYSTEM_PRODUCT_PROPERTY_OVERRIDES += \
       persist.sys.qcr=1


//$(filter abroad ,$(SPEC_VERSION))表示selftOS_SPEC_VERSION中,是否包含abroad,如果包含,则去除除了abroad的其他字符串。
//ifneq表示,selftOS_SPEC_VERSION中的abroad字符串是否不等于空。也就是,如果是海外版,则返回true
ifneq (,$(filter abroad ,$(selftOS_SPEC_VERSION)))
PRODUCT_COPY_FILES := $(filter-out device/selftOS/etc/cfg.xml:system/lib/uitechno/cfg.xml ,$(PRODUCT_COPY_FILES))
PRODUCT_COPY_FILES += \
        device/selftOS/operator/cts/cfg.xml:system/lib/uitechno/cfg.xml
endif


PRODUCT_PACKAGES += \
       CtsTest

//original apks to del
SPEC_ORI_DEL += \
       MtkMms \
       GoogleContacts \
       GoogleDialer \
       MtkCalendar

//original apks to integrate
SPEC_REQUIRED += \
        GooglePackageInstaller

#add for overlay res
//定义overlay资源路径,去覆盖原生的framework-res资源
DEVICE_PACKAGE_OVERLAYS := device/selftOS/operator/cts/common/overlay $(DEVICE_PACKAGE_OVERLAYS)
//不采用rro(Runtime Resources Overlay,动态资源覆盖)
//PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += device/selftOS/operator/cts/common/overlay
上一篇下一篇

猜你喜欢

热点阅读