mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
add CM APN list, remove non-MMS APN info
Fixes missing Verizon APN. Overall, smaller DB size but more APN info. // FREEBIE
This commit is contained in:
parent
89fb80fcc5
commit
1d7b47c982
1759
apntool/apnlists/cyanogenmod.xml
Normal file
1759
apntool/apnlists/cyanogenmod.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -39,10 +39,15 @@ try:
|
|||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
for apn in root.iter("apn"):
|
for apn in root.iter("apn"):
|
||||||
|
if apn.get("mmsc") == None:
|
||||||
|
continue
|
||||||
sqlvars = ["?" for x in apn.attrib.keys()] + ["?"]
|
sqlvars = ["?" for x in apn.attrib.keys()] + ["?"]
|
||||||
values = [apn.get(attrib) for attrib in apn.attrib.keys()] + ["%s%s" % (apn.get("mcc"), apn.get("mnc"))]
|
mccmnc = "%s%s" % (apn.get("mcc"), apn.get("mnc"))
|
||||||
|
values = [apn.get(attrib) for attrib in apn.attrib.keys()] + [mccmnc]
|
||||||
keys = apn.attrib.keys() + ["mccmnc"]
|
keys = apn.attrib.keys() + ["mccmnc"]
|
||||||
|
|
||||||
|
cursor.execute("SELECT 1 FROM apns WHERE mccmnc = ? AND apn = ?", [mccmnc, apn.get("apn")])
|
||||||
|
if cursor.fetchone() == None:
|
||||||
statement = "INSERT INTO apns (%s) VALUES (%s)" % (", ".join(keys), ", ".join(sqlvars))
|
statement = "INSERT INTO apns (%s) VALUES (%s)" % (", ".join(keys), ", ".join(sqlvars))
|
||||||
cursor.execute(statement, values)
|
cursor.execute(statement, values)
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user