hoang_nova

Untitled

Aug 15th, 2014
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.69 KB | None | 0 0
  1. // Decompiled by DJ v3.11.11.95 Copyright 2009 Atanas Neshkov Date: 8/15/2014 12:49:46 PM
  2. // Home Page: http://members.fortunecity.com/neshkov/dj.html http://www.neshkov.com/dj.html - Check often for new version!
  3. // Decompiler options: packimports(3)
  4.  
  5. package com.android.providers.settings;
  6.  
  7. import android.app.*;
  8. import android.app.backup.BackupManager;
  9. import android.content.*;
  10. import android.content.res.Configuration;
  11. import android.location.LocationManager;
  12. import android.media.AudioManager;
  13. import android.net.ConnectivityManager;
  14. import android.os.Bundle;
  15. import android.os.SystemProperties;
  16. import android.preference.PreferenceManager;
  17. import android.telephony.TelephonyManager;
  18. import android.text.TextUtils;
  19. import android.util.Log;
  20. import java.lang.reflect.Field;
  21. import java.text.Collator;
  22. import java.util.Locale;
  23.  
  24. // Referenced classes of package com.android.providers.settings:
  25. // SettingsProviderParser
  26.  
  27. public class SettingsProviderInitializer
  28. {
  29. private static class Loc
  30. implements Comparable
  31. {
  32.  
  33. public int compareTo(Object obj)
  34. {
  35. return sCollator.compare(label, ((Loc)obj).label);
  36. }
  37.  
  38. public String toString()
  39. {
  40. return label;
  41. }
  42.  
  43. static Collator sCollator = Collator.getInstance();
  44. String label;
  45. Locale locale;
  46.  
  47.  
  48. public Loc(String s, Locale locale1)
  49. {
  50. label = s;
  51. locale = locale1;
  52. }
  53. }
  54.  
  55.  
  56. public SettingsProviderInitializer()
  57. {
  58. }
  59.  
  60. private boolean applyDataEnabled(String s, String s1)
  61. {
  62. String s2 = SystemProperties.get("ro.build.target_country");
  63. if(s2.equals("EU") || s2.equals("AL") || s2.equals("AT") || s2.equals("BA") || s2.equals("BE") || s2.equals("BG") || s2.equals("CH") || s2.equals("CZ") || s2.equals("DE") || s2.equals("DK") || s2.equals("ES") || s2.equals("FC") || s2.equals("FI") || s2.equals("FR") || s2.equals("GB") || s2.equals("GL") || s2.equals("GR") || s2.equals("HR") || s2.equals("HU") || s2.equals("IE") || s2.equals("IS") || s2.equals("IT") || s2.equals("LU") || s2.equals("ME") || s2.equals("MK") || s2.equals("MT") || s2.equals("NL") || s2.equals("NO") || s2.equals("PL") || s2.equals("PT") || s2.equals("RE") || s2.equals("RO") || s2.equals("RS") || s2.equals("SE") || s2.equals("SI") || s2.equals("SK") || s1.equals("VDF") || s1.equals("ORG") || s1.equals("TMO") || s1.equals("SFR"))
  64. {
  65. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("applyDataEnabled return true device/operator : ").append(s).append("/").append(s1).toString());
  66. return true;
  67. } else
  68. {
  69. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("applyDataEnabled return false device/operator : ").append(s).append("/").append(s1).toString());
  70. return false;
  71. }
  72. }
  73.  
  74. private void dataEnabledPopupStart(Context context)
  75. {
  76. context.sendBroadcast(new Intent("android.intent.action.SETTINGS.SIM_CHANGE_DATA_ENABLE_POPUP"));
  77. }
  78.  
  79. private static String getDefaultCountryIso(Context context)
  80. {
  81. String s = ((TelephonyManager)context.getSystemService("phone")).getSimCountryIso();
  82. if(TextUtils.isEmpty(s))
  83. s = SystemProperties.get("ro.product.locale.defcountry", "AR");
  84. return s;
  85. }
  86.  
  87. private static String getSimPrev_SIM_MCC(Context context)
  88. {
  89. return PreferenceManager.getDefaultSharedPreferences(context).getString("sim_mcc_value_key", null);
  90. }
  91.  
  92. private void loadDefaultPropertySettings(SharedPreferences sharedpreferences)
  93. {
  94. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [default_timezone] : ").append(sharedpreferences.getString("default_timezone", "null")).toString());
  95. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [sound_profile] : ").append(sharedpreferences.getString("sound_profile", "")).toString());
  96. isSkipDefaultLanguage = false;
  97. if(Present_MCC != null && !Present_MCC.equals("0") && !Present_MCC.equals("") && !Present_MCC.equals(Prev_SIM_MCC))
  98. {
  99. if(Present_MCC != null && Present_MCC.equals("204") && Prev_SIM_MCC != null && Prev_SIM_MCC.equals("214"))
  100. isSkipDefaultLanguage = true;
  101. if(Present_MCC != null && Present_MCC.equals("222") && Prev_SIM_MCC != null && Prev_SIM_MCC.equals("274"))
  102. isSkipDefaultLanguage = true;
  103. if(Present_MCC != null && Present_MCC.equals("240") && Prev_SIM_MCC != null && Prev_SIM_MCC.equals("204"))
  104. isSkipDefaultLanguage = true;
  105. }
  106. if(!isSkipDefaultLanguage) goto _L2; else goto _L1
  107. _L1:
  108. Log.d("SettingsProviderInitializer", "get [default_language] : - Skipped - NOVA dual IMSI patch!!");
  109. _L4:
  110. String s3 = sharedpreferences.getString("default_timezone", "Europe/London");
  111. if(s3 == null)
  112. break MISSING_BLOCK_LABEL_297;
  113. ((AlarmManager)mContext.getSystemService("alarm")).setTimeZone(s3);
  114. String s4;
  115. AudioManager audiomanager;
  116. s4 = sharedpreferences.getString("sound_profile", "");
  117. if(TextUtils.isEmpty(s4))
  118. break MISSING_BLOCK_LABEL_647;
  119. audiomanager = (AudioManager)mContext.getSystemService("audio");
  120. byte byte0 = 2;
  121. if(s4.contains("vibrate"))
  122. byte0 = 1;
  123. android.content.ContentResolver contentresolver;
  124. audiomanager.setVibrateSetting(0, byte0);
  125. audiomanager.setRingerMode(2);
  126. if(!SystemProperties.get("ro.build.target_region").equals("SCA"))
  127. break MISSING_BLOCK_LABEL_647;
  128. contentresolver = mContext.getContentResolver();
  129. Exception exception;
  130. IActivityManager iactivitymanager;
  131. Configuration configuration;
  132. Locale locale;
  133. int i;
  134. if(s4.contains("vibrate"))
  135. i = 1;
  136. else
  137. i = 0;
  138. try
  139. {
  140. android.provider.Settings.System.putInt(contentresolver, "vibrate_when_ringing", i);
  141. return;
  142. }
  143. catch(Exception exception1)
  144. {
  145. return;
  146. }
  147. _L2:
  148. if(android.provider.Settings.System.getInt(mContext.getContentResolver(), "user_set_locale") != 0) goto _L4; else goto _L3
  149. _L3:
  150. Log.d("SettingsProviderInitializer", "reWrite Provider : Set SystemProperty(Changed default language)");
  151. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [default_language] : ").append(sharedpreferences.getString("default_language", "null")).toString());
  152. iactivitymanager = ActivityManagerNative.getDefault();
  153. configuration = iactivitymanager.getConfiguration();
  154. String s = sharedpreferences.getString("default_language", "en_GB");
  155. String s1 = s.substring(0, 2);
  156. String s2 = s.substring(3, 5);
  157. locale = new Locale(s1, s2);
  158. if(!"es".equalsIgnoreCase(s1) || !"LG".equalsIgnoreCase(s2))
  159. break MISSING_BLOCK_LABEL_625;
  160. locale = new Locale("es", getDefaultCountryIso(mContext));
  161. SystemProperties.set("persist.sys.cust.latamspanish", "1");
  162. _L5:
  163. configuration.setLocale((new Loc(toTitleCase(locale.getDisplayLanguage(locale)), locale)).locale);
  164. iactivitymanager.updateConfiguration(configuration);
  165. BackupManager.dataChanged("com.android.providers.settings");
  166. goto _L4
  167. SystemProperties.set("persist.sys.cust.latamspanish", "0");
  168. goto _L5
  169. exception;
  170. throw exception;
  171. }
  172.  
  173. private void loadDefaultSecureSettings(SharedPreferences sharedpreferences)
  174. {
  175. Log.d("SettingsProviderInitializer", "reWrite Provider : Set Secure table");
  176. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [MOBILE_DATA] : ").append(sharedpreferences.getString("mobile_data", "null")).toString());
  177. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [DATA_ROAMING] : ").append(sharedpreferences.getString("data_roaming", "null")).toString());
  178. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [LOCATION_PROVIDERS_ALLOWED] : ").append(sharedpreferences.getString("location_providers_allowed", "null")).toString());
  179. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [INSTALL_NON_MARKET] : ").append(sharedpreferences.getString("install_non_market_apps", "")).toString());
  180. String s = sharedpreferences.getString("mobile_data", "1");
  181. if(!applyDataEnabled(SystemProperties.get("ro.product.device"), SystemProperties.get("ro.build.target_operator"))) goto _L2; else goto _L1
  182. _L1:
  183. Log.e("SettingsProviderInitializer", "MOBILE_DATA do not apply");
  184. _L12:
  185. if(!s.equals("0")) goto _L4; else goto _L3
  186. _L3:
  187. android.provider.Settings.Global.putString(mContext.getContentResolver(), "data_roaming", sharedpreferences.getString("data_roaming", "0"));
  188. _L18:
  189. int i;
  190. String s1;
  191. i = android.provider.Settings.Secure.getInt(mContext.getContentResolver(), "location_mode");
  192. s1 = sharedpreferences.getString("location_providers_allowed", "0");
  193. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("first LOCATION_PROVIDERS_ALLOWED(LOCATION_MODE) : ").append(i).toString());
  194. Log.d("SettingsProviderInitializer", "LOCATION_MODE : LOCATION_MODE_OFF = 0 / LOCATION_MODE_SENSORS_ONLY = 1 / LOCATION_MODE_BATTERY_SAVING = 2 / LOCATION_MODE_HIGH_ACCURACY = 3");
  195. if(i < 0 || i > 3) goto _L6; else goto _L5
  196. _L5:
  197. if(i != 0 && i != 1) goto _L8; else goto _L7
  198. _L7:
  199. if(!s1.equals("0")) goto _L10; else goto _L9
  200. _L9:
  201. Log.d("SettingsProviderInitializer", "set LOCATION_PROVIDERS_ALLOWED(LOCATION_MODE) : off");
  202. i = 0;
  203. _L19:
  204. android.content.SharedPreferences.Editor editor = sharedpreferences.edit();
  205. editor.putString("location_providers_allowed", Integer.toString(i));
  206. editor.commit();
  207. android.provider.Settings.Secure.putInt(mContext.getContentResolver(), "location_mode", Integer.parseInt(sharedpreferences.getString("location_providers_allowed", "1")));
  208. _L6:
  209. String s2 = sharedpreferences.getString("install_non_market_apps", "");
  210. if(!s2.isEmpty())
  211. {
  212. android.provider.Settings.Secure.putString(mContext.getContentResolver(), "install_non_market_apps", s2);
  213. return;
  214. }
  215. goto _L11
  216. _L2:
  217. int j;
  218. label0:
  219. {
  220. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("SetupWizard DataEnable Status 2 : ").append(setupwizard_dataenable_status).toString());
  221. if(!setupwizard_dataenable_status.equals("0"))
  222. break MISSING_BLOCK_LABEL_601;
  223. j = android.provider.Settings.Global.getInt(mContext.getContentResolver(), "mobile_data");
  224. if(!s.equals(String.valueOf(j)))
  225. break label0;
  226. Log.d("SettingsProviderInitializer", "data enabled not change");
  227. }
  228. goto _L12
  229. ConnectivityManager connectivitymanager;
  230. try
  231. {
  232. connectivitymanager = (ConnectivityManager)mContext.getSystemService("connectivity");
  233. }
  234. catch(Exception exception)
  235. {
  236. return;
  237. }
  238. if(j != 1) goto _L14; else goto _L13
  239. _L13:
  240. if(!s.equals("0")) goto _L14; else goto _L15
  241. _L15:
  242. connectivitymanager.setMobileDataEnabled(false);
  243. Log.d("SettingsProviderInitializer", "data enabled change : setMobileDataEnabled(false)");
  244. goto _L12
  245. _L14:
  246. if(j != 0) goto _L12; else goto _L16
  247. _L16:
  248. if(!s.equals("1")) goto _L12; else goto _L17
  249. _L17:
  250. connectivitymanager.setMobileDataEnabled(true);
  251. Log.d("SettingsProviderInitializer", "data enabled change :setMobileDataEnabled(true)");
  252. goto _L12
  253. SystemProperties.set("sys.SetupDataEnable.status", "0");
  254. Log.d("SettingsProviderInitializer", "reboot and SIM Changed / set sys.SetupDataEnable.status 0");
  255. goto _L12
  256. _L4:
  257. android.provider.Settings.Global.putString(mContext.getContentResolver(), "data_roaming", sharedpreferences.getString("data_roaming", "1"));
  258. goto _L18
  259. _L10:
  260. Log.d("SettingsProviderInitializer", "set LOCATION_PROVIDERS_ALLOWED(LOCATION_MODE) : gps");
  261. i = 1;
  262. goto _L19
  263. _L20:
  264. if(!s1.equals("0"))
  265. break MISSING_BLOCK_LABEL_690;
  266. Log.d("SettingsProviderInitializer", "set LOCATION_PROVIDERS_ALLOWED(LOCATION_MODE) : network");
  267. i = 2;
  268. break; /* Loop/switch isn't completed */
  269. Log.d("SettingsProviderInitializer", "set LOCATION_PROVIDERS_ALLOWED(LOCATION_MODE) : gps,network");
  270. i = 3;
  271. break; /* Loop/switch isn't completed */
  272. _L11:
  273. return;
  274. _L8:
  275. if(i != 2 && i != 3) goto _L19; else goto _L20
  276. }
  277.  
  278. private void loadDefaultSystemSettings(SharedPreferences sharedpreferences)
  279. {
  280. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [SCREEN_OFF_TIMEOUT] : ").append(sharedpreferences.getString("screen_off_timeout", "null")).toString());
  281. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [AUTO_TIME] : ").append(sharedpreferences.getString("auto_time", "null")).toString());
  282. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [TIME_12_24] : ").append(sharedpreferences.getString("time_12_24", "null")).toString());
  283. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [DATE_FORMAT] : ").append(sharedpreferences.getString("date_format", "null")).toString());
  284. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [DTMF_TONE] : ").append(sharedpreferences.getString("dtmf_tone_when_dialing", "")).toString());
  285. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [GPS_SUPL_HOST] : ").append(sharedpreferences.getString("gps_supl_host", "")).toString());
  286. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("get [GPS_SUPL_PORT] : ").append(sharedpreferences.getString("gps_supl_port", "")).toString());
  287. String s1;
  288. String s2;
  289. LocationManager locationmanager;
  290. android.provider.Settings.System.putString(mContext.getContentResolver(), "screen_off_timeout", (new StringBuilder()).append(sharedpreferences.getString("screen_off_timeout", "15")).append("000").toString());
  291. android.provider.Settings.Global.putString(mContext.getContentResolver(), "auto_time", sharedpreferences.getString("auto_time", "0"));
  292. android.provider.Settings.System.putString(mContext.getContentResolver(), "time_12_24", sharedpreferences.getString("time_12_24", "24"));
  293. android.provider.Settings.System.putString(mContext.getContentResolver(), "date_format", sharedpreferences.getString("date_format", "yyyy-MM-dd"));
  294. String s = sharedpreferences.getString("dtmf_tone_when_dialing", "");
  295. if(!s.isEmpty())
  296. android.provider.Settings.System.putString(mContext.getContentResolver(), "dtmf_tone", s);
  297. s1 = sharedpreferences.getString("gps_supl_host", "");
  298. s2 = sharedpreferences.getString("gps_supl_port", "");
  299. if(SystemProperties.get("ro.product.device").equals("x3") && SystemProperties.get("ro.product.device").equals("f70") || s1.isEmpty() || s2.isEmpty())
  300. break MISSING_BLOCK_LABEL_755;
  301. locationmanager = (LocationManager)mContext.getSystemService("location");
  302. Class.forName(locationmanager.getClass().getName()).getDeclaredField("mService").setAccessible(true);
  303. if(locationmanager.isProviderEnabled("gps"))
  304. {
  305. Bundle bundle = new Bundle();
  306. bundle.putString("supl_address", s1);
  307. locationmanager.sendExtraCommand("gps", "lge.gps.extracmd.fmw.setsupladdress", bundle);
  308. android.provider.Settings.System.putString(mContext.getContentResolver(), "gps_supl_host", s1);
  309. bundle.putInt("supl_port", Integer.parseInt(s2));
  310. locationmanager.sendExtraCommand("gps", "lge.gps.extracmd.fmw.setsuplport", bundle);
  311. android.provider.Settings.System.putString(mContext.getContentResolver(), "gps_supl_port", s2);
  312. return;
  313. }
  314. try
  315. {
  316. Log.d("SettingsProviderInitializer", "LocationManager disabled...activate LocationProvider");
  317. android.provider.Settings.Secure.setLocationProviderEnabled(mContext.getContentResolver(), "gps", true);
  318. Bundle bundle1 = new Bundle();
  319. bundle1.putString("supl_address", s1);
  320. locationmanager.sendExtraCommand("gps", "lge.gps.extracmd.fmw.setsupladdress", bundle1);
  321. android.provider.Settings.System.putString(mContext.getContentResolver(), "gps_supl_host", s1);
  322. bundle1.putInt("supl_port", Integer.parseInt(s2));
  323. locationmanager.sendExtraCommand("gps", "lge.gps.extracmd.fmw.setsuplport", bundle1);
  324. android.provider.Settings.System.putString(mContext.getContentResolver(), "gps_supl_port", s2);
  325. android.provider.Settings.Secure.setLocationProviderEnabled(mContext.getContentResolver(), "gps", false);
  326. return;
  327. }
  328. catch(Exception exception) { }
  329. }
  330.  
  331. private void setKeyToneValueforVDF()
  332. {
  333. Log.d("SettingsProviderInitializer", "[setKeyToneValueforVDF]");
  334. if(!"OPEN".equals(SystemProperties.get("ro.build.target_operator")) && !"VDF".equals(SystemProperties.get("ro.build.target_operator")) && !"MBK".equals(SystemProperties.get("ro.build.target_operator"))) goto _L2; else goto _L1
  335. _L1:
  336. String s;
  337. TelephonyManager telephonymanager = (TelephonyManager)mContext.getSystemService("phone");
  338. if(telephonymanager == null)
  339. break MISSING_BLOCK_LABEL_440;
  340. s = telephonymanager.getSimOperator();
  341. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("op_numeric = ").append(s).toString());
  342. if(!"21670".equals(s) && !"27402".equals(s) && !"27403".equals(s) && !"23403".equals(s) && !"53001".equals(s) && !"20404".equals(s) && !"23003".equals(s) && !"23099".equals(s) && !"27201".equals(s) && !"20810".equals(s) && !"20811".equals(s) && !"20813".equals(s) && !"64710".equals(s) && !"26202".equals(s) && !"26204".equals(s) && !"22801".equals(s) && !"23801".equals(s) && !"22853".equals(s) && !"20408".equals(s) && !"23201".equals(s) && !"23202".equals(s) && !"23209".equals(s) && !"23212".equals(s) && !"23215".equals(s)) goto _L4; else goto _L3
  343. _L3:
  344. android.provider.Settings.System.putInt(mContext.getContentResolver(), "dtmf_tone", 0);
  345. android.provider.Settings.System.putInt(mContext.getContentResolver(), "sound_effects_enabled", 0);
  346. _L2:
  347. return;
  348. _L4:
  349. if(!"45000".equals(s)) goto _L2; else goto _L5
  350. _L5:
  351. android.provider.Settings.System.putInt(mContext.getContentResolver(), "dtmf_tone", 1);
  352. android.provider.Settings.System.putInt(mContext.getContentResolver(), "sound_effects_enabled", 0);
  353. return;
  354. Log.e("SettingsProviderInitializer", "tm is null");
  355. return;
  356. }
  357.  
  358. private static String toTitleCase(String s)
  359. {
  360. if(s.length() == 0)
  361. return s;
  362. else
  363. return (new StringBuilder()).append(Character.toUpperCase(s.charAt(0))).append(s.substring(1)).toString();
  364. }
  365.  
  366. protected void initSettingsProvider(Context context)
  367. {
  368. mContext = context;
  369. mccmnc = ((TelephonyManager)context.getSystemService("phone")).getSimOperator();
  370. if(mccmnc != null && mccmnc.length() >= 5) goto _L2; else goto _L1
  371. _L1:
  372. Log.d("SettingsProviderInitializer", "[NOVA Dual IMSI] Error : mccmnc value is invalid!!");
  373. _L4:
  374. return;
  375. _L2:
  376. String s;
  377. Prev_SIM_MCC = getSimPrev_SIM_MCC(context);
  378. Present_MCC = mccmnc.substring(0, 3);
  379. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("[NOVA Dual IMSI] Prev_SIM_MCC : ").append(Prev_SIM_MCC).append(", Present_MCC : ").append(Present_MCC).toString());
  380. SharedPreferences sharedpreferences = mContext.getSharedPreferences(SETTINGSPROVIDER_CONFIG_PREFERENCE, 0);
  381. setupwizard_dataenable_status = SystemProperties.get("sys.SetupDataEnable.status", "0");
  382. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("SetupWizard DataEnable Status 1 : ").append(setupwizard_dataenable_status).toString());
  383. if(SettingsProviderParser.initSettingsProvider(context))
  384. {
  385. TelephonyManager telephonymanager;
  386. String s1;
  387. String s2;
  388. if(sharedpreferences != null)
  389. {
  390. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("isSIMChanged1 : ").append(SystemProperties.get("persist.radio.iccid-changed")).toString());
  391. loadDefaultSystemSettings(sharedpreferences);
  392. loadDefaultSecureSettings(sharedpreferences);
  393. loadDefaultPropertySettings(sharedpreferences);
  394. dataEnabledPopupStart(mContext);
  395. Log.d("SettingsProviderInitializer", "dataEnabledPopupStart 1");
  396. } else
  397. {
  398. Log.e("SettingsProviderInitializer", "Auto-profile : Operator profile does not exist!!");
  399. }
  400. setKeyToneValueforVDF();
  401. } else
  402. if(SettingsProviderParser.isNeedChangeProfile(sharedpreferences))
  403. {
  404. if(setupwizard_dataenable_status.equals("0"))
  405. {
  406. Log.d("SettingsProviderInitializer", (new StringBuilder()).append("isSIMChanged2 : ").append(SystemProperties.get("persist.radio.iccid-changed")).toString());
  407. dataEnabledPopupStart(mContext);
  408. Log.d("SettingsProviderInitializer", "dataEnabledPopupStart 2");
  409. }
  410. setKeyToneValueforVDF();
  411. } else
  412. {
  413. Log.e("SettingsProviderInitializer", "Auto-profile : Set default values");
  414. }
  415. if(!SettingsProviderParser.isNeedChangeProfile(sharedpreferences) && !"1".equals(SystemProperties.get("persist.radio.iccid-changed")) && !"2".equals(SystemProperties.get("persist.radio.iccid-changed"))) goto _L4; else goto _L3
  416. _L3:
  417. telephonymanager = (TelephonyManager)context.getSystemService("phone");
  418. if(telephonymanager == null) goto _L4; else goto _L5
  419. _L5:
  420. s = telephonymanager.getSimOperator();
  421. s1 = SystemProperties.get("ro.build.target_country");
  422. s2 = SystemProperties.get("ro.build.target_operator");
  423. if(telephonymanager.getSimState() != 5 || (!"P4P".equals(s2) || !"PL".equals(s1)) && (!"EU".equals(s1) || !"OPEN".equals(s2)) && (!"H3G".equals(s2) || !"COM".equals(s1)) && (!"VDF".equals(s2) || !"COM".equals(s1))) goto _L7; else goto _L6
  424. _L6:
  425. Log.e("SettingsProviderInitializer", "H3G data roaming - init");
  426. if(!"23205".equals(s) && !"23210".equals(s)) goto _L9; else goto _L8
  427. _L8:
  428. android.provider.Settings.Secure.putInt(mContext.getContentResolver(), "roaming_mode_domestic_data", 0);
  429. android.provider.Settings.Secure.putInt(mContext.getContentResolver(), "roaming_mode_international_data", 1);
  430. android.provider.Settings.Global.putInt(mContext.getContentResolver(), "data_roaming", 1);
  431. _L7:
  432. setKeyToneValueforVDF();
  433. return;
  434. _L9:
  435. if("24002".equals(s) || "26006".equals(s) || "26004".equals(s))
  436. {
  437. android.provider.Settings.Secure.putInt(mContext.getContentResolver(), "roaming_mode_domestic_data", 1);
  438. android.provider.Settings.Secure.putInt(mContext.getContentResolver(), "roaming_mode_international_data", 0);
  439. android.provider.Settings.Global.putInt(mContext.getContentResolver(), "data_roaming", 0);
  440. } else
  441. if("22299".equals(s) || "23420".equals(s) || "23594".equals(s) || "45403".equals(s) || "45404".equals(s) || "27205".equals(s) || "23806".equals(s) || "21902".equals(s))
  442. {
  443. android.provider.Settings.Secure.putInt(mContext.getContentResolver(), "roaming_mode_domestic_data", 0);
  444. android.provider.Settings.Secure.putInt(mContext.getContentResolver(), "roaming_mode_international_data", 0);
  445. android.provider.Settings.Global.putInt(mContext.getContentResolver(), "data_roaming", 0);
  446. }
  447. if(true) goto _L7; else goto _L10
  448. _L10:
  449. }
  450.  
  451. private static String SETTINGSPROVIDER_CONFIG_PREFERENCE = "SettingsProviderSharedPreference";
  452. private String Present_MCC;
  453. private String Prev_SIM_MCC;
  454. private boolean isSkipDefaultLanguage;
  455. private Context mContext;
  456. private String mccmnc;
  457. private String setupwizard_dataenable_status;
  458.  
  459. }
Advertisement
Add Comment
Please, Sign In to add comment