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,12 +39,17 @@ 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"))
|
||||||
keys = apn.attrib.keys() + ["mccmnc"]
|
values = [apn.get(attrib) for attrib in apn.attrib.keys()] + [mccmnc]
|
||||||
|
keys = apn.attrib.keys() + ["mccmnc"]
|
||||||
|
|
||||||
statement = "INSERT INTO apns (%s) VALUES (%s)" % (", ".join(keys), ", ".join(sqlvars))
|
cursor.execute("SELECT 1 FROM apns WHERE mccmnc = ? AND apn = ?", [mccmnc, apn.get("apn")])
|
||||||
cursor.execute(statement, values)
|
if cursor.fetchone() == None:
|
||||||
|
statement = "INSERT INTO apns (%s) VALUES (%s)" % (", ".join(keys), ", ".join(sqlvars))
|
||||||
|
cursor.execute(statement, values)
|
||||||
|
|
||||||
count += 1
|
count += 1
|
||||||
if not args.quiet:
|
if not args.quiet:
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user