Created
October 7, 2014 20:57
-
-
Save Albinoman887/0d34e73b36db3effa4f8 to your computer and use it in GitHub Desktop.
Sex-TelephonyProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.android.providers.telephony; | |
import android.content.ContentProvider; | |
import android.content.ContentResolver; | |
import android.content.ContentUris; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.content.SharedPreferences.Editor; | |
import android.content.UriMatcher; | |
import android.content.res.Resources; | |
import android.content.res.XmlResourceParser; | |
import android.database.Cursor; | |
import android.database.SQLException; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
import android.database.sqlite.SQLiteQueryBuilder; | |
import android.net.Uri; | |
import android.os.Environment; | |
import android.os.FileUtils; | |
import android.os.SystemProperties; | |
import android.provider.Telephony.Carriers; | |
import android.telephony.TelephonyManager; | |
import android.util.Log; | |
import com.android.internal.telephony.MultiSimManager; | |
import com.android.internal.util.XmlUtils; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.text.SimpleDateFormat; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.TimeZone; | |
import org.xmlpull.v1.XmlPullParser; | |
import org.xmlpull.v1.XmlSerializer; | |
public class TelephonyProvider extends ContentProvider | |
{ | |
static final boolean SHIP_BUILD = "true".equals(SystemProperties.get("ro.product_ship", "false")); | |
private static ContentValues[] s_currentNullMaps; | |
private static ContentValues[] s_currentSetMaps; | |
private static final ArrayList s_persistentList; | |
private static final UriMatcher s_urlMatcher = new UriMatcher(-1); | |
private static Map<Integer, Integer> simSlotMap; | |
private ChangesHelper mChangesHelper; | |
private DatabaseHelper mOpenHelper; | |
static | |
{ | |
s_persistentList = new ArrayList(); | |
simSlotMap = new HashMap(); | |
s_urlMatcher.addURI("telephony", "carriers", 1); | |
s_urlMatcher.addURI("telephony", "carriers/current", 2); | |
s_urlMatcher.addURI("telephony", "carriers/#", 3); | |
s_urlMatcher.addURI("telephony", "carriers/restore", 4); | |
s_urlMatcher.addURI("telephony", "carriers/preferapn", 5); | |
s_urlMatcher.addURI("telephony", "carriers/preferapn_no_update", 6); | |
s_urlMatcher.addURI("telephony", "carriers/no_update", 7); | |
s_urlMatcher.addURI("telephony", "carriers/dm_change", 8); | |
s_urlMatcher.addURI("telephony", "carriers/current2", 9); | |
s_urlMatcher.addURI("telephony", "carriers/preferapn2", 10); | |
s_urlMatcher.addURI("telephony", "carriers/preferapn_no_update2", 11); | |
s_currentNullMaps = new ContentValues[MultiSimManager.getSimSlotCount()]; | |
s_currentSetMaps = new ContentValues[MultiSimManager.getSimSlotCount()]; | |
for (int i = 0; i < MultiSimManager.getSimSlotCount(); i++) | |
{ | |
s_currentNullMaps[i] = new ContentValues(1); | |
s_currentNullMaps[i].put(MultiSimManager.appendPropertySimSlot("current", i), (Long)null); | |
s_currentSetMaps[i] = new ContentValues(1); | |
s_currentSetMaps[i].put(MultiSimManager.appendPropertySimSlot("current", i), "1"); | |
} | |
s_persistentList.add("default,dun"); | |
s_persistentList.add("fota"); | |
s_persistentList.add("default,dun,supl"); | |
s_persistentList.add("ims"); | |
s_persistentList.add("cbs,mms"); | |
simSlotMap.put(Integer.valueOf(5), Integer.valueOf(0)); | |
simSlotMap.put(Integer.valueOf(6), Integer.valueOf(0)); | |
simSlotMap.put(Integer.valueOf(2), Integer.valueOf(0)); | |
simSlotMap.put(Integer.valueOf(10), Integer.valueOf(1)); | |
simSlotMap.put(Integer.valueOf(11), Integer.valueOf(1)); | |
simSlotMap.put(Integer.valueOf(9), Integer.valueOf(1)); | |
} | |
private static boolean addAtrribute(ContentValues paramContentValues, XmlSerializer paramXmlSerializer) | |
{ | |
try | |
{ | |
paramXmlSerializer.startTag("", "apn"); | |
if (paramContentValues.getAsString("mcc") != null) | |
paramXmlSerializer.attribute("", "mcc", paramContentValues.getAsString("mcc")); | |
if (paramContentValues.getAsString("mnc") != null) | |
paramXmlSerializer.attribute("", "mnc", paramContentValues.getAsString("mnc")); | |
if (paramContentValues.getAsString("type") != null) | |
paramXmlSerializer.attribute("", "type", paramContentValues.getAsString("type")); | |
if (paramContentValues.getAsString("carrier_enabled") != null) | |
if (!paramContentValues.getAsBoolean("carrier_enabled").booleanValue()) | |
break label633; | |
label633: for (String str = "1"; ; str = "0") | |
{ | |
paramXmlSerializer.attribute("", "carrier_enabled", str); | |
if (paramContentValues.getAsString("protocol") != null) | |
paramXmlSerializer.attribute("", "protocol", paramContentValues.getAsString("protocol")); | |
if (paramContentValues.getAsString("apn") != null) | |
paramXmlSerializer.attribute("", "apn", paramContentValues.getAsString("apn")); | |
if (paramContentValues.getAsString("bearer") != null) | |
paramXmlSerializer.attribute("", "bearer", paramContentValues.getAsString("bearer")); | |
if (paramContentValues.getAsString("name") != null) | |
paramXmlSerializer.attribute("", "carrier", paramContentValues.getAsString("name")); | |
if (paramContentValues.getAsString("numeric") != null) | |
paramXmlSerializer.attribute("", "numeric", paramContentValues.getAsString("numeric")); | |
if (paramContentValues.getAsString("user") != null) | |
paramXmlSerializer.attribute("", "user", paramContentValues.getAsString("user")); | |
if (paramContentValues.getAsString("server") != null) | |
paramXmlSerializer.attribute("", "server", paramContentValues.getAsString("server")); | |
if (paramContentValues.getAsString("password") != null) | |
paramXmlSerializer.attribute("", "password", paramContentValues.getAsString("password")); | |
if (paramContentValues.getAsString("proxy") != null) | |
paramXmlSerializer.attribute("", "proxy", paramContentValues.getAsString("proxy")); | |
if (paramContentValues.getAsString("port") != null) | |
paramXmlSerializer.attribute("", "port", paramContentValues.getAsString("port")); | |
if (paramContentValues.getAsString("mmsproxy") != null) | |
paramXmlSerializer.attribute("", "mmsproxy", paramContentValues.getAsString("mmsproxy")); | |
if (paramContentValues.getAsString("mmsport") != null) | |
paramXmlSerializer.attribute("", "mmsport", paramContentValues.getAsString("mmsport")); | |
if (paramContentValues.getAsString("mmsc") != null) | |
paramXmlSerializer.attribute("", "mmsc", paramContentValues.getAsString("mmsc")); | |
if (paramContentValues.getAsString("authtype") != null) | |
paramXmlSerializer.attribute("", "authtype", paramContentValues.getAsString("authtype")); | |
if (paramContentValues.getAsString("current") != null) | |
paramXmlSerializer.attribute("", "current", paramContentValues.getAsString("current")); | |
if (paramContentValues.getAsString("profile_type") != null) | |
paramXmlSerializer.attribute("", "profile_type", paramContentValues.getAsString("profile_type")); | |
if (paramContentValues.getAsString("roaming_protocol") != null) | |
paramXmlSerializer.attribute("", "roaming_protocol", paramContentValues.getAsString("roaming_protocol")); | |
long l = System.currentTimeMillis(); | |
SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); | |
paramXmlSerializer.attribute("", "apn_extra", localSimpleDateFormat.format(new Date(l))); | |
paramXmlSerializer.endTag("", "apn"); | |
return true; | |
} | |
} | |
catch (IOException localIOException) | |
{ | |
Log.e("TelephonyProvider", "IOException: writeInXml ", localIOException); | |
return false; | |
} | |
catch (IllegalArgumentException localIllegalArgumentException) | |
{ | |
Log.e("TelephonyProvider", "IllegalArgumentException: writeInXml ", localIllegalArgumentException); | |
return false; | |
} | |
catch (IllegalStateException localIllegalStateException) | |
{ | |
Log.e("TelephonyProvider", "IllegalStateException: writeInXml ", localIllegalStateException); | |
} | |
return false; | |
} | |
private void checkPermission() | |
{ | |
getContext().enforceCallingOrSelfPermission("android.permission.WRITE_APN_SETTINGS", "No permission to write APN settings"); | |
} | |
private static String copyPrevValue(ContentValues paramContentValues, Cursor paramCursor) | |
{ | |
int i = 1; | |
if ((paramCursor != null) && (paramCursor.moveToFirst())) | |
{ | |
if (paramContentValues.getAsString("mcc") == null) | |
paramContentValues.put("mcc", paramCursor.getString(paramCursor.getColumnIndexOrThrow("mcc"))); | |
if (paramContentValues.getAsString("mnc") == null) | |
paramContentValues.put("mnc", paramCursor.getString(paramCursor.getColumnIndexOrThrow("mnc"))); | |
if (paramContentValues.getAsString("type") == null) | |
paramContentValues.put("type", paramCursor.getString(paramCursor.getColumnIndexOrThrow("type"))); | |
if (paramContentValues.getAsString("carrier_enabled") == null) | |
if (paramCursor.getInt(paramCursor.getColumnIndexOrThrow("carrier_enabled")) != i) | |
break label660; | |
while (true) | |
{ | |
paramContentValues.put("carrier_enabled", Boolean.valueOf(i)); | |
if (paramContentValues.getAsString("protocol") == null) | |
paramContentValues.put("protocol", paramCursor.getString(paramCursor.getColumnIndexOrThrow("protocol"))); | |
if (paramContentValues.getAsString("apn") == null) | |
paramContentValues.put("apn", paramCursor.getString(paramCursor.getColumnIndexOrThrow("apn"))); | |
if (paramContentValues.getAsString("bearer") == null) | |
paramContentValues.put("bearer", Integer.valueOf(paramCursor.getInt(paramCursor.getColumnIndexOrThrow("bearer")))); | |
if (paramContentValues.getAsString("name") == null) | |
paramContentValues.put("name", paramCursor.getString(paramCursor.getColumnIndexOrThrow("name"))); | |
if (paramContentValues.getAsString("numeric") == null) | |
paramContentValues.put("numeric", paramCursor.getString(paramCursor.getColumnIndexOrThrow("numeric"))); | |
if (paramContentValues.getAsString("user") == null) | |
paramContentValues.put("user", paramCursor.getString(paramCursor.getColumnIndexOrThrow("user"))); | |
if (paramContentValues.getAsString("server") == null) | |
paramContentValues.put("server", paramCursor.getString(paramCursor.getColumnIndexOrThrow("server"))); | |
if (paramContentValues.getAsString("password") == null) | |
paramContentValues.put("password", paramCursor.getString(paramCursor.getColumnIndexOrThrow("password"))); | |
if (paramContentValues.getAsString("proxy") == null) | |
paramContentValues.put("proxy", paramCursor.getString(paramCursor.getColumnIndexOrThrow("proxy"))); | |
if (paramContentValues.getAsString("port") == null) | |
paramContentValues.put("port", paramCursor.getString(paramCursor.getColumnIndexOrThrow("port"))); | |
if (paramContentValues.getAsString("mmsproxy") == null) | |
paramContentValues.put("mmsproxy", paramCursor.getString(paramCursor.getColumnIndexOrThrow("mmsproxy"))); | |
if (paramContentValues.getAsString("mmsport") == null) | |
paramContentValues.put("mmsport", paramCursor.getString(paramCursor.getColumnIndexOrThrow("mmsport"))); | |
if (paramContentValues.getAsString("mmsc") == null) | |
paramContentValues.put("mmsc", paramCursor.getString(paramCursor.getColumnIndexOrThrow("mmsc"))); | |
if (paramContentValues.getAsString("authtype") == null) | |
paramContentValues.put("authtype", Integer.valueOf(paramCursor.getInt(paramCursor.getColumnIndexOrThrow("authtype")))); | |
if (paramContentValues.getAsString("current") == null) | |
paramContentValues.put("current", Integer.valueOf(paramCursor.getInt(paramCursor.getColumnIndexOrThrow("current")))); | |
if (paramContentValues.getAsString("profile_type") == null) | |
paramContentValues.put("profile_type", paramCursor.getString(paramCursor.getColumnIndexOrThrow("profile_type"))); | |
if (paramContentValues.getAsString("roaming_protocol") == null) | |
paramContentValues.put("roaming_protocol", paramCursor.getString(paramCursor.getColumnIndexOrThrow("roaming_protocol"))); | |
return Integer.toString(paramCursor.getInt(paramCursor.getColumnIndex("_id"))); | |
label660: int j = 0; | |
} | |
} | |
return null; | |
} | |
private static boolean findExistColumnInTable(SQLiteDatabase paramSQLiteDatabase, String paramString1, String paramString2) | |
{ | |
Cursor localCursor = paramSQLiteDatabase.rawQuery("pragma table_info(" + paramString1 + ")", null); | |
boolean bool1 = false; | |
if (localCursor != null) | |
{ | |
int i = localCursor.getColumnIndex("name"); | |
try | |
{ | |
while (localCursor.moveToNext()) | |
{ | |
boolean bool2 = paramString2.equals(localCursor.getString(i)); | |
if (bool2) | |
bool1 = true; | |
} | |
} | |
finally | |
{ | |
localCursor.close(); | |
} | |
} | |
return bool1; | |
} | |
private long getAPNConfigCheckSum() | |
{ | |
return getContext().getSharedPreferences("preferred-apn", 0).getLong("apn_conf_checksum", -1L); | |
} | |
private long getPreferredApnId(int paramInt) | |
{ | |
return getContext().getSharedPreferences("preferred-apn", 0).getLong(MultiSimManager.appendSimSlot("apn_id", paramInt), -1L); | |
} | |
private boolean isLteOnCdma() | |
{ | |
return TelephonyManager.getLteOnCdmaModeStatic() == 1; | |
} | |
// ERROR // | |
private void readFromXML(String[] paramArrayOfString) | |
{ | |
// Byte code: | |
// 0: new 394 java/io/File | |
// 3: dup | |
// 4: ldc_w 396 | |
// 7: invokespecial 397 java/io/File:<init> (Ljava/lang/String;)V | |
// 10: astore_2 | |
// 11: aconst_null | |
// 12: astore_3 | |
// 13: aload_2 | |
// 14: invokevirtual 400 java/io/File:exists ()Z | |
// 17: istore 19 | |
// 19: aconst_null | |
// 20: astore_3 | |
// 21: iload 19 | |
// 23: ifeq +323 -> 346 | |
// 26: aload_2 | |
// 27: invokevirtual 403 java/io/File:length ()J | |
// 30: lconst_0 | |
// 31: lcmp | |
// 32: istore 20 | |
// 34: aconst_null | |
// 35: astore_3 | |
// 36: iload 20 | |
// 38: ifeq +308 -> 346 | |
// 41: new 405 java/io/FileReader | |
// 44: dup | |
// 45: aload_2 | |
// 46: invokespecial 408 java/io/FileReader:<init> (Ljava/io/File;)V | |
// 49: astore 21 | |
// 51: invokestatic 414 android/util/Xml:newPullParser ()Lorg/xmlpull/v1/XmlPullParser; | |
// 54: astore 22 | |
// 56: aload 22 | |
// 58: aload 21 | |
// 60: invokeinterface 420 2 0 | |
// 65: aload 22 | |
// 67: ldc_w 422 | |
// 70: invokestatic 428 com/android/internal/util/XmlUtils:beginDocument (Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)V | |
// 73: aload 22 | |
// 75: ifnull +853 -> 928 | |
// 78: aload 22 | |
// 80: invokestatic 432 com/android/internal/util/XmlUtils:nextElement (Lorg/xmlpull/v1/XmlPullParser;)V | |
// 83: ldc 161 | |
// 85: aload 22 | |
// 87: invokeinterface 435 1 0 | |
// 92: invokevirtual 40 java/lang/String:equals (Ljava/lang/Object;)Z | |
// 95: ifeq +833 -> 928 | |
// 98: aload_1 | |
// 99: iconst_1 | |
// 100: aload 22 | |
// 102: aconst_null | |
// 103: ldc 201 | |
// 105: invokeinterface 438 3 0 | |
// 110: aastore | |
// 111: aload_1 | |
// 112: iconst_2 | |
// 113: aload 22 | |
// 115: aconst_null | |
// 116: ldc 161 | |
// 118: invokeinterface 438 3 0 | |
// 123: aastore | |
// 124: aload_1 | |
// 125: iconst_3 | |
// 126: aload 22 | |
// 128: aconst_null | |
// 129: ldc 211 | |
// 131: invokeinterface 438 3 0 | |
// 136: aastore | |
// 137: aload_1 | |
// 138: iconst_4 | |
// 139: aload 22 | |
// 141: aconst_null | |
// 142: ldc 213 | |
// 144: invokeinterface 438 3 0 | |
// 149: aastore | |
// 150: aload_1 | |
// 151: iconst_5 | |
// 152: aload 22 | |
// 154: aconst_null | |
// 155: ldc 205 | |
// 157: invokeinterface 438 3 0 | |
// 162: aastore | |
// 163: aload_1 | |
// 164: bipush 6 | |
// 166: aload 22 | |
// 168: aconst_null | |
// 169: ldc 207 | |
// 171: invokeinterface 438 3 0 | |
// 176: aastore | |
// 177: aload_1 | |
// 178: bipush 7 | |
// 180: aload 22 | |
// 182: aconst_null | |
// 183: ldc 209 | |
// 185: invokeinterface 438 3 0 | |
// 190: aastore | |
// 191: aload_1 | |
// 192: bipush 8 | |
// 194: aload 22 | |
// 196: aconst_null | |
// 197: ldc 219 | |
// 199: invokeinterface 438 3 0 | |
// 204: aastore | |
// 205: aload_1 | |
// 206: bipush 9 | |
// 208: aload 22 | |
// 210: aconst_null | |
// 211: ldc 169 | |
// 213: invokeinterface 438 3 0 | |
// 218: aastore | |
// 219: aload_1 | |
// 220: bipush 10 | |
// 222: aload 22 | |
// 224: aconst_null | |
// 225: ldc 179 | |
// 227: invokeinterface 438 3 0 | |
// 232: aastore | |
// 233: aload_1 | |
// 234: bipush 11 | |
// 236: aload 22 | |
// 238: aconst_null | |
// 239: ldc 203 | |
// 241: invokeinterface 438 3 0 | |
// 246: aastore | |
// 247: aload_1 | |
// 248: bipush 12 | |
// 250: aload 22 | |
// 252: aconst_null | |
// 253: ldc 215 | |
// 255: invokeinterface 438 3 0 | |
// 260: aastore | |
// 261: aload_1 | |
// 262: bipush 13 | |
// 264: aload 22 | |
// 266: aconst_null | |
// 267: ldc 217 | |
// 269: invokeinterface 438 3 0 | |
// 274: aastore | |
// 275: aload_1 | |
// 276: bipush 14 | |
// 278: aload 22 | |
// 280: aconst_null | |
// 281: ldc 221 | |
// 283: invokeinterface 438 3 0 | |
// 288: aastore | |
// 289: aload_1 | |
// 290: bipush 15 | |
// 292: aload 22 | |
// 294: aconst_null | |
// 295: ldc 181 | |
// 297: invokeinterface 438 3 0 | |
// 302: aastore | |
// 303: aload_1 | |
// 304: bipush 16 | |
// 306: aload 22 | |
// 308: aconst_null | |
// 309: ldc 252 | |
// 311: invokeinterface 438 3 0 | |
// 316: aastore | |
// 317: goto -239 -> 78 | |
// 320: astore 17 | |
// 322: aload 21 | |
// 324: astore_3 | |
// 325: ldc_w 268 | |
// 328: ldc_w 440 | |
// 331: aload 17 | |
// 333: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 336: pop | |
// 337: aload_3 | |
// 338: ifnull +7 -> 345 | |
// 341: aload_3 | |
// 342: invokevirtual 441 java/io/FileReader:close ()V | |
// 345: return | |
// 346: ldc_w 268 | |
// 349: ldc_w 443 | |
// 352: invokestatic 446 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I | |
// 355: pop | |
// 356: aconst_null | |
// 357: astore 26 | |
// 359: aload_0 | |
// 360: invokevirtual 285 com/android/providers/telephony/TelephonyProvider:getContext ()Landroid/content/Context; | |
// 363: ldc_w 448 | |
// 366: invokevirtual 452 android/content/Context:getSystemService (Ljava/lang/String;)Ljava/lang/Object; | |
// 369: checkcast 383 android/telephony/TelephonyManager | |
// 372: astore 27 | |
// 374: new 332 java/lang/StringBuilder | |
// 377: dup | |
// 378: invokespecial 333 java/lang/StringBuilder:<init> ()V | |
// 381: ldc_w 454 | |
// 384: invokevirtual 339 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 387: aload 27 | |
// 389: invokevirtual 457 android/telephony/TelephonyManager:getSimOperator ()Ljava/lang/String; | |
// 392: invokevirtual 339 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 395: ldc_w 459 | |
// 398: invokevirtual 339 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 401: ldc_w 461 | |
// 404: invokevirtual 339 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 407: ldc 181 | |
// 409: invokevirtual 339 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 412: ldc_w 463 | |
// 415: invokevirtual 339 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 418: invokevirtual 344 java/lang/StringBuilder:toString ()Ljava/lang/String; | |
// 421: astore 28 | |
// 423: ldc_w 268 | |
// 426: new 332 java/lang/StringBuilder | |
// 429: dup | |
// 430: invokespecial 333 java/lang/StringBuilder:<init> ()V | |
// 433: ldc_w 465 | |
// 436: invokevirtual 339 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 439: aload 28 | |
// 441: invokevirtual 339 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 444: invokevirtual 344 java/lang/StringBuilder:toString ()Ljava/lang/String; | |
// 447: invokestatic 446 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I | |
// 450: pop | |
// 451: aload_0 | |
// 452: invokevirtual 285 com/android/providers/telephony/TelephonyProvider:getContext ()Landroid/content/Context; | |
// 455: invokevirtual 469 android/content/Context:getContentResolver ()Landroid/content/ContentResolver; | |
// 458: ldc_w 471 | |
// 461: invokestatic 477 android/net/Uri:parse (Ljava/lang/String;)Landroid/net/Uri; | |
// 464: aconst_null | |
// 465: aload 28 | |
// 467: aconst_null | |
// 468: aconst_null | |
// 469: invokevirtual 483 android/content/ContentResolver:query (Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor; | |
// 472: astore 26 | |
// 474: aload 26 | |
// 476: ifnull +309 -> 785 | |
// 479: aload 26 | |
// 481: invokeinterface 301 1 0 | |
// 486: pop | |
// 487: aload_1 | |
// 488: iconst_1 | |
// 489: aload 26 | |
// 491: aload 26 | |
// 493: ldc 199 | |
// 495: invokeinterface 305 2 0 | |
// 500: invokeinterface 309 2 0 | |
// 505: aastore | |
// 506: aload_1 | |
// 507: iconst_2 | |
// 508: aload 26 | |
// 510: aload 26 | |
// 512: ldc 161 | |
// 514: invokeinterface 305 2 0 | |
// 519: invokeinterface 309 2 0 | |
// 524: aastore | |
// 525: aload_1 | |
// 526: iconst_3 | |
// 527: aload 26 | |
// 529: aload 26 | |
// 531: ldc 211 | |
// 533: invokeinterface 305 2 0 | |
// 538: invokeinterface 309 2 0 | |
// 543: aastore | |
// 544: aload_1 | |
// 545: iconst_4 | |
// 546: aload 26 | |
// 548: aload 26 | |
// 550: ldc 213 | |
// 552: invokeinterface 305 2 0 | |
// 557: invokeinterface 309 2 0 | |
// 562: aastore | |
// 563: aload_1 | |
// 564: iconst_5 | |
// 565: aload 26 | |
// 567: aload 26 | |
// 569: ldc 205 | |
// 571: invokeinterface 305 2 0 | |
// 576: invokeinterface 309 2 0 | |
// 581: aastore | |
// 582: aload_1 | |
// 583: bipush 6 | |
// 585: aload 26 | |
// 587: aload 26 | |
// 589: ldc 207 | |
// 591: invokeinterface 305 2 0 | |
// 596: invokeinterface 309 2 0 | |
// 601: aastore | |
// 602: aload_1 | |
// 603: bipush 7 | |
// 605: aload 26 | |
// 607: aload 26 | |
// 609: ldc 209 | |
// 611: invokeinterface 305 2 0 | |
// 616: invokeinterface 309 2 0 | |
// 621: aastore | |
// 622: aload_1 | |
// 623: bipush 8 | |
// 625: aload 26 | |
// 627: aload 26 | |
// 629: ldc 219 | |
// 631: invokeinterface 305 2 0 | |
// 636: invokeinterface 309 2 0 | |
// 641: aastore | |
// 642: aload_1 | |
// 643: bipush 9 | |
// 645: aload 26 | |
// 647: aload 26 | |
// 649: ldc 169 | |
// 651: invokeinterface 305 2 0 | |
// 656: invokeinterface 309 2 0 | |
// 661: aastore | |
// 662: aload_1 | |
// 663: bipush 10 | |
// 665: aload 26 | |
// 667: aload 26 | |
// 669: ldc 179 | |
// 671: invokeinterface 305 2 0 | |
// 676: invokeinterface 309 2 0 | |
// 681: aastore | |
// 682: aload_1 | |
// 683: bipush 11 | |
// 685: aload 26 | |
// 687: aload 26 | |
// 689: ldc 203 | |
// 691: invokeinterface 305 2 0 | |
// 696: invokeinterface 309 2 0 | |
// 701: aastore | |
// 702: aload_1 | |
// 703: bipush 12 | |
// 705: aload 26 | |
// 707: aload 26 | |
// 709: ldc 215 | |
// 711: invokeinterface 305 2 0 | |
// 716: invokeinterface 309 2 0 | |
// 721: aastore | |
// 722: aload_1 | |
// 723: bipush 13 | |
// 725: aload 26 | |
// 727: aload 26 | |
// 729: ldc 213 | |
// 731: invokeinterface 305 2 0 | |
// 736: invokeinterface 309 2 0 | |
// 741: aastore | |
// 742: aload_1 | |
// 743: bipush 14 | |
// 745: aload 26 | |
// 747: aload 26 | |
// 749: ldc 221 | |
// 751: invokeinterface 305 2 0 | |
// 756: invokeinterface 313 2 0 | |
// 761: invokestatic 330 java/lang/Integer:toString (I)Ljava/lang/String; | |
// 764: aastore | |
// 765: aload_1 | |
// 766: bipush 15 | |
// 768: aload 26 | |
// 770: aload 26 | |
// 772: ldc 181 | |
// 774: invokeinterface 305 2 0 | |
// 779: invokeinterface 309 2 0 | |
// 784: aastore | |
// 785: aload 26 | |
// 787: ifnull +10 -> 797 | |
// 790: aload 26 | |
// 792: invokeinterface 356 1 0 | |
// 797: iconst_0 | |
// 798: ifeq -453 -> 345 | |
// 801: aconst_null | |
// 802: athrow | |
// 803: astore 9 | |
// 805: ldc_w 268 | |
// 808: astore 10 | |
// 810: ldc_w 485 | |
// 813: astore 11 | |
// 815: aload 10 | |
// 817: aload 11 | |
// 819: aload 9 | |
// 821: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 824: pop | |
// 825: return | |
// 826: astore 31 | |
// 828: ldc_w 268 | |
// 831: new 332 java/lang/StringBuilder | |
// 834: dup | |
// 835: invokespecial 333 java/lang/StringBuilder:<init> ()V | |
// 838: ldc_w 487 | |
// 841: invokevirtual 339 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 844: aload 31 | |
// 846: invokevirtual 490 java/lang/StringBuilder:append (Ljava/lang/Object;)Ljava/lang/StringBuilder; | |
// 849: invokevirtual 344 java/lang/StringBuilder:toString ()Ljava/lang/String; | |
// 852: invokestatic 446 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I | |
// 855: pop | |
// 856: aload 26 | |
// 858: ifnull -61 -> 797 | |
// 861: aload 26 | |
// 863: invokeinterface 356 1 0 | |
// 868: goto -71 -> 797 | |
// 871: astore 30 | |
// 873: aconst_null | |
// 874: astore_3 | |
// 875: aload 26 | |
// 877: ifnull +10 -> 887 | |
// 880: aload 26 | |
// 882: invokeinterface 356 1 0 | |
// 887: aload 30 | |
// 889: athrow | |
// 890: astore 15 | |
// 892: ldc_w 268 | |
// 895: ldc_w 492 | |
// 898: aload 15 | |
// 900: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 903: pop | |
// 904: aload_3 | |
// 905: ifnull -560 -> 345 | |
// 908: aload_3 | |
// 909: invokevirtual 441 java/io/FileReader:close ()V | |
// 912: return | |
// 913: astore 9 | |
// 915: ldc_w 268 | |
// 918: astore 10 | |
// 920: ldc_w 485 | |
// 923: astore 11 | |
// 925: goto -110 -> 815 | |
// 928: aload 21 | |
// 930: ifnull +8 -> 938 | |
// 933: aload 21 | |
// 935: invokevirtual 441 java/io/FileReader:close ()V | |
// 938: return | |
// 939: astore 13 | |
// 941: ldc_w 268 | |
// 944: ldc_w 494 | |
// 947: aload 13 | |
// 949: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 952: pop | |
// 953: aload_3 | |
// 954: ifnull -609 -> 345 | |
// 957: aload_3 | |
// 958: invokevirtual 441 java/io/FileReader:close ()V | |
// 961: return | |
// 962: astore 9 | |
// 964: ldc_w 268 | |
// 967: astore 10 | |
// 969: ldc_w 485 | |
// 972: astore 11 | |
// 974: goto -159 -> 815 | |
// 977: astore 7 | |
// 979: ldc_w 268 | |
// 982: ldc_w 496 | |
// 985: aload 7 | |
// 987: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 990: pop | |
// 991: aload_3 | |
// 992: ifnull -647 -> 345 | |
// 995: aload_3 | |
// 996: invokevirtual 441 java/io/FileReader:close ()V | |
// 999: return | |
// 1000: astore 9 | |
// 1002: ldc_w 268 | |
// 1005: astore 10 | |
// 1007: ldc_w 485 | |
// 1010: astore 11 | |
// 1012: goto -197 -> 815 | |
// 1015: astore 4 | |
// 1017: aload_3 | |
// 1018: ifnull +7 -> 1025 | |
// 1021: aload_3 | |
// 1022: invokevirtual 441 java/io/FileReader:close ()V | |
// 1025: aload 4 | |
// 1027: athrow | |
// 1028: astore 5 | |
// 1030: ldc_w 268 | |
// 1033: ldc_w 485 | |
// 1036: aload 5 | |
// 1038: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 1041: pop | |
// 1042: goto -17 -> 1025 | |
// 1045: astore 9 | |
// 1047: ldc_w 268 | |
// 1050: astore 10 | |
// 1052: ldc_w 485 | |
// 1055: astore 11 | |
// 1057: goto -242 -> 815 | |
// 1060: astore 23 | |
// 1062: ldc_w 268 | |
// 1065: ldc_w 485 | |
// 1068: aload 23 | |
// 1070: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 1073: pop | |
// 1074: goto -136 -> 938 | |
// 1077: astore 4 | |
// 1079: aload 21 | |
// 1081: astore_3 | |
// 1082: goto -65 -> 1017 | |
// 1085: astore 7 | |
// 1087: aload 21 | |
// 1089: astore_3 | |
// 1090: goto -111 -> 979 | |
// 1093: astore 13 | |
// 1095: aload 21 | |
// 1097: astore_3 | |
// 1098: goto -157 -> 941 | |
// 1101: astore 15 | |
// 1103: aload 21 | |
// 1105: astore_3 | |
// 1106: goto -214 -> 892 | |
// 1109: astore 17 | |
// 1111: aconst_null | |
// 1112: astore_3 | |
// 1113: goto -788 -> 325 | |
// | |
// Exception table: | |
// from to target type | |
// 51 73 320 org/xmlpull/v1/XmlPullParserException | |
// 78 317 320 org/xmlpull/v1/XmlPullParserException | |
// 801 803 803 java/io/IOException | |
// 451 474 826 android/database/sqlite/SQLiteException | |
// 479 785 826 android/database/sqlite/SQLiteException | |
// 451 474 871 finally | |
// 479 785 871 finally | |
// 828 856 871 finally | |
// 13 19 890 java/io/IOException | |
// 26 34 890 java/io/IOException | |
// 41 51 890 java/io/IOException | |
// 346 356 890 java/io/IOException | |
// 359 451 890 java/io/IOException | |
// 790 797 890 java/io/IOException | |
// 861 868 890 java/io/IOException | |
// 880 887 890 java/io/IOException | |
// 887 890 890 java/io/IOException | |
// 908 912 913 java/io/IOException | |
// 13 19 939 java/lang/IllegalArgumentException | |
// 26 34 939 java/lang/IllegalArgumentException | |
// 41 51 939 java/lang/IllegalArgumentException | |
// 346 356 939 java/lang/IllegalArgumentException | |
// 359 451 939 java/lang/IllegalArgumentException | |
// 790 797 939 java/lang/IllegalArgumentException | |
// 861 868 939 java/lang/IllegalArgumentException | |
// 880 887 939 java/lang/IllegalArgumentException | |
// 887 890 939 java/lang/IllegalArgumentException | |
// 957 961 962 java/io/IOException | |
// 13 19 977 java/lang/IllegalStateException | |
// 26 34 977 java/lang/IllegalStateException | |
// 41 51 977 java/lang/IllegalStateException | |
// 346 356 977 java/lang/IllegalStateException | |
// 359 451 977 java/lang/IllegalStateException | |
// 790 797 977 java/lang/IllegalStateException | |
// 861 868 977 java/lang/IllegalStateException | |
// 880 887 977 java/lang/IllegalStateException | |
// 887 890 977 java/lang/IllegalStateException | |
// 995 999 1000 java/io/IOException | |
// 13 19 1015 finally | |
// 26 34 1015 finally | |
// 41 51 1015 finally | |
// 325 337 1015 finally | |
// 346 356 1015 finally | |
// 359 451 1015 finally | |
// 790 797 1015 finally | |
// 861 868 1015 finally | |
// 880 887 1015 finally | |
// 887 890 1015 finally | |
// 892 904 1015 finally | |
// 941 953 1015 finally | |
// 979 991 1015 finally | |
// 1021 1025 1028 java/io/IOException | |
// 341 345 1045 java/io/IOException | |
// 933 938 1060 java/io/IOException | |
// 51 73 1077 finally | |
// 78 317 1077 finally | |
// 51 73 1085 java/lang/IllegalStateException | |
// 78 317 1085 java/lang/IllegalStateException | |
// 51 73 1093 java/lang/IllegalArgumentException | |
// 78 317 1093 java/lang/IllegalArgumentException | |
// 51 73 1101 java/io/IOException | |
// 78 317 1101 java/io/IOException | |
// 13 19 1109 org/xmlpull/v1/XmlPullParserException | |
// 26 34 1109 org/xmlpull/v1/XmlPullParserException | |
// 41 51 1109 org/xmlpull/v1/XmlPullParserException | |
// 346 356 1109 org/xmlpull/v1/XmlPullParserException | |
// 359 451 1109 org/xmlpull/v1/XmlPullParserException | |
// 790 797 1109 org/xmlpull/v1/XmlPullParserException | |
// 861 868 1109 org/xmlpull/v1/XmlPullParserException | |
// 880 887 1109 org/xmlpull/v1/XmlPullParserException | |
// 887 890 1109 org/xmlpull/v1/XmlPullParserException | |
} | |
private void restoreDefaultAPN() | |
{ | |
SQLiteDatabase localSQLiteDatabase = this.mOpenHelper.getWritableDatabase(); | |
try | |
{ | |
localSQLiteDatabase.delete("carriers", null, null); | |
for (int i = 0; i < MultiSimManager.getSimSlotCount(); i++) | |
setPreferredApnId(Long.valueOf(-1L), i); | |
} | |
catch (SQLException localSQLException) | |
{ | |
while (true) | |
Log.e("TelephonyProvider", "got exception when deleting to restore: " + localSQLException); | |
this.mOpenHelper.initDatabase(localSQLiteDatabase); | |
this.mOpenHelper.loadPersistentApnData(localSQLiteDatabase); | |
Intent localIntent = new Intent("android.intent.action.CSC_UPDATE_CONNECTION"); | |
getContext().sendBroadcast(localIntent); | |
} | |
} | |
private void serializePersistentAPNs(ContentValues paramContentValues) | |
{ | |
Log.e("TelephonyProvider", "serializePersistentAPNs entered"); | |
for (int i = 0; ; i++) | |
if (i < 3) | |
{ | |
Log.e("TelephonyProvider", "writeInXml"); | |
if (!writeInXml(paramContentValues)); | |
} | |
else | |
{ | |
return; | |
} | |
} | |
private void setAPNConfigCheckSum(long paramLong) | |
{ | |
SharedPreferences.Editor localEditor = getContext().getSharedPreferences("preferred-apn", 0).edit(); | |
localEditor.putLong("apn_conf_checksum", paramLong); | |
localEditor.apply(); | |
} | |
private void setPreferredApnId(Long paramLong, int paramInt) | |
{ | |
SharedPreferences.Editor localEditor = getContext().getSharedPreferences("preferred-apn", 0).edit(); | |
String str = MultiSimManager.appendSimSlot("apn_id", paramInt); | |
if (paramLong != null); | |
for (long l = paramLong.longValue(); ; l = -1L) | |
{ | |
localEditor.putLong(str, l); | |
localEditor.commit(); | |
return; | |
} | |
} | |
// ERROR // | |
private static boolean writeInXml(ContentValues paramContentValues) | |
{ | |
// Byte code: | |
// 0: ldc_w 268 | |
// 3: ldc_w 567 | |
// 6: invokestatic 446 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I | |
// 9: pop | |
// 10: new 394 java/io/File | |
// 13: dup | |
// 14: ldc_w 396 | |
// 17: invokespecial 397 java/io/File:<init> (Ljava/lang/String;)V | |
// 20: astore_2 | |
// 21: aconst_null | |
// 22: astore_3 | |
// 23: aload_2 | |
// 24: invokevirtual 400 java/io/File:exists ()Z | |
// 27: ifeq +410 -> 437 | |
// 30: aload_2 | |
// 31: invokevirtual 403 java/io/File:length ()J | |
// 34: lconst_0 | |
// 35: lcmp | |
// 36: ifeq +401 -> 437 | |
// 39: ldc_w 268 | |
// 42: ldc_w 569 | |
// 45: invokestatic 446 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I | |
// 48: pop | |
// 49: aload_2 | |
// 50: invokevirtual 571 java/io/File:delete ()Z | |
// 53: pop | |
// 54: new 394 java/io/File | |
// 57: dup | |
// 58: ldc_w 396 | |
// 61: invokespecial 397 java/io/File:<init> (Ljava/lang/String;)V | |
// 64: astore 9 | |
// 66: new 573 java/io/FileWriter | |
// 69: dup | |
// 70: aload 9 | |
// 72: iconst_1 | |
// 73: invokespecial 576 java/io/FileWriter:<init> (Ljava/io/File;Z)V | |
// 76: astore 5 | |
// 78: invokestatic 580 android/util/Xml:newSerializer ()Lorg/xmlpull/v1/XmlSerializer; | |
// 81: astore 26 | |
// 83: aload 26 | |
// 85: aload 5 | |
// 87: invokeinterface 584 2 0 | |
// 92: aload 26 | |
// 94: ldc_w 586 | |
// 97: iconst_1 | |
// 98: invokestatic 316 java/lang/Boolean:valueOf (Z)Ljava/lang/Boolean; | |
// 101: invokeinterface 589 3 0 | |
// 106: aload 26 | |
// 108: ldc 159 | |
// 110: ldc_w 422 | |
// 113: invokeinterface 167 3 0 | |
// 118: pop | |
// 119: ldc_w 268 | |
// 122: ldc_w 591 | |
// 125: invokestatic 446 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I | |
// 128: pop | |
// 129: aload_0 | |
// 130: aload 26 | |
// 132: invokestatic 593 com/android/providers/telephony/TelephonyProvider:addAtrribute (Landroid/content/ContentValues;Lorg/xmlpull/v1/XmlSerializer;)Z | |
// 135: istore 12 | |
// 137: aload 26 | |
// 139: invokeinterface 596 1 0 | |
// 144: aload 5 | |
// 146: ifnull +8 -> 154 | |
// 149: aload 5 | |
// 151: invokevirtual 597 java/io/FileWriter:close ()V | |
// 154: aload 9 | |
// 156: iconst_1 | |
// 157: iconst_0 | |
// 158: invokevirtual 601 java/io/File:setReadable (ZZ)Z | |
// 161: pop | |
// 162: iload 12 | |
// 164: ireturn | |
// 165: astore 21 | |
// 167: aload_2 | |
// 168: astore 9 | |
// 170: aload 21 | |
// 172: astore 22 | |
// 174: ldc_w 268 | |
// 177: ldc_w 270 | |
// 180: aload 22 | |
// 182: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 185: pop | |
// 186: aload_3 | |
// 187: ifnull +7 -> 194 | |
// 190: aload_3 | |
// 191: invokevirtual 597 java/io/FileWriter:close ()V | |
// 194: iconst_0 | |
// 195: istore 12 | |
// 197: goto -43 -> 154 | |
// 200: astore 16 | |
// 202: aconst_null | |
// 203: astore 5 | |
// 205: aload_2 | |
// 206: astore 9 | |
// 208: aload 16 | |
// 210: astore 17 | |
// 212: ldc_w 268 | |
// 215: ldc_w 278 | |
// 218: aload 17 | |
// 220: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 223: pop | |
// 224: aload 5 | |
// 226: ifnull +8 -> 234 | |
// 229: aload 5 | |
// 231: invokevirtual 597 java/io/FileWriter:close ()V | |
// 234: iconst_0 | |
// 235: istore 12 | |
// 237: goto -83 -> 154 | |
// 240: astore 8 | |
// 242: aconst_null | |
// 243: astore 5 | |
// 245: aload_2 | |
// 246: astore 9 | |
// 248: aload 8 | |
// 250: astore 10 | |
// 252: ldc_w 268 | |
// 255: ldc_w 280 | |
// 258: aload 10 | |
// 260: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 263: pop | |
// 264: aload 5 | |
// 266: ifnull +8 -> 274 | |
// 269: aload 5 | |
// 271: invokevirtual 597 java/io/FileWriter:close ()V | |
// 274: iconst_0 | |
// 275: istore 12 | |
// 277: goto -123 -> 154 | |
// 280: astore 4 | |
// 282: aconst_null | |
// 283: astore 5 | |
// 285: aload 5 | |
// 287: ifnull +8 -> 295 | |
// 290: aload 5 | |
// 292: invokevirtual 597 java/io/FileWriter:close ()V | |
// 295: aload 4 | |
// 297: athrow | |
// 298: astore 6 | |
// 300: ldc_w 268 | |
// 303: ldc_w 603 | |
// 306: aload 6 | |
// 308: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 311: pop | |
// 312: goto -17 -> 295 | |
// 315: astore 24 | |
// 317: ldc_w 268 | |
// 320: ldc_w 603 | |
// 323: aload 24 | |
// 325: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 328: pop | |
// 329: goto -135 -> 194 | |
// 332: astore 19 | |
// 334: ldc_w 268 | |
// 337: ldc_w 603 | |
// 340: aload 19 | |
// 342: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 345: pop | |
// 346: goto -112 -> 234 | |
// 349: astore 14 | |
// 351: ldc_w 268 | |
// 354: ldc_w 603 | |
// 357: aload 14 | |
// 359: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 362: pop | |
// 363: goto -89 -> 274 | |
// 366: astore 29 | |
// 368: ldc_w 268 | |
// 371: ldc_w 603 | |
// 374: aload 29 | |
// 376: invokestatic 276 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 379: pop | |
// 380: goto -226 -> 154 | |
// 383: astore 4 | |
// 385: goto -100 -> 285 | |
// 388: astore 4 | |
// 390: aload_3 | |
// 391: astore 5 | |
// 393: goto -108 -> 285 | |
// 396: astore 10 | |
// 398: aconst_null | |
// 399: astore 5 | |
// 401: goto -149 -> 252 | |
// 404: astore 10 | |
// 406: goto -154 -> 252 | |
// 409: astore 17 | |
// 411: aconst_null | |
// 412: astore 5 | |
// 414: goto -202 -> 212 | |
// 417: astore 17 | |
// 419: goto -207 -> 212 | |
// 422: astore 22 | |
// 424: aconst_null | |
// 425: astore_3 | |
// 426: goto -252 -> 174 | |
// 429: astore 22 | |
// 431: aload 5 | |
// 433: astore_3 | |
// 434: goto -260 -> 174 | |
// 437: aload_2 | |
// 438: astore 9 | |
// 440: goto -374 -> 66 | |
// | |
// Exception table: | |
// from to target type | |
// 23 66 165 java/io/IOException | |
// 23 66 200 java/lang/IllegalArgumentException | |
// 23 66 240 java/lang/IllegalStateException | |
// 23 66 280 finally | |
// 66 78 280 finally | |
// 290 295 298 java/io/IOException | |
// 190 194 315 java/io/IOException | |
// 229 234 332 java/io/IOException | |
// 269 274 349 java/io/IOException | |
// 149 154 366 java/io/IOException | |
// 78 144 383 finally | |
// 212 224 383 finally | |
// 252 264 383 finally | |
// 174 186 388 finally | |
// 66 78 396 java/lang/IllegalStateException | |
// 78 144 404 java/lang/IllegalStateException | |
// 66 78 409 java/lang/IllegalArgumentException | |
// 78 144 417 java/lang/IllegalArgumentException | |
// 66 78 422 java/io/IOException | |
// 78 144 429 java/io/IOException | |
} | |
public int delete(Uri paramUri, String paramString, String[] paramArrayOfString) | |
{ | |
int i = 0; | |
checkPermission(); | |
SQLiteDatabase localSQLiteDatabase = this.mOpenHelper.getWritableDatabase(); | |
int j = s_urlMatcher.match(paramUri); | |
switch (j) | |
{ | |
case 8: | |
case 9: | |
default: | |
throw new UnsupportedOperationException("Cannot delete that URL: " + paramUri); | |
case 7: | |
localSQLiteDatabase.delete("carriers", paramString, paramArrayOfString); | |
case 1: | |
case 2: | |
case 3: | |
case 4: | |
case 5: | |
case 6: | |
case 10: | |
case 11: | |
} | |
while (true) | |
{ | |
if (i > 0) | |
{ | |
Log.d("TelephonyProvider", "APN deleted !!"); | |
getContext().getContentResolver().notifyChange(Telephony.Carriers.CONTENT_URI, null); | |
} | |
return i; | |
i = localSQLiteDatabase.delete("carriers", paramString, paramArrayOfString); | |
continue; | |
i = localSQLiteDatabase.delete("carriers", paramString, paramArrayOfString); | |
continue; | |
String[] arrayOfString = new String[1]; | |
arrayOfString[0] = paramUri.getLastPathSegment(); | |
i = localSQLiteDatabase.delete("carriers", "_id=?", arrayOfString); | |
continue; | |
i = 1; | |
restoreDefaultAPN(); | |
continue; | |
int k = ((Integer)simSlotMap.get(Integer.valueOf(j))).intValue(); | |
setPreferredApnId(Long.valueOf(-1L), k); | |
if (j != 5) | |
{ | |
i = 0; | |
if (j != 10); | |
} | |
else | |
{ | |
i = 1; | |
} | |
} | |
} | |
public String getType(Uri paramUri) | |
{ | |
switch (s_urlMatcher.match(paramUri)) | |
{ | |
case 2: | |
case 4: | |
case 8: | |
case 9: | |
default: | |
throw new IllegalArgumentException("Unknown URL " + paramUri); | |
case 1: | |
case 7: | |
return "vnd.android.cursor.dir/telephony-carrier"; | |
case 3: | |
return "vnd.android.cursor.item/telephony-carrier"; | |
case 5: | |
case 6: | |
return "vnd.android.cursor.item/telephony-carrier"; | |
case 10: | |
case 11: | |
} | |
return "vnd.android.cursor.item/telephony-carrier"; | |
} | |
public Uri insert(Uri paramUri, ContentValues paramContentValues) | |
{ | |
checkPermission(); | |
SQLiteDatabase localSQLiteDatabase = this.mOpenHelper.getWritableDatabase(); | |
int i = s_urlMatcher.match(paramUri); | |
int j = 0; | |
Uri localUri = null; | |
switch (i) | |
{ | |
case 3: | |
case 4: | |
case 8: | |
default: | |
case 7: | |
case 1: | |
case 2: | |
case 9: | |
case 5: | |
case 6: | |
case 10: | |
case 11: | |
} | |
while (true) | |
{ | |
if (j != 0) | |
{ | |
Log.d("TelephonyProvider", "APN inserted !!"); | |
getContext().getContentResolver().notifyChange(Telephony.Carriers.CONTENT_URI, null); | |
} | |
return localUri; | |
if (paramContentValues != null); | |
for (ContentValues localContentValues2 = new ContentValues(paramContentValues); ; localContentValues2 = new ContentValues()) | |
{ | |
if (!localContentValues2.containsKey("name")) | |
localContentValues2.put("name", ""); | |
if (!localContentValues2.containsKey("apn")) | |
localContentValues2.put("apn", ""); | |
if (!localContentValues2.containsKey("port")) | |
localContentValues2.put("port", ""); | |
if (!localContentValues2.containsKey("proxy")) | |
localContentValues2.put("proxy", ""); | |
if (!localContentValues2.containsKey("user")) | |
localContentValues2.put("user", ""); | |
if (!localContentValues2.containsKey("server")) | |
localContentValues2.put("server", ""); | |
if (!localContentValues2.containsKey("password")) | |
localContentValues2.put("password", ""); | |
if (!localContentValues2.containsKey("mmsport")) | |
localContentValues2.put("mmsport", ""); | |
if (!localContentValues2.containsKey("mmsproxy")) | |
localContentValues2.put("mmsproxy", ""); | |
if (!localContentValues2.containsKey("authtype")) | |
localContentValues2.put("authtype", Integer.valueOf(-1)); | |
if (!localContentValues2.containsKey("protocol")) | |
localContentValues2.put("protocol", "IP"); | |
if (!localContentValues2.containsKey("roaming_protocol")) | |
localContentValues2.put("roaming_protocol", "IP"); | |
if (!localContentValues2.containsKey("carrier_enabled")) | |
localContentValues2.put("carrier_enabled", Boolean.valueOf(true)); | |
if (!localContentValues2.containsKey("bearer")) | |
localContentValues2.put("bearer", Integer.valueOf(0)); | |
if (!localContentValues2.containsKey("sim_slot")) | |
localContentValues2.put("sim_slot", Integer.valueOf(-1)); | |
if (!localContentValues2.containsKey("mvno_type")) | |
localContentValues2.put("mvno_type", ""); | |
if (!localContentValues2.containsKey("mvno_match_data")) | |
localContentValues2.put("mvno_match_data", ""); | |
if (!localContentValues2.containsKey("max_conn")) | |
localContentValues2.put("max_conn", Integer.valueOf(1023)); | |
if (!localContentValues2.containsKey("max_conn_t")) | |
localContentValues2.put("max_conn_t", Integer.valueOf(300)); | |
if (!localContentValues2.containsKey("wait_time")) | |
localContentValues2.put("wait_time", Integer.valueOf(0)); | |
long l2 = localSQLiteDatabase.insert("carriers", null, localContentValues2); | |
boolean bool3 = l2 < 0L; | |
j = 0; | |
localUri = null; | |
if (!bool3) | |
break; | |
localUri = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI, l2); | |
j = 0; | |
break; | |
} | |
ContentValues localContentValues1; | |
if (paramContentValues != null) | |
{ | |
localContentValues1 = new ContentValues(paramContentValues); | |
label616: if (!localContentValues1.containsKey("name")) | |
localContentValues1.put("name", ""); | |
if (!localContentValues1.containsKey("apn")) | |
localContentValues1.put("apn", ""); | |
if (!localContentValues1.containsKey("port")) | |
localContentValues1.put("port", ""); | |
if (!localContentValues1.containsKey("proxy")) | |
localContentValues1.put("proxy", ""); | |
if (!localContentValues1.containsKey("user")) | |
localContentValues1.put("user", ""); | |
if (!localContentValues1.containsKey("server")) | |
localContentValues1.put("server", ""); | |
if (!localContentValues1.containsKey("password")) | |
localContentValues1.put("password", ""); | |
if (!localContentValues1.containsKey("mmsport")) | |
localContentValues1.put("mmsport", ""); | |
if (!localContentValues1.containsKey("mmsproxy")) | |
localContentValues1.put("mmsproxy", ""); | |
if (!localContentValues1.containsKey("authtype")) | |
localContentValues1.put("authtype", Integer.valueOf(-1)); | |
if (!localContentValues1.containsKey("protocol")) | |
{ | |
if (((!SystemProperties.get("ro.product.name").contains("t0lte")) && (!SystemProperties.get("ro.product.name").contains("meliuslte"))) || (!"ATT".equals(""))) | |
break label1144; | |
localContentValues1.put("protocol", "IPV4V6"); | |
Log.i("TelephonyProvider", "insert:: ATT has specific requirement to show v4v6 for IPVersion"); | |
} | |
label879: if (!localContentValues1.containsKey("roaming_protocol")) | |
{ | |
if (((!SystemProperties.get("ro.product.name").contains("t0lte")) && (!SystemProperties.get("ro.product.name").contains("meliuslte"))) || (!"ATT".equals(""))) | |
break label1157; | |
localContentValues1.put("roaming_protocol", "IPV4V6"); | |
Log.i("TelephonyProvider", "insert:: ATT has specific requirement to show v4v6 for Roaming_Protocol IPVersion"); | |
} | |
} | |
while (true) | |
{ | |
if (!localContentValues1.containsKey("carrier_enabled")) | |
localContentValues1.put("carrier_enabled", Boolean.valueOf(true)); | |
if (!localContentValues1.containsKey("bearer")) | |
localContentValues1.put("bearer", Integer.valueOf(0)); | |
if (!localContentValues1.containsKey("sim_slot")) | |
localContentValues1.put("sim_slot", Integer.valueOf(-1)); | |
if (!localContentValues1.containsKey("max_conn")) | |
localContentValues1.put("max_conn", Integer.valueOf(1023)); | |
if (!localContentValues1.containsKey("max_conn_t")) | |
localContentValues1.put("max_conn_t", Integer.valueOf(300)); | |
if (!localContentValues1.containsKey("wait_time")) | |
localContentValues1.put("wait_time", Integer.valueOf(0)); | |
long l1 = localSQLiteDatabase.insert("carriers", null, localContentValues1); | |
boolean bool2 = l1 < 0L; | |
j = 0; | |
localUri = null; | |
if (!bool2) | |
break; | |
localUri = ContentUris.withAppendedId(Telephony.Carriers.CONTENT_URI, l1); | |
j = 1; | |
break; | |
localContentValues1 = new ContentValues(); | |
break label616; | |
label1144: localContentValues1.put("protocol", "IP"); | |
break label879; | |
label1157: localContentValues1.put("roaming_protocol", "IP"); | |
} | |
int m = ((Integer)simSlotMap.get(Integer.valueOf(i))).intValue(); | |
localSQLiteDatabase.update("carriers", s_currentNullMaps[m], "current IS NOT NULL", null); | |
String str = paramContentValues.getAsString("numeric"); | |
int n = localSQLiteDatabase.update("carriers", s_currentSetMaps[m], "(sim_slot = '" + m + "'" + " OR sim_slot = '-1') AND " + "numeric = '" + str + "'", null); | |
j = 0; | |
localUri = null; | |
if (n > 0) | |
{ | |
j = 0; | |
localUri = null; | |
continue; | |
int k = ((Integer)simSlotMap.get(Integer.valueOf(i))).intValue(); | |
j = 0; | |
localUri = null; | |
if (paramContentValues != null) | |
{ | |
boolean bool1 = paramContentValues.containsKey(MultiSimManager.appendSimSlot("apn_id", k)); | |
j = 0; | |
localUri = null; | |
if (bool1) | |
{ | |
setPreferredApnId(paramContentValues.getAsLong(MultiSimManager.appendSimSlot("apn_id", k)), k); | |
j = 0; | |
localUri = null; | |
} | |
} | |
} | |
} | |
} | |
public boolean onCreate() | |
{ | |
long l1 = getAPNConfigCheckSum(); | |
File localFile = new File(Environment.getRootDirectory(), "etc/apns-conf.xml"); | |
Log.w("TelephonyProvider", "onCreate: confFile=" + localFile.getAbsolutePath() + " oldCheckSum=" + l1); | |
this.mOpenHelper = new DatabaseHelper(getContext()); | |
this.mChangesHelper = new ChangesHelper(getContext()); | |
if (!isLteOnCdma()); | |
while (true) | |
{ | |
return true; | |
try | |
{ | |
localSQLiteDatabase = this.mOpenHelper.getWritableDatabase(); | |
if (findExistColumnInTable(localSQLiteDatabase, "carriers", "profile_type")) | |
Log.w("TelephonyProvider", "onCreate CARRIERS_TABLE : profile_type Column Exist"); | |
} | |
catch (SQLException localSQLException) | |
{ | |
try | |
{ | |
long l2 = FileUtils.checksumCrc32(localFile); | |
Log.w("TelephonyProvider", "onCreate: newCheckSum=" + l2); | |
if (l1 != l2) | |
{ | |
Log.w("TelephonyProvider", "Rebuilding Telephony.db"); | |
restoreDefaultAPN(); | |
setAPNConfigCheckSum(l2); | |
} | |
} | |
catch (FileNotFoundException localFileNotFoundException) | |
{ | |
while (true) | |
{ | |
SQLiteDatabase localSQLiteDatabase; | |
Log.e("TelephonyProvider", "FileNotFoundException: '" + localFile.getAbsolutePath() + "'", localFileNotFoundException); | |
break; | |
localSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN profile_type TEXT"); | |
Log.w("TelephonyProvider", "onCreate CARRIERS_TABLE : profile_type Column created..."); | |
continue; | |
localSQLException = localSQLException; | |
Log.w("TelephonyProvider", "onCreate CARRIERS_TABLE : profile_type Column ADD error occured ", localSQLException); | |
} | |
} | |
catch (IOException localIOException) | |
{ | |
Log.e("TelephonyProvider", "IOException: '" + localFile.getAbsolutePath() + "'", localIOException); | |
} | |
} | |
} | |
} | |
public Cursor query(Uri paramUri, String[] paramArrayOfString1, String paramString1, String[] paramArrayOfString2, String paramString2) | |
{ | |
SQLiteQueryBuilder localSQLiteQueryBuilder = new SQLiteQueryBuilder(); | |
localSQLiteQueryBuilder.setStrict(true); | |
localSQLiteQueryBuilder.setTables("carriers"); | |
int i = s_urlMatcher.match(paramUri); | |
Object localObject; | |
switch (i) | |
{ | |
case 4: | |
default: | |
localObject = null; | |
case 2: | |
case 9: | |
case 1: | |
case 7: | |
case 3: | |
case 5: | |
case 6: | |
case 10: | |
case 11: | |
case 8: | |
} | |
while (true) | |
{ | |
return localObject; | |
int n = ((Integer)simSlotMap.get(Integer.valueOf(i))).intValue(); | |
localSQLiteQueryBuilder.appendWhere("(sim_slot = " + n + " OR sim_slot = -1) AND "); | |
localSQLiteQueryBuilder.appendWhere(MultiSimManager.appendPropertySimSlot("current", n) + " IS NOT NULL"); | |
SQLiteDatabase localSQLiteDatabase; | |
while (paramArrayOfString1 != null) | |
{ | |
int k = paramArrayOfString1.length; | |
int m = 0; | |
while (true) | |
if (m < k) | |
{ | |
String str2 = paramArrayOfString1[m]; | |
if (("type".equals(str2)) || ("mmsc".equals(str2)) || ("mmsproxy".equals(str2)) || ("mmsport".equals(str2)) || ("apn".equals(str2))) | |
{ | |
m++; | |
continue; | |
localSQLiteQueryBuilder.appendWhere("_id = " + (String)paramUri.getPathSegments().get(1)); | |
break; | |
int j = ((Integer)simSlotMap.get(Integer.valueOf(i))).intValue(); | |
localSQLiteQueryBuilder.appendWhere("_id = " + getPreferredApnId(j)); | |
break; | |
String[] arrayOfString = new String[17]; | |
readFromXML(arrayOfString); | |
String str1 = "mnc=\"" + arrayOfString[10] + "\"" + " and " + "mcc" + "=\"" + arrayOfString[9] + "\"" + " and " + "name" + "=\"" + arrayOfString[1] + "\"" + " and " + "apn" + "=\"" + arrayOfString[2] + "\""; | |
return getContext().getContentResolver().query(Telephony.Carriers.CONTENT_URI, new String[] { "_id", "name", "apn", "proxy", "port", "user", "server", "password", "mmsc", "mcc", "mnc", "numeric", "mmsproxy", "mmsport", "authtype", "type", "protocol", "carrier_enabled", "roaming_protocol", "bearer", "current", "profile_type" }, str1, null, null); | |
} | |
checkPermission(); | |
} | |
localSQLiteDatabase = this.mOpenHelper.getReadableDatabase(); | |
} | |
try | |
{ | |
Cursor localCursor = localSQLiteQueryBuilder.query(localSQLiteDatabase, paramArrayOfString1, paramString1, paramArrayOfString2, null, null, paramString2); | |
localObject = localCursor; | |
if (localObject == null) | |
continue; | |
ContentResolver localContentResolver = getContext().getContentResolver(); | |
((Cursor)localObject).setNotificationUri(localContentResolver, paramUri); | |
return localObject; | |
checkPermission(); | |
} | |
catch (SQLException localSQLException) | |
{ | |
while (true) | |
{ | |
Log.e("TelephonyProvider", "got exception when querying: " + localSQLException); | |
localObject = null; | |
} | |
} | |
} | |
} | |
public int update(Uri paramUri, ContentValues paramContentValues, String paramString, String[] paramArrayOfString) | |
{ | |
checkPermission(); | |
SQLiteDatabase localSQLiteDatabase = this.mOpenHelper.getWritableDatabase(); | |
this.mChangesHelper.getWritableDatabase(); | |
int i = s_urlMatcher.match(paramUri); | |
int j; | |
switch (i) | |
{ | |
case 4: | |
case 9: | |
default: | |
throw new UnsupportedOperationException("Cannot update that URL: " + paramUri); | |
case 1: | |
case 7: | |
j = localSQLiteDatabase.update("carriers", paramContentValues, paramString, paramArrayOfString); | |
case 2: | |
case 3: | |
case 5: | |
case 6: | |
case 10: | |
case 11: | |
case 8: | |
} | |
while (true) | |
{ | |
if (j > 0) | |
{ | |
Log.d("TelephonyProvider", "APN updated !!"); | |
getContext().getContentResolver().notifyChange(Telephony.Carriers.CONTENT_URI, null); | |
} | |
return j; | |
j = localSQLiteDatabase.update("carriers", paramContentValues, paramString, paramArrayOfString); | |
continue; | |
if ((paramString != null) || (paramArrayOfString != null)) | |
throw new UnsupportedOperationException("Cannot update URL " + paramUri + " with a where clause"); | |
String[] arrayOfString2 = new String[1]; | |
arrayOfString2[0] = paramUri.getLastPathSegment(); | |
j = localSQLiteDatabase.update("carriers", paramContentValues, "_id=?", arrayOfString2); | |
continue; | |
int k = ((Integer)simSlotMap.get(Integer.valueOf(i))).intValue(); | |
j = 0; | |
if (paramContentValues != null) | |
{ | |
boolean bool = paramContentValues.containsKey(MultiSimManager.appendSimSlot("apn_id", k)); | |
j = 0; | |
if (bool) | |
{ | |
setPreferredApnId(paramContentValues.getAsLong(MultiSimManager.appendSimSlot("apn_id", k)), k); | |
if (i != 5) | |
{ | |
j = 0; | |
if (i != 10); | |
} | |
else | |
{ | |
j = 1; | |
continue; | |
Log.e("TelephonyProvider", "URL_TELEPHONY_DM_CHANGE: updated default apn!!"); | |
String[] arrayOfString1 = new String[17]; | |
readFromXML(arrayOfString1); | |
Cursor localCursor; | |
String str1; | |
if (paramContentValues == null) | |
{ | |
String str3 = "mnc=\"" + arrayOfString1[10] + "\"" + " and " + "mcc" + "=\"" + arrayOfString1[9] + "\"" + " and " + "type" + " like '%" + arrayOfString1[15] + "%'"; | |
localCursor = getContext().getContentResolver().query(Telephony.Carriers.CONTENT_URI, new String[] { "_id", "name", "apn", "proxy", "port", "user", "server", "password", "mmsc", "mcc", "mnc", "numeric", "mmsproxy", "mmsport", "authtype", "type", "protocol", "carrier_enabled", "roaming_protocol", "bearer", "current", "profile_type" }, str3, null, null); | |
ContentValues localContentValues = new ContentValues(); | |
localContentValues.put("mcc", arrayOfString1[9]); | |
localContentValues.put("mnc", arrayOfString1[10]); | |
localContentValues.put("type", arrayOfString1[15]); | |
localContentValues.put("apn", arrayOfString1[2]); | |
localContentValues.put("name", arrayOfString1[1]); | |
localContentValues.put("numeric", arrayOfString1[11]); | |
localContentValues.put("user", arrayOfString1[5]); | |
localContentValues.put("server", arrayOfString1[6]); | |
localContentValues.put("password", arrayOfString1[7]); | |
localContentValues.put("proxy", arrayOfString1[3]); | |
localContentValues.put("port", arrayOfString1[4]); | |
localContentValues.put("mmsproxy", arrayOfString1[12]); | |
localContentValues.put("mmsport", arrayOfString1[13]); | |
localContentValues.put("mmsc", arrayOfString1[8]); | |
localContentValues.put("authtype", Integer.valueOf(Integer.parseInt(arrayOfString1[14]))); | |
str1 = copyPrevValue(localContentValues, localCursor); | |
j = localSQLiteDatabase.update("carriers", localContentValues, "_id=?", new String[] { str1 }); | |
localContentValues.put("nwkname", "ATT"); | |
localContentValues.put("preferred", Boolean.valueOf(true)); | |
localContentValues.put("editable", Boolean.valueOf(false)); | |
localContentValues.remove("profile_type"); | |
localContentValues.remove("current"); | |
getContext().getContentResolver().update(Uri.parse("content://nwkinfo/nwkinfo/carriers"), localContentValues, str3, null); | |
} | |
while (true) | |
{ | |
Log.e("TelephonyProvider", "URL_TELEPHONY_DM_CHANGE: count " + j + " id:" + str1); | |
if (localCursor == null) | |
break label1187; | |
localCursor.close(); | |
break; | |
localCursor = query(paramUri, null, null, null, null); | |
str1 = copyPrevValue(paramContentValues, localCursor); | |
paramContentValues.put("type", arrayOfString1[15]); | |
j = localSQLiteDatabase.update("carriers", paramContentValues, "_id=?", new String[] { str1 }); | |
serializePersistentAPNs(paramContentValues); | |
paramContentValues.put("nwkname", "ATT"); | |
paramContentValues.put("preferred", Boolean.valueOf(true)); | |
paramContentValues.put("editable", Boolean.valueOf(false)); | |
paramContentValues.remove("profile_type"); | |
paramContentValues.remove("current"); | |
String str2 = "mnc=\"" + paramContentValues.getAsString("mnc") + "\"" + " and " + "mcc" + "=\"" + paramContentValues.getAsString("mcc") + "\"" + " and " + "type" + " like '%" + paramContentValues.getAsString("type") + "%'"; | |
getContext().getContentResolver().update(Uri.parse("content://nwkinfo/nwkinfo/carriers"), paramContentValues, str2, null); | |
} | |
label1187: Log.e("TelephonyProvider", "URL_TELEPHONY_DM_CHANGE: cursordb null "); | |
} | |
} | |
} | |
} | |
} | |
private static class ChangesHelper extends SQLiteOpenHelper | |
{ | |
Context mContext; | |
public ChangesHelper(Context paramContext) | |
{ | |
super("telephony_changes.db", null, TelephonyProvider.DatabaseHelper.access$100(paramContext)); | |
this.mContext = paramContext; | |
} | |
public void onCreate(SQLiteDatabase paramSQLiteDatabase) | |
{ | |
paramSQLiteDatabase.execSQL("CREATE TABLE changes(_id INTEGER PRIMARY KEY,name TEXT,numeric TEXT,mcc TEXT,mnc TEXT,apn TEXT,user TEXT,server TEXT,password TEXT,proxy TEXT,port TEXT,mmsproxy TEXT,mmsport TEXT,mmsc TEXT,authtype INTEGER,type TEXT,current INTEGER,current2 INTEGER,sim_slot INTEGER DEFAULT -1,protocol TEXT,profile_type TEXT,roaming_protocol TEXT,carrier_enabled BOOLEAN,bearer INTEGER,target_id INTEGER);"); | |
} | |
public void onUpgrade(SQLiteDatabase paramSQLiteDatabase, int paramInt1, int paramInt2) | |
{ | |
if (paramInt1 < 327686) | |
{ | |
paramSQLiteDatabase.execSQL("ALTER TABLE changes ADD COLUMN authtype INTEGER DEFAULT -1;"); | |
paramInt1 = 327686; | |
} | |
if (paramInt1 < 393222) | |
{ | |
paramSQLiteDatabase.execSQL("ALTER TABLE changes ADD COLUMN protocol TEXT DEFAULT IP;"); | |
paramSQLiteDatabase.execSQL("ALTER TABLE changes ADD COLUMN roaming_protocol TEXT DEFAULT IP;"); | |
paramInt1 = 393222; | |
} | |
if (paramInt1 < 458758) | |
{ | |
paramSQLiteDatabase.execSQL("ALTER TABLE changes ADD COLUMN carrier_enabled BOOLEAN DEFAULT 1;"); | |
paramSQLiteDatabase.execSQL("ALTER TABLE changes ADD COLUMN bearer INTEGER DEFAULT 0;"); | |
paramInt1 = 458758; | |
} | |
if (paramInt1 < 524294) | |
{ | |
if (!TelephonyProvider.findExistColumnInTable(paramSQLiteDatabase, "changes", "profile_type")) | |
break label83; | |
Log.w("TelephonyProvider", "onUpgrade CHANGES_TABLE : profile_type Column Exist"); | |
} | |
while (true) | |
{ | |
return; | |
label83: paramSQLiteDatabase.execSQL("ALTER TABLE changes ADD COLUMN profile_type TEXT"); | |
Log.w("TelephonyProvider", "onUpgrade CHANGES_TABLE : profile_type Column created..."); | |
} | |
} | |
} | |
private static class DatabaseHelper extends SQLiteOpenHelper | |
{ | |
private Context mContext; | |
public DatabaseHelper(Context paramContext) | |
{ | |
super("telephony.db", null, getVersion(paramContext)); | |
this.mContext = paramContext; | |
} | |
private String buildWhereClause(XmlPullParser paramXmlPullParser) | |
{ | |
String str1 = paramXmlPullParser.getAttributeValue(null, "mcc"); | |
String str2 = null; | |
if (str1 != null) | |
str2 = "mcc=\"" + str1 + "\""; | |
String str3 = paramXmlPullParser.getAttributeValue(null, "mnc"); | |
String str4; | |
label133: String str5; | |
if (str3 != null) | |
{ | |
if (str2 == null) | |
str2 = "mnc=\"" + str3 + "\""; | |
} | |
else | |
{ | |
str4 = paramXmlPullParser.getAttributeValue(null, "numeric"); | |
if (str4 != null) | |
{ | |
if (str2 != null) | |
break label270; | |
str2 = "numeric=\"" + str4 + "\""; | |
} | |
str5 = paramXmlPullParser.getAttributeValue(null, "type"); | |
if (str5 != null) | |
if (str2 != null) | |
break label313; | |
} | |
String str6; | |
label270: label313: for (str2 = "type like '%" + str5 + "%'"; ; str2 = str2 + " and " + "type" + " like '%" + str5 + "%'") | |
{ | |
str6 = paramXmlPullParser.getAttributeValue(null, "bearer"); | |
if (str6 != null) | |
{ | |
if (str2 != null) | |
break label356; | |
str2 = "bearer IN (0," + str6 + ")"; | |
} | |
return str2; | |
str2 = str2 + " and " + "mnc" + "=\"" + str3 + "\""; | |
break; | |
str2 = str2 + " and " + "numeric" + "=\"" + str4 + "\""; | |
break label133; | |
} | |
label356: return str2 + " and " + "bearer" + " IN (0," + str6 + ")"; | |
} | |
private ContentValues getRow(XmlPullParser paramXmlPullParser) | |
{ | |
ContentValues localContentValues = new ContentValues(); | |
String str1 = paramXmlPullParser.getName(); | |
if ("apn".equals(str1)) | |
localContentValues.put("profile_type", "apn"); | |
while (true) | |
{ | |
String str2 = paramXmlPullParser.getAttributeValue(null, "mcc"); | |
String str3 = paramXmlPullParser.getAttributeValue(null, "mnc"); | |
localContentValues.put("numeric", str2 + str3); | |
localContentValues.put("mcc", str2); | |
localContentValues.put("mnc", str3); | |
localContentValues.put("name", paramXmlPullParser.getAttributeValue(null, "carrier")); | |
localContentValues.put("apn", paramXmlPullParser.getAttributeValue(null, "apn")); | |
localContentValues.put("user", paramXmlPullParser.getAttributeValue(null, "user")); | |
localContentValues.put("server", paramXmlPullParser.getAttributeValue(null, "server")); | |
localContentValues.put("password", paramXmlPullParser.getAttributeValue(null, "password")); | |
String str4 = paramXmlPullParser.getAttributeValue(null, "proxy"); | |
if (str4 != null) | |
localContentValues.put("proxy", str4); | |
String str5 = paramXmlPullParser.getAttributeValue(null, "port"); | |
if (str5 != null) | |
localContentValues.put("port", str5); | |
String str6 = paramXmlPullParser.getAttributeValue(null, "mmsproxy"); | |
if (str6 != null) | |
localContentValues.put("mmsproxy", str6); | |
String str7 = paramXmlPullParser.getAttributeValue(null, "mmsport"); | |
if (str7 != null) | |
localContentValues.put("mmsport", str7); | |
localContentValues.put("mmsc", paramXmlPullParser.getAttributeValue(null, "mmsc")); | |
String str8 = paramXmlPullParser.getAttributeValue(null, "type"); | |
if (str8 != null) | |
localContentValues.put("type", str8); | |
String str9 = paramXmlPullParser.getAttributeValue(null, "authtype"); | |
if (str9 != null) | |
localContentValues.put("authtype", Integer.valueOf(Integer.parseInt(str9))); | |
String str10 = paramXmlPullParser.getAttributeValue(null, "protocol"); | |
if (str10 != null) | |
localContentValues.put("protocol", str10); | |
String str11 = paramXmlPullParser.getAttributeValue(null, "roaming_protocol"); | |
if (str11 != null) | |
localContentValues.put("roaming_protocol", str11); | |
String str12 = paramXmlPullParser.getAttributeValue(null, "carrier_enabled"); | |
if (str12 != null) | |
localContentValues.put("carrier_enabled", Boolean.valueOf(Boolean.parseBoolean(str12))); | |
String str13 = paramXmlPullParser.getAttributeValue(null, "bearer"); | |
if (str13 != null) | |
localContentValues.put("bearer", Integer.valueOf(Integer.parseInt(str13))); | |
String str14 = paramXmlPullParser.getAttributeValue(null, "mvno_type"); | |
if (str14 != null) | |
{ | |
String str18 = paramXmlPullParser.getAttributeValue(null, "mvno_match_data"); | |
if (str18 != null) | |
{ | |
localContentValues.put("mvno_type", str14); | |
localContentValues.put("mvno_match_data", str18); | |
} | |
} | |
String str15 = paramXmlPullParser.getAttributeValue(null, "max_conn"); | |
if (str15 != null) | |
localContentValues.put("max_conn", Integer.valueOf(Integer.parseInt(str15))); | |
String str16 = paramXmlPullParser.getAttributeValue(null, "max_conn_t"); | |
if (str16 != null) | |
localContentValues.put("max_conn_t", Integer.valueOf(Integer.parseInt(str16))); | |
String str17 = paramXmlPullParser.getAttributeValue(null, "wait_time"); | |
if (str17 != null) | |
localContentValues.put("wait_time", Integer.valueOf(Integer.parseInt(str17))); | |
return localContentValues; | |
if (!"nai".equals(str1)) | |
break; | |
localContentValues.put("profile_type", "nai"); | |
} | |
return null; | |
} | |
private static int getVersion(Context paramContext) | |
{ | |
int i = 589824; | |
XmlResourceParser localXmlResourceParser = paramContext.getResources().getXml(17760256); | |
try | |
{ | |
XmlUtils.beginDocument(localXmlResourceParser, "apns"); | |
int j = Integer.parseInt(localXmlResourceParser.getAttributeValue(null, "version")); | |
i |= j; | |
return i; | |
} | |
catch (Exception localException) | |
{ | |
while (true) | |
Log.e("TelephonyProvider", "Can't get version of APN database", localException); | |
} | |
finally | |
{ | |
localXmlResourceParser.close(); | |
} | |
} | |
// ERROR // | |
private void initDatabase(SQLiteDatabase paramSQLiteDatabase) | |
{ | |
// Byte code: | |
// 0: aload_0 | |
// 1: getfield 19 com/android/providers/telephony/TelephonyProvider$DatabaseHelper:mContext Landroid/content/Context; | |
// 4: invokevirtual 181 android/content/Context:getResources ()Landroid/content/res/Resources; | |
// 7: ldc 182 | |
// 9: invokevirtual 188 android/content/res/Resources:getXml (I)Landroid/content/res/XmlResourceParser; | |
// 12: astore_2 | |
// 13: iconst_m1 | |
// 14: istore_3 | |
// 15: aload_2 | |
// 16: ldc 190 | |
// 18: invokestatic 196 com/android/internal/util/XmlUtils:beginDocument (Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)V | |
// 21: aload_2 | |
// 22: aconst_null | |
// 23: ldc 198 | |
// 25: invokeinterface 201 3 0 | |
// 30: invokestatic 135 java/lang/Integer:parseInt (Ljava/lang/String;)I | |
// 33: istore_3 | |
// 34: aload_0 | |
// 35: aload_1 | |
// 36: aload_2 | |
// 37: invokespecial 222 com/android/providers/telephony/TelephonyProvider$DatabaseHelper:loadApns (Landroid/database/sqlite/SQLiteDatabase;Lorg/xmlpull/v1/XmlPullParser;)V | |
// 40: aload_2 | |
// 41: invokeinterface 204 1 0 | |
// 46: new 224 java/io/File | |
// 49: dup | |
// 50: invokestatic 230 android/os/Environment:getRootDirectory ()Ljava/io/File; | |
// 53: ldc 232 | |
// 55: invokespecial 235 java/io/File:<init> (Ljava/io/File;Ljava/lang/String;)V | |
// 58: astore 7 | |
// 60: aconst_null | |
// 61: astore 8 | |
// 63: new 237 java/io/FileReader | |
// 66: dup | |
// 67: aload 7 | |
// 69: invokespecial 240 java/io/FileReader:<init> (Ljava/io/File;)V | |
// 72: astore 9 | |
// 74: invokestatic 246 android/util/Xml:newPullParser ()Lorg/xmlpull/v1/XmlPullParser; | |
// 77: astore 17 | |
// 79: aload 17 | |
// 81: aload 9 | |
// 83: invokeinterface 250 2 0 | |
// 88: aload 17 | |
// 90: ldc 190 | |
// 92: invokestatic 196 com/android/internal/util/XmlUtils:beginDocument (Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)V | |
// 95: iload_3 | |
// 96: aload 17 | |
// 98: aconst_null | |
// 99: ldc 198 | |
// 101: invokeinterface 40 3 0 | |
// 106: invokestatic 135 java/lang/Integer:parseInt (Ljava/lang/String;)I | |
// 109: if_icmpeq +78 -> 187 | |
// 112: new 252 java/lang/IllegalStateException | |
// 115: dup | |
// 116: new 42 java/lang/StringBuilder | |
// 119: dup | |
// 120: invokespecial 45 java/lang/StringBuilder:<init> ()V | |
// 123: ldc 254 | |
// 125: invokevirtual 51 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 128: aload 7 | |
// 130: invokevirtual 257 java/io/File:getAbsolutePath ()Ljava/lang/String; | |
// 133: invokevirtual 51 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 136: invokevirtual 57 java/lang/StringBuilder:toString ()Ljava/lang/String; | |
// 139: invokespecial 260 java/lang/IllegalStateException:<init> (Ljava/lang/String;)V | |
// 142: athrow | |
// 143: astore 15 | |
// 145: aload 9 | |
// 147: astore 16 | |
// 149: aload 16 | |
// 151: ifnull +8 -> 159 | |
// 154: aload 16 | |
// 156: invokevirtual 261 java/io/FileReader:close ()V | |
// 159: return | |
// 160: astore 5 | |
// 162: ldc 206 | |
// 164: ldc_w 263 | |
// 167: aload 5 | |
// 169: invokestatic 214 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 172: pop | |
// 173: goto -133 -> 40 | |
// 176: astore 4 | |
// 178: aload_2 | |
// 179: invokeinterface 204 1 0 | |
// 184: aload 4 | |
// 186: athrow | |
// 187: aload_0 | |
// 188: aload_1 | |
// 189: aload 17 | |
// 191: invokespecial 222 com/android/providers/telephony/TelephonyProvider$DatabaseHelper:loadApns (Landroid/database/sqlite/SQLiteDatabase;Lorg/xmlpull/v1/XmlPullParser;)V | |
// 194: aload 9 | |
// 196: ifnull +8 -> 204 | |
// 199: aload 9 | |
// 201: invokevirtual 261 java/io/FileReader:close ()V | |
// 204: return | |
// 205: astore 10 | |
// 207: ldc 206 | |
// 209: new 42 java/lang/StringBuilder | |
// 212: dup | |
// 213: invokespecial 45 java/lang/StringBuilder:<init> ()V | |
// 216: ldc_w 265 | |
// 219: invokevirtual 51 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 222: aload 7 | |
// 224: invokevirtual 257 java/io/File:getAbsolutePath ()Ljava/lang/String; | |
// 227: invokevirtual 51 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 230: ldc_w 267 | |
// 233: invokevirtual 51 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 236: invokevirtual 57 java/lang/StringBuilder:toString ()Ljava/lang/String; | |
// 239: aload 10 | |
// 241: invokestatic 214 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 244: pop | |
// 245: aload 8 | |
// 247: ifnull -88 -> 159 | |
// 250: aload 8 | |
// 252: invokevirtual 261 java/io/FileReader:close ()V | |
// 255: return | |
// 256: astore 14 | |
// 258: return | |
// 259: astore 11 | |
// 261: aload 8 | |
// 263: ifnull +8 -> 271 | |
// 266: aload 8 | |
// 268: invokevirtual 261 java/io/FileReader:close ()V | |
// 271: aload 11 | |
// 273: athrow | |
// 274: astore 12 | |
// 276: goto -5 -> 271 | |
// 279: astore 18 | |
// 281: goto -77 -> 204 | |
// 284: astore 11 | |
// 286: aload 9 | |
// 288: astore 8 | |
// 290: goto -29 -> 261 | |
// 293: astore 10 | |
// 295: aload 9 | |
// 297: astore 8 | |
// 299: goto -92 -> 207 | |
// 302: astore 19 | |
// 304: aconst_null | |
// 305: astore 16 | |
// 307: goto -158 -> 149 | |
// | |
// Exception table: | |
// from to target type | |
// 74 143 143 java/io/FileNotFoundException | |
// 187 194 143 java/io/FileNotFoundException | |
// 15 40 160 java/lang/Exception | |
// 15 40 176 finally | |
// 162 173 176 finally | |
// 63 74 205 java/lang/Exception | |
// 154 159 256 java/io/IOException | |
// 250 255 256 java/io/IOException | |
// 63 74 259 finally | |
// 207 245 259 finally | |
// 266 271 274 java/io/IOException | |
// 199 204 279 java/io/IOException | |
// 74 143 284 finally | |
// 187 194 284 finally | |
// 74 143 293 java/lang/Exception | |
// 187 194 293 java/lang/Exception | |
// 63 74 302 java/io/FileNotFoundException | |
} | |
private void insertAddingDefaults(SQLiteDatabase paramSQLiteDatabase, String paramString, ContentValues paramContentValues) | |
{ | |
if (!paramContentValues.containsKey("authtype")) | |
paramContentValues.put("authtype", Integer.valueOf(-1)); | |
if (!paramContentValues.containsKey("protocol")) | |
{ | |
if (((SystemProperties.get("ro.product.name").contains("t0lte")) || (SystemProperties.get("ro.product.name").contains("meliuslte"))) && ("ATT".equals(""))) | |
{ | |
paramContentValues.put("protocol", "IPV4V6"); | |
Log.i("TelephonyProvider", "ATT has specific requirement to show v4v6 for IPVersion"); | |
} | |
} | |
else if (!paramContentValues.containsKey("roaming_protocol")) | |
{ | |
if (((!SystemProperties.get("ro.product.name").contains("t0lte")) && (!SystemProperties.get("ro.product.name").contains("meliuslte"))) || (!"ATT".equals(""))) | |
break label360; | |
paramContentValues.put("roaming_protocol", "IPV4V6"); | |
Log.i("TelephonyProvider", "ATT has specific requirement to show v4v6 for Roaming_Protocol IPVersion"); | |
} | |
while (true) | |
{ | |
if (!paramContentValues.containsKey("carrier_enabled")) | |
paramContentValues.put("carrier_enabled", Boolean.valueOf(true)); | |
if (!paramContentValues.containsKey("bearer")) | |
paramContentValues.put("bearer", Integer.valueOf(0)); | |
if (!paramContentValues.containsKey("mvno_type")) | |
paramContentValues.put("mvno_type", ""); | |
if (!paramContentValues.containsKey("mvno_match_data")) | |
paramContentValues.put("mvno_match_data", ""); | |
if (("VZW".equals("")) && (paramContentValues.containsKey("type")) && ("default,dun,supl".equals(paramContentValues.getAsString("type")))) | |
paramContentValues.put("type", "default,dun"); | |
if (!paramContentValues.containsKey("max_conn")) | |
paramContentValues.put("max_conn", Integer.valueOf(1023)); | |
if (!paramContentValues.containsKey("max_conn_t")) | |
paramContentValues.put("max_conn_t", Integer.valueOf(300)); | |
if (!paramContentValues.containsKey("wait_time")) | |
paramContentValues.put("wait_time", Integer.valueOf(0)); | |
paramSQLiteDatabase.insert("carriers", null, paramContentValues); | |
return; | |
paramContentValues.put("protocol", "IP"); | |
break; | |
label360: paramContentValues.put("roaming_protocol", "IP"); | |
} | |
} | |
// ERROR // | |
private void loadApns(SQLiteDatabase paramSQLiteDatabase, XmlPullParser paramXmlPullParser) | |
{ | |
// Byte code: | |
// 0: aload_2 | |
// 1: ifnull +63 -> 64 | |
// 4: aload_1 | |
// 5: invokevirtual 328 android/database/sqlite/SQLiteDatabase:beginTransaction ()V | |
// 8: aload_2 | |
// 9: invokestatic 332 com/android/internal/util/XmlUtils:nextElement (Lorg/xmlpull/v1/XmlPullParser;)V | |
// 12: aload_2 | |
// 13: invokeinterface 336 1 0 | |
// 18: iconst_1 | |
// 19: if_icmpeq +88 -> 107 | |
// 22: aload_0 | |
// 23: aload_2 | |
// 24: invokespecial 338 com/android/providers/telephony/TelephonyProvider$DatabaseHelper:getRow (Lorg/xmlpull/v1/XmlPullParser;)Landroid/content/ContentValues; | |
// 27: astore 10 | |
// 29: aload 10 | |
// 31: ifnonnull +34 -> 65 | |
// 34: new 323 org/xmlpull/v1/XmlPullParserException | |
// 37: dup | |
// 38: ldc_w 340 | |
// 41: aload_2 | |
// 42: aconst_null | |
// 43: invokespecial 343 org/xmlpull/v1/XmlPullParserException:<init> (Ljava/lang/String;Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/Throwable;)V | |
// 46: athrow | |
// 47: astore 8 | |
// 49: ldc 206 | |
// 51: ldc_w 345 | |
// 54: aload 8 | |
// 56: invokestatic 214 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 59: pop | |
// 60: aload_1 | |
// 61: invokevirtual 348 android/database/sqlite/SQLiteDatabase:endTransaction ()V | |
// 64: return | |
// 65: aload_0 | |
// 66: aload_1 | |
// 67: ldc_w 313 | |
// 70: aload 10 | |
// 72: invokespecial 350 com/android/providers/telephony/TelephonyProvider$DatabaseHelper:insertAddingDefaults (Landroid/database/sqlite/SQLiteDatabase;Ljava/lang/String;Landroid/content/ContentValues;)V | |
// 75: aload_2 | |
// 76: invokestatic 332 com/android/internal/util/XmlUtils:nextElement (Lorg/xmlpull/v1/XmlPullParser;)V | |
// 79: goto -67 -> 12 | |
// 82: astore 6 | |
// 84: ldc 206 | |
// 86: ldc_w 352 | |
// 89: aload 6 | |
// 91: invokestatic 214 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 94: pop | |
// 95: goto -35 -> 60 | |
// 98: astore 5 | |
// 100: aload_1 | |
// 101: invokevirtual 348 android/database/sqlite/SQLiteDatabase:endTransaction ()V | |
// 104: aload 5 | |
// 106: athrow | |
// 107: aload_1 | |
// 108: invokevirtual 355 android/database/sqlite/SQLiteDatabase:setTransactionSuccessful ()V | |
// 111: goto -51 -> 60 | |
// 114: astore_3 | |
// 115: ldc 206 | |
// 117: ldc_w 357 | |
// 120: aload_3 | |
// 121: invokestatic 214 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 124: pop | |
// 125: goto -65 -> 60 | |
// | |
// Exception table: | |
// from to target type | |
// 4 12 47 org/xmlpull/v1/XmlPullParserException | |
// 12 29 47 org/xmlpull/v1/XmlPullParserException | |
// 34 47 47 org/xmlpull/v1/XmlPullParserException | |
// 65 79 47 org/xmlpull/v1/XmlPullParserException | |
// 107 111 47 org/xmlpull/v1/XmlPullParserException | |
// 4 12 82 java/io/IOException | |
// 12 29 82 java/io/IOException | |
// 34 47 82 java/io/IOException | |
// 65 79 82 java/io/IOException | |
// 107 111 82 java/io/IOException | |
// 4 12 98 finally | |
// 12 29 98 finally | |
// 34 47 98 finally | |
// 49 60 98 finally | |
// 65 79 98 finally | |
// 84 95 98 finally | |
// 107 111 98 finally | |
// 115 125 98 finally | |
// 4 12 114 android/database/SQLException | |
// 12 29 114 android/database/SQLException | |
// 34 47 114 android/database/SQLException | |
// 65 79 114 android/database/SQLException | |
// 107 111 114 android/database/SQLException | |
} | |
// ERROR // | |
private void loadPersistentApnData(SQLiteDatabase paramSQLiteDatabase) | |
{ | |
// Byte code: | |
// 0: new 224 java/io/File | |
// 3: dup | |
// 4: ldc_w 359 | |
// 7: invokespecial 360 java/io/File:<init> (Ljava/lang/String;)V | |
// 10: astore_2 | |
// 11: aload_2 | |
// 12: invokevirtual 364 java/io/File:exists ()Z | |
// 15: ifeq +67 -> 82 | |
// 18: aload_2 | |
// 19: invokevirtual 368 java/io/File:length ()J | |
// 22: lconst_0 | |
// 23: lcmp | |
// 24: ifeq +58 -> 82 | |
// 27: aconst_null | |
// 28: astore_3 | |
// 29: new 237 java/io/FileReader | |
// 32: dup | |
// 33: aload_2 | |
// 34: invokespecial 240 java/io/FileReader:<init> (Ljava/io/File;)V | |
// 37: astore 4 | |
// 39: invokestatic 246 android/util/Xml:newPullParser ()Lorg/xmlpull/v1/XmlPullParser; | |
// 42: astore 10 | |
// 44: aload 10 | |
// 46: aload 4 | |
// 48: invokeinterface 250 2 0 | |
// 53: aload 10 | |
// 55: ldc 190 | |
// 57: invokestatic 196 com/android/internal/util/XmlUtils:beginDocument (Lorg/xmlpull/v1/XmlPullParser;Ljava/lang/String;)V | |
// 60: aload 10 | |
// 62: ifnull +10 -> 72 | |
// 65: aload_0 | |
// 66: aload_1 | |
// 67: aload 10 | |
// 69: invokespecial 371 com/android/providers/telephony/TelephonyProvider$DatabaseHelper:updateApns (Landroid/database/sqlite/SQLiteDatabase;Lorg/xmlpull/v1/XmlPullParser;)V | |
// 72: aload 4 | |
// 74: ifnull +8 -> 82 | |
// 77: aload 4 | |
// 79: invokevirtual 261 java/io/FileReader:close ()V | |
// 82: return | |
// 83: astore 5 | |
// 85: ldc 206 | |
// 87: new 42 java/lang/StringBuilder | |
// 90: dup | |
// 91: invokespecial 45 java/lang/StringBuilder:<init> ()V | |
// 94: ldc_w 265 | |
// 97: invokevirtual 51 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 100: aload_2 | |
// 101: invokevirtual 257 java/io/File:getAbsolutePath ()Ljava/lang/String; | |
// 104: invokevirtual 51 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 107: ldc_w 267 | |
// 110: invokevirtual 51 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
// 113: invokevirtual 57 java/lang/StringBuilder:toString ()Ljava/lang/String; | |
// 116: aload 5 | |
// 118: invokestatic 214 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 121: pop | |
// 122: aload_3 | |
// 123: ifnull -41 -> 82 | |
// 126: aload_3 | |
// 127: invokevirtual 261 java/io/FileReader:close ()V | |
// 130: return | |
// 131: astore 9 | |
// 133: return | |
// 134: astore 6 | |
// 136: aload_3 | |
// 137: ifnull +7 -> 144 | |
// 140: aload_3 | |
// 141: invokevirtual 261 java/io/FileReader:close ()V | |
// 144: aload 6 | |
// 146: athrow | |
// 147: astore 7 | |
// 149: goto -5 -> 144 | |
// 152: astore 6 | |
// 154: aload 4 | |
// 156: astore_3 | |
// 157: goto -21 -> 136 | |
// 160: astore 5 | |
// 162: aload 4 | |
// 164: astore_3 | |
// 165: goto -80 -> 85 | |
// | |
// Exception table: | |
// from to target type | |
// 29 39 83 java/lang/Exception | |
// 77 82 131 java/io/IOException | |
// 126 130 131 java/io/IOException | |
// 29 39 134 finally | |
// 85 122 134 finally | |
// 140 144 147 java/io/IOException | |
// 39 60 152 finally | |
// 65 72 152 finally | |
// 39 60 160 java/lang/Exception | |
// 65 72 160 java/lang/Exception | |
} | |
private void updateAPNChange(SQLiteDatabase paramSQLiteDatabase, XmlPullParser paramXmlPullParser) | |
{ | |
String str1 = buildWhereClause(paramXmlPullParser); | |
if (str1 == null) | |
return; | |
ContentValues localContentValues = new ContentValues(); | |
String str2 = paramXmlPullParser.getAttributeValue(null, "max_conn"); | |
if (str2 != null) | |
localContentValues.put("max_conn", str2); | |
String str3 = paramXmlPullParser.getAttributeValue(null, "max_conn_t"); | |
if (str3 != null) | |
localContentValues.put("max_conn_t", str3); | |
String str4 = paramXmlPullParser.getAttributeValue(null, "wait_time"); | |
if (str4 != null) | |
localContentValues.put("wait_time", str4); | |
String str5 = paramXmlPullParser.getAttributeValue(null, "type"); | |
if (str5 != null) | |
localContentValues.put("type", str5); | |
String str6 = paramXmlPullParser.getAttributeValue(null, "carrier_enabled"); | |
if (str6 != null) | |
localContentValues.put("carrier_enabled", Boolean.valueOf(Boolean.parseBoolean(str6))); | |
String str7 = paramXmlPullParser.getAttributeValue(null, "carrier"); | |
if ((str7 != null) && (!str7.contains("EHRPD")) && (!str7.contains("LTE"))) | |
localContentValues.put("name", paramXmlPullParser.getAttributeValue(null, "carrier")); | |
if (paramXmlPullParser.getAttributeValue(null, "apn") != null) | |
localContentValues.put("apn", paramXmlPullParser.getAttributeValue(null, "apn")); | |
if (paramXmlPullParser.getAttributeValue(null, "user") != null) | |
localContentValues.put("user", paramXmlPullParser.getAttributeValue(null, "user")); | |
if (paramXmlPullParser.getAttributeValue(null, "server") != null) | |
localContentValues.put("server", paramXmlPullParser.getAttributeValue(null, "server")); | |
if (paramXmlPullParser.getAttributeValue(null, "password") != null) | |
localContentValues.put("password", paramXmlPullParser.getAttributeValue(null, "password")); | |
String str8 = paramXmlPullParser.getAttributeValue(null, "proxy"); | |
if (str8 != null) | |
localContentValues.put("proxy", str8); | |
String str9 = paramXmlPullParser.getAttributeValue(null, "port"); | |
if (str9 != null) | |
localContentValues.put("port", str9); | |
String str10 = paramXmlPullParser.getAttributeValue(null, "mmsproxy"); | |
if (str10 != null) | |
localContentValues.put("mmsproxy", str10); | |
String str11 = paramXmlPullParser.getAttributeValue(null, "mmsport"); | |
if (str11 != null) | |
localContentValues.put("mmsport", str11); | |
String str12 = paramXmlPullParser.getAttributeValue(null, "mmsc"); | |
if (str12 != null) | |
localContentValues.put("mmsc", str12); | |
String str13 = paramXmlPullParser.getAttributeValue(null, "authtype"); | |
if (str13 != null) | |
localContentValues.put("authtype", Integer.valueOf(Integer.parseInt(str13))); | |
String str14 = paramXmlPullParser.getAttributeValue(null, "protocol"); | |
if (str14 != null) | |
localContentValues.put("protocol", str14); | |
String str15 = paramXmlPullParser.getAttributeValue(null, "roaming_protocol"); | |
if (str15 != null) | |
localContentValues.put("roaming_protocol", str15); | |
int i = paramSQLiteDatabase.update("carriers", localContentValues, str1, null); | |
Log.i("TelephonyProvider", "updateAPNChange... count = " + i); | |
} | |
// ERROR // | |
private void updateApns(SQLiteDatabase paramSQLiteDatabase, XmlPullParser paramXmlPullParser) | |
{ | |
// Byte code: | |
// 0: aload_1 | |
// 1: invokevirtual 328 android/database/sqlite/SQLiteDatabase:beginTransaction ()V | |
// 4: aload_2 | |
// 5: invokestatic 332 com/android/internal/util/XmlUtils:nextElement (Lorg/xmlpull/v1/XmlPullParser;)V | |
// 8: aload_2 | |
// 9: invokeinterface 336 1 0 | |
// 14: iconst_1 | |
// 15: if_icmpeq +48 -> 63 | |
// 18: ldc 95 | |
// 20: aload_2 | |
// 21: invokeinterface 93 1 0 | |
// 26: invokevirtual 101 java/lang/String:equals (Ljava/lang/Object;)Z | |
// 29: ifeq +34 -> 63 | |
// 32: aload_0 | |
// 33: aload_1 | |
// 34: aload_2 | |
// 35: invokespecial 389 com/android/providers/telephony/TelephonyProvider$DatabaseHelper:updateAPNChange (Landroid/database/sqlite/SQLiteDatabase;Lorg/xmlpull/v1/XmlPullParser;)V | |
// 38: aload_2 | |
// 39: invokestatic 332 com/android/internal/util/XmlUtils:nextElement (Lorg/xmlpull/v1/XmlPullParser;)V | |
// 42: goto -34 -> 8 | |
// 45: astore 8 | |
// 47: ldc 206 | |
// 49: ldc_w 391 | |
// 52: aload 8 | |
// 54: invokestatic 214 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 57: pop | |
// 58: aload_1 | |
// 59: invokevirtual 348 android/database/sqlite/SQLiteDatabase:endTransaction ()V | |
// 62: return | |
// 63: aload_1 | |
// 64: invokevirtual 355 android/database/sqlite/SQLiteDatabase:setTransactionSuccessful ()V | |
// 67: goto -9 -> 58 | |
// 70: astore 6 | |
// 72: ldc 206 | |
// 74: ldc_w 393 | |
// 77: aload 6 | |
// 79: invokestatic 214 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 82: pop | |
// 83: goto -25 -> 58 | |
// 86: astore 5 | |
// 88: aload_1 | |
// 89: invokevirtual 348 android/database/sqlite/SQLiteDatabase:endTransaction ()V | |
// 92: aload 5 | |
// 94: athrow | |
// 95: astore_3 | |
// 96: ldc 206 | |
// 98: ldc_w 395 | |
// 101: aload_3 | |
// 102: invokestatic 214 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I | |
// 105: pop | |
// 106: goto -48 -> 58 | |
// | |
// Exception table: | |
// from to target type | |
// 0 8 45 org/xmlpull/v1/XmlPullParserException | |
// 8 42 45 org/xmlpull/v1/XmlPullParserException | |
// 63 67 45 org/xmlpull/v1/XmlPullParserException | |
// 0 8 70 java/io/IOException | |
// 8 42 70 java/io/IOException | |
// 63 67 70 java/io/IOException | |
// 0 8 86 finally | |
// 8 42 86 finally | |
// 47 58 86 finally | |
// 63 67 86 finally | |
// 72 83 86 finally | |
// 96 106 86 finally | |
// 0 8 95 android/database/SQLException | |
// 8 42 95 android/database/SQLException | |
// 63 67 95 android/database/SQLException | |
} | |
public void onCreate(SQLiteDatabase paramSQLiteDatabase) | |
{ | |
paramSQLiteDatabase.execSQL("CREATE TABLE carriers(_id INTEGER PRIMARY KEY,name TEXT,numeric TEXT,mcc TEXT,mnc TEXT,apn TEXT,user TEXT,server TEXT,password TEXT,proxy TEXT,port TEXT,mmsproxy TEXT,mmsport TEXT,mmsc TEXT,authtype INTEGER,type TEXT,current INTEGER,current2 INTEGER,sim_slot INTEGER DEFAULT -1,protocol TEXT,profile_type TEXT,roaming_protocol TEXT,carrier_enabled BOOLEAN,bearer INTEGER,mvno_type TEXT,mvno_match_data TEXT,max_conn INTEGER,max_conn_t INTEGER,wait_time INTEGER);"); | |
initDatabase(paramSQLiteDatabase); | |
loadPersistentApnData(paramSQLiteDatabase); | |
} | |
public void onUpgrade(SQLiteDatabase paramSQLiteDatabase, int paramInt1, int paramInt2) | |
{ | |
if (paramInt1 < 327686) | |
{ | |
paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN authtype INTEGER DEFAULT -1;"); | |
paramInt1 = 327686; | |
} | |
if (paramInt1 < 393222) | |
{ | |
paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN protocol TEXT DEFAULT IP;"); | |
paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN roaming_protocol TEXT DEFAULT IP;"); | |
paramInt1 = 393222; | |
} | |
if (paramInt1 < 458758) | |
{ | |
paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN carrier_enabled BOOLEAN DEFAULT 1;"); | |
paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN bearer INTEGER DEFAULT 0;"); | |
paramInt1 = 458758; | |
} | |
if (paramInt1 < 524294) | |
{ | |
if (TelephonyProvider.findExistColumnInTable(paramSQLiteDatabase, "carriers", "profile_type")) | |
{ | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : profile_type Column Exist"); | |
paramInt1 = 524294; | |
} | |
} | |
else if (paramInt1 < 589832) | |
{ | |
if (!TelephonyProvider.findExistColumnInTable(paramSQLiteDatabase, "carriers", "profile_type")) | |
break label275; | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : profile_type Column Exist"); | |
label128: if (!TelephonyProvider.findExistColumnInTable(paramSQLiteDatabase, "carriers", "mvno_type")) | |
break label294; | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : mvno_type Column Exist"); | |
label149: if (!TelephonyProvider.findExistColumnInTable(paramSQLiteDatabase, "carriers", "mvno_match_data")) | |
break label304; | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : mvno_match_data Column Exist"); | |
label170: if (!TelephonyProvider.findExistColumnInTable(paramSQLiteDatabase, "carriers", "max_conn")) | |
break label314; | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : max_conn Column Exist"); | |
label191: if (!TelephonyProvider.findExistColumnInTable(paramSQLiteDatabase, "carriers", "max_conn_t")) | |
break label324; | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : max_conn_t Column Exist"); | |
label212: if (!TelephonyProvider.findExistColumnInTable(paramSQLiteDatabase, "carriers", "wait_time")) | |
break label334; | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : wait_time Column Exist"); | |
label233: if (!TelephonyProvider.findExistColumnInTable(paramSQLiteDatabase, "carriers", "sim_slot")) | |
break label344; | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : sim_slot Column Exist"); | |
} | |
while (true) | |
{ | |
return; | |
paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN profile_type TEXT"); | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : profile_type Column created..."); | |
break; | |
label275: paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN profile_type TEXT"); | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : profile_type Column created..."); | |
break label128; | |
label294: paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN mvno_type TEXT DEFAULT '';"); | |
break label149; | |
label304: paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN mvno_match_data TEXT DEFAULT '';"); | |
break label170; | |
label314: paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN max_conn INTEGER DEFAULT 1023;"); | |
break label191; | |
label324: paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN max_conn_t INTEGER DEFAULT 300;"); | |
break label212; | |
label334: paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN wait_time INTEGER DEFAULT 0;"); | |
break label233; | |
label344: paramSQLiteDatabase.execSQL("ALTER TABLE carriers ADD COLUMN sim_slot INTEGER DEFAULT -1;"); | |
Log.w("TelephonyProvider", "onUpgrade CARRIERS_TABLE : sim_slot Column created..."); | |
} | |
} | |
} | |
} | |
/* Location: /home/albinoman887/dex2jar/output.jar | |
* Qualified Name: com.android.providers.telephony.TelephonyProvider | |
* JD-Core Version: 0.6.2 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment