vendor/lineage: Hookup TARGET_USES_MTK_APNS_CONF
Description
Currently, APN configurations are maintained separately in multiple device repos.
It will be ideal to keep it commonized, to avoid multiple issues regarding APNs for each device.
Screenshots
Technical details
Introduce TARGET_USES_MTK_APNS_CONF variable to control which apn gets copied to product/etc/apns-conf.xml.
Since apns were split from vendor/lineage, we need to adapt vendor/lineage part of the original commit from a14 into a15 and a16 for the change in this PR to function.
a14 commit: 4840bcc8 (we need to adapt config/BoardConfigSoong.mk part for a15 and a16).
Since lineage removed the old namespace we were using to set the config into on a15 and a16, we have to bring it back.
Keep it gated so that the old namespace is only exposed when TARGET_USES_MTK_APNS_CONF is set in BoardConfig.mk.
This is done to keep vendor/apn as single branch and have the file selection code in it's Android.bp work for a14,a15,a16.
Existing behavior of copying apns is not affected unless TARGET_USES_MTK_APNS_CONF is set in BoardConfig.mk.
When TARGET_USES_MTK_APNS_CONF := true is set in BoardConfig.mk, mtk-specific apn config is copied.
When TARGET_USES_MTK_APNS_CONF := false is set in BoardConfig.mk, generic apn config is copied.
When TARGET_USES_MTK_APNS_CONF is not set in BoardConfig.mk, generic apn config is copied.
NOTE:
generic config refers to vendor/apn/apns-conf.xml (generated at build time by combining split apn files).
mtk-specific config refers to vendor/apn/apns-conf-mtk.xml (introduced in android_vendor_apn!2 (merged)).
Tests
- Build a14,a15,a16 for device with
TARGET_USES_MTK_APNS_CONF := trueset inBoardConfig.mkand checkproduct/etc/apns-conf.xml.-
product/etc/apns-conf.xmlshould containmtk-specificapn config.
-
- Build a14,a15,a16 for device with
TARGET_USES_MTK_APNS_CONF := falseset inBoardConfig.mkand checkproduct/etc/apns-conf.xml.-
product/etc/apns-conf.xmlshould containgenericapn config.
-
- Build a14,a15,a16 for device with
TARGET_USES_MTK_APNS_CONFnot set inBoardConfig.mkand checkproduct/etc/apns-conf.xml.-
product/etc/apns-conf.xmlshould containgenericapn config.
-
Issues
https://gitlab.e.foundation/e/devices/backlog/-/issues/1576
https://gitlab.e.foundation/e/devices/backlog/-/issues/1410 (previous issue for a14 for reference, before apns were split from vendor/lineage).