As we later do literal matches against the lines XML parsing is the
wrong approach as e.g. XML excapes will not be found which causes custom
APNs with e.g. `&` to be ignored, i.e. they will not overwrite the
default ones and will be fully missing from the output file.
Change-Id: I2bc575d4bbdc5d802c5d5b3420ee6b536a5a18fc
Removing an element from the list that is currently iterated does not
work. At least it may skip the next element.
Also the handling of duplicate APN names was broken: It would output the
lines containing duplicate APN names times the number of the
duplication, i.e. the exact same line would be duplicated.
So use a `set` for storing apn names.
Change-Id: Id54d245dc935117cd4640ae0f1f30b8608c87459
* This fixes the case of have having APNs with same the name,
such as:
“Sprint EHRPD”
"Sprint EHRPD ota"
“Sprint EHRPD internet”
* But we want to replace only “Sprint EHRPD”, not all matches.
Change-Id: Ic3139c5d73a8c3c8667ac2bc527abc1a85541361
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