For Example new devices need the new Sprint APNs, so add a new board flag for them to set that will make the build system add the new APNs to the APN config XML. If the flag is not set, continue to use the old APNs. To add or replace APNs, the custom_apns.py script has been added. If CUSTOM_APNS_FILE is defined, custom_apns.py is run and generates a new version of apns-conf.xml. Change-Id: I7ff12a4342de2a7663b2b66fd627244214a8dc71
39 lines
1.2 KiB
Makefile
39 lines
1.2 KiB
Makefile
LOCAL_PATH := $(call my-dir)
|
|
|
|
# a wrapper for curl which provides wget syntax, for compatibility
|
|
include $(CLEAR_VARS)
|
|
LOCAL_MODULE := wget
|
|
LOCAL_SRC_FILES := bin/wget
|
|
LOCAL_MODULE_TAGS := optional
|
|
LOCAL_MODULE_CLASS := EXECUTABLES
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
|
|
include $(BUILD_PREBUILT)
|
|
|
|
################################
|
|
# Copies the APN list file into system/etc for the product as apns-conf.xml.
|
|
# In the case where $(CUSTOM_APNS_FILE) is defined, the content of $(CUSTOM_APNS_FILE)
|
|
# is added or replaced to the $(DEFAULT_APNS_FILE).
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := apns-conf.xml
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
DEFAULT_APNS_FILE := vendor/lineage/prebuilt/common/etc/apns-conf.xml
|
|
|
|
ifdef CUSTOM_APNS_FILE
|
|
CUSTOM_APNS_SCRIPT := vendor/lineage/tools/custom_apns.py
|
|
FINAL_APNS_FILE := $(local-generated-sources-dir)/apns-conf.xml
|
|
|
|
$(FINAL_APNS_FILE): PRIVATE_SCRIPT := $(CUSTOM_APNS_SCRIPT)
|
|
$(FINAL_APNS_FILE): PRIVATE_CUSTOM_APNS_FILE := $(CUSTOM_APNS_FILE)
|
|
$(FINAL_APNS_FILE): $(CUSTOM_APNS_SCRIPT) $(DEFAULT_APNS_FILE)
|
|
rm -f $@
|
|
python $(PRIVATE_SCRIPT) $@ $(PRIVATE_CUSTOM_APNS_FILE)
|
|
else
|
|
FINAL_APNS_FILE := $(DEFAULT_APNS_FILE)
|
|
endif
|
|
|
|
LOCAL_PREBUILT_MODULE_FILE := $(FINAL_APNS_FILE)
|
|
|
|
include $(BUILD_PREBUILT)
|