Advertisement
Guest User

Untitled

a guest
Apr 13th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 231.70 KB | None | 0 0
  1. package com.android.internal.telephony;
  2.  
  3. import android.content.BroadcastReceiver;
  4. import android.content.Context;
  5. import android.content.Intent;
  6. import android.content.IntentFilter;
  7. import android.hardware.display.DisplayManager;
  8. import android.hardware.display.DisplayManager.DisplayListener;
  9. import android.net.ConnectivityManager;
  10. import android.net.LocalSocket;
  11. import android.os.AsyncResult;
  12. import android.os.Build;
  13. import android.os.Handler;
  14. import android.os.HandlerThread;
  15. import android.os.Looper;
  16. import android.os.Message;
  17. import android.os.Parcel;
  18. import android.os.PowerManager;
  19. import android.os.PowerManager.WakeLock;
  20. import android.os.SystemProperties;
  21. import android.telephony.CellInfo;
  22. import android.telephony.NeighboringCellInfo;
  23. import android.telephony.PhoneNumberUtils;
  24. import android.telephony.Rlog;
  25. import android.telephony.ServiceState;
  26. import android.telephony.SignalStrength;
  27. import android.telephony.SmsMessage;
  28. import android.telephony.SubscriptionManager;
  29. import android.telephony.TelephonyManager;
  30. import android.text.TextUtils;
  31. import android.util.Base64;
  32. import android.util.Log;
  33. import android.util.SparseArray;
  34. import android.view.Display;
  35. import com.android.internal.telephony.CommandsInterface.RadioState;
  36. import com.android.internal.telephony.cdma.CdmaCallWaitingNotification;
  37. import com.android.internal.telephony.cdma.CdmaInformationRecords;
  38. import com.android.internal.telephony.cdma.CdmaInformationRecords.CdmaDisplayInfoRec;
  39. import com.android.internal.telephony.cdma.CdmaInformationRecords.CdmaLineControlInfoRec;
  40. import com.android.internal.telephony.cdma.CdmaInformationRecords.CdmaNumberInfoRec;
  41. import com.android.internal.telephony.cdma.CdmaInformationRecords.CdmaRedirectingNumberInfoRec;
  42. import com.android.internal.telephony.cdma.CdmaInformationRecords.CdmaSignalInfoRec;
  43. import com.android.internal.telephony.cdma.CdmaInformationRecords.CdmaT53AudioControlInfoRec;
  44. import com.android.internal.telephony.cdma.CdmaInformationRecords.CdmaT53ClirInfoRec;
  45. import com.android.internal.telephony.cdma.CdmaSmsBroadcastConfigInfo;
  46. import com.android.internal.telephony.cdma.SignalToneUtil;
  47. import com.android.internal.telephony.dataconnection.ApnProfileOmh;
  48. import com.android.internal.telephony.dataconnection.ApnSetting;
  49. import com.android.internal.telephony.dataconnection.DataCallResponse;
  50. import com.android.internal.telephony.dataconnection.DataProfile;
  51. import com.android.internal.telephony.dataconnection.DcFailCause;
  52. import com.android.internal.telephony.gsm.CallFailCause;
  53. import com.android.internal.telephony.gsm.SmsBroadcastConfigInfo;
  54. import com.android.internal.telephony.gsm.SsData;
  55. import com.android.internal.telephony.gsm.SuppServiceNotification;
  56. import com.android.internal.telephony.uicc.IccCardApplicationStatus;
  57. import com.android.internal.telephony.uicc.IccCardStatus;
  58. import com.android.internal.telephony.uicc.IccIoResult;
  59. import com.android.internal.telephony.uicc.IccRecords;
  60. import com.android.internal.telephony.uicc.IccRefreshResponse;
  61. import com.android.internal.telephony.uicc.IccUtils;
  62. import com.android.internal.telephony.uicc.SpnOverride;
  63. import com.google.android.mms.pdu.CharacterSets;
  64. import java.io.ByteArrayInputStream;
  65. import java.io.DataInputStream;
  66. import java.io.FileDescriptor;
  67. import java.io.IOException;
  68. import java.io.InputStream;
  69. import java.io.PrintWriter;
  70. import java.nio.ByteBuffer;
  71. import java.nio.ByteOrder;
  72. import java.text.SimpleDateFormat;
  73. import java.util.ArrayList;
  74. import java.util.Arrays;
  75. import java.util.Collections;
  76. import java.util.Date;
  77. import java.util.Iterator;
  78. import java.util.concurrent.atomic.AtomicBoolean;
  79. import jp.co.sharp.telephony.OemCdmaTelephonyManager;
  80. import jp.co.sharp.telephony.OemCdmaTelephonyManager.OEM_RIL_RDE_Data;
  81.  
  82. public final class RIL extends BaseCommands implements CommandsInterface {
  83. private static final int BYTE_SIZE = 1;
  84. private static final int CDMA_BROADCAST_SMS_NO_OF_SERVICE_CATEGORIES = 31;
  85. private static final int CDMA_BSI_NO_OF_INTS_STRUCT = 3;
  86. public static final String COLUM_TABLE_MCN_SETTING_DURATION_TIME = "COLUM_TABLE_MCN_SETTING_DURATION_TIME";
  87. public static final String COLUM_TABLE_MCN_SETTING_DURATION_TYPE = "COLUM_TABLE_MCN_SETTING_DURATION_TYPE";
  88. private static final int DEFAULT_WAKE_LOCK_TIMEOUT = 60000;
  89. static final int EVENT_SEARCHING_NETWORK_DELAY = 4;
  90. static final int EVENT_SEND = 1;
  91. static final int EVENT_WAKE_LOCK_TIMEOUT = 2;
  92. private static final int INT_SIZE = 4;
  93. static final boolean LOG_NS = LOG_NW;
  94. static final boolean LOG_NW = SystemProperties.getBoolean("persist.sharp.telephony.nvlognw", false);
  95. static final boolean LOG_SD = SystemProperties.getBoolean("persist.sharp.telephony.nvlogsd", false);
  96. private static final int OEMHOOK_BASE = 524288;
  97. private static final int OEMHOOK_EVT_HOOK_GET_MODEM_CAPABILITY = 524323;
  98. private static final int OEMHOOK_EVT_HOOK_SET_LOCAL_CALL_HOLD = 524301;
  99. private static final int OEMHOOK_EVT_HOOK_UPDATE_SUB_BINDING = 524324;
  100. private static final String OEM_IDENTIFIER = "QOEMHOOK";
  101. static final int RESPONSE_SOLICITED = 0;
  102. static final int RESPONSE_UNSOLICITED = 1;
  103. static final boolean RILJ_LOGD = true;
  104. static final boolean RILJ_LOGV = false;
  105. static final String RILJ_LOG_TAG = "RILJ";
  106. static final int RIL_MAX_COMMAND_BYTES = 8192;
  107. static final long SEARCH_NETWORK_DELAY_TIME = 3000;
  108. private static final boolean SMARTCARD_DBG = false;
  109. static final String[] SOCKET_NAME_RIL = new String[]{"rild", "rild2", "rild3"};
  110. static final int SOCKET_OPEN_RETRY_MILLIS = 4000;
  111. final int OEMHOOK_UNSOL_SIM_REFRESH;
  112. final int OEMHOOK_UNSOL_WWAN_IWLAN_COEXIST;
  113. final int QCRIL_EVT_HOOK_UNSOL_MODEM_CAPABILITY;
  114. Display mDefaultDisplay;
  115. int mDefaultDisplayState;
  116. private final DisplayListener mDisplayListener;
  117. int mHeaderSize;
  118. private Integer mInstanceId;
  119. BroadcastReceiver mIntentReceiver;
  120. Object mLastNITZTimeInfo;
  121. private boolean mLimitationByChameleon;
  122. private boolean mLimitedService;
  123. private boolean mRILConnected_SetInitialAttachApn_OnceSkip;
  124. private boolean mRILConnected_UpdateOemDataSettings_OnceSkip;
  125. RILReceiver mReceiver;
  126. Thread mReceiverThread;
  127. SparseArray<RILRequest> mRequestList;
  128. RILSender mSender;
  129. HandlerThread mSenderThread;
  130. private String mSetInitialAttachApn_Apn;
  131. private int mSetInitialAttachApn_AuthType;
  132. private String mSetInitialAttachApn_Password;
  133. private String mSetInitialAttachApn_Protocol;
  134. private String mSetInitialAttachApn_Username;
  135. private boolean mSetLimitationByChameleon;
  136. LocalSocket mSocket;
  137. AtomicBoolean mTestingEmergencyCall;
  138. private boolean mUpdateOemDataSettings_DataRoaming;
  139. private boolean mUpdateOemDataSettings_MobileData;
  140. WakeLock mWakeLock;
  141. int mWakeLockCount;
  142. final int mWakeLockTimeout;
  143.  
  144. class RILRadioLogWriter implements Runnable {
  145. public static final int LOGBUF_MAIN = 0;
  146. public static final int LOGBUF_RADIO = 1;
  147. public static final int LOGBUF_RIL_CMD_INFO = 2;
  148. private static final int RADIO_LOG_BUFFERSIZE = 262144;
  149. private static final int RADIO_LOG_REC_SIZE_TYPE1 = 8192;
  150. private static final int RADIO_LOG_REC_SIZE_TYPE2 = 204800;
  151. public static final int RECTYPE_NETWORK_SELECTION = 2;
  152. public static final int RECTYPE_SETNETWORK = 0;
  153. public static final int RECTYPE_SHUTDOWN = 1;
  154. private String mAppendString = null;
  155. private int mBufType;
  156. private int mRecType;
  157. private String mStackTrace = null;
  158. private int mWriteSize;
  159.  
  160. public RILRadioLogWriter(int i, int i2) {
  161. if (TelBrand.IS_DCM) {
  162. if (i == 0) {
  163. this.mRecType = 0;
  164. this.mWriteSize = 8192;
  165. } else if (i == 2) {
  166. this.mRecType = 2;
  167. this.mWriteSize = 8192;
  168. } else {
  169. this.mRecType = 1;
  170. this.mWriteSize = RADIO_LOG_REC_SIZE_TYPE2;
  171. }
  172. if (i2 == 0) {
  173. this.mBufType = 0;
  174. } else if (i2 == 2) {
  175. this.mBufType = 2;
  176. } else {
  177. this.mBufType = 1;
  178. }
  179. }
  180. }
  181.  
  182. private String getPrefix(int i, int i2) {
  183. String str = "";
  184. if (!TelBrand.IS_DCM) {
  185. return str;
  186. }
  187. str = i == 0 ? "N" : i == 2 ? "NS" : "S";
  188. return i2 == 0 ? str + "M" : i2 == 2 ? str + "RCI" : str + "R";
  189. }
  190.  
  191. /* JADX WARNING: Unknown top exception splitter block from list: {B:87:0x0166=Splitter:B:87:0x0166, B:71:0x011b=Splitter:B:71:0x011b} */
  192. /* JADX WARNING: Removed duplicated region for block: B:78:0x013c A:{SYNTHETIC, Splitter:B:78:0x013c} */
  193. /* JADX WARNING: Removed duplicated region for block: B:85:0x0163 A:{SYNTHETIC, Splitter:B:85:0x0163} */
  194. /* JADX WARNING: Removed duplicated region for block: B:85:0x0163 A:{SYNTHETIC, Splitter:B:85:0x0163} */
  195. private int getRadioLogIndex(java.lang.String r10, int r11, int r12) {
  196. /*
  197. r9 = this;
  198. r1 = 30;
  199. r0 = 29;
  200. r3 = 0;
  201. monitor-enter(r9);
  202. r2 = com.android.internal.telephony.TelBrand.IS_DCM; Catch:{ all -> 0x00a5 }
  203. if (r2 != 0) goto L_0x000d;
  204. L_0x000a:
  205. r0 = -1;
  206. L_0x000b:
  207. monitor-exit(r9);
  208. return r0;
  209. L_0x000d:
  210. r2 = 10;
  211. r5 = 9;
  212. r4 = new java.lang.StringBuilder; Catch:{ all -> 0x00a5 }
  213. r4.<init>(); Catch:{ all -> 0x00a5 }
  214. r4 = r4.append(r10); Catch:{ all -> 0x00a5 }
  215. r6 = r9.getPrefix(r11, r12); Catch:{ all -> 0x00a5 }
  216. r4 = r4.append(r6); Catch:{ all -> 0x00a5 }
  217. r6 = "1000";
  218. r4 = r4.append(r6); Catch:{ all -> 0x00a5 }
  219. r6 = r4.toString(); Catch:{ all -> 0x00a5 }
  220. if (r11 != 0) goto L_0x00a8;
  221. L_0x002e:
  222. r4 = r1;
  223. L_0x002f:
  224. r1 = new java.io.FileInputStream; Catch:{ FileNotFoundException -> 0x00ad }
  225. r1.<init>(r6); Catch:{ FileNotFoundException -> 0x00ad }
  226. r2 = r1;
  227. L_0x0035:
  228. if (r2 == 0) goto L_0x0062;
  229. L_0x0037:
  230. r1 = r2.available(); Catch:{ NumberFormatException -> 0x00cd, IOException -> 0x00f2 }
  231. if (r1 <= 0) goto L_0x005f;
  232. L_0x003d:
  233. r1 = r2.available(); Catch:{ NumberFormatException -> 0x00cd, IOException -> 0x00f2 }
  234. r1 = new byte[r1]; Catch:{ NumberFormatException -> 0x00cd, IOException -> 0x00f2 }
  235. if (r1 == 0) goto L_0x005f;
  236. L_0x0045:
  237. r2.read(r1); Catch:{ NumberFormatException -> 0x00cd, IOException -> 0x00f2 }
  238. r5 = new java.lang.String; Catch:{ NumberFormatException -> 0x00cd, IOException -> 0x00f2 }
  239. r7 = "US-ASCII";
  240. r5.<init>(r1, r7); Catch:{ NumberFormatException -> 0x00cd, IOException -> 0x00f2 }
  241. if (r5 == 0) goto L_0x005f;
  242. L_0x0051:
  243. r1 = java.lang.Integer.valueOf(r5); Catch:{ NumberFormatException -> 0x00cd, IOException -> 0x00f2 }
  244. r0 = r1.intValue(); Catch:{ NumberFormatException -> 0x00cd, IOException -> 0x00f2 }
  245. if (r0 < 0) goto L_0x005d;
  246. L_0x005b:
  247. if (r0 < r4) goto L_0x005f;
  248. L_0x005d:
  249. r0 = r4 + -1;
  250. L_0x005f:
  251. r2.close(); Catch:{ IOException -> 0x0185 }
  252. L_0x0062:
  253. r0 = r0 + 1;
  254. r0 = r0 % r4;
  255. r2 = new java.io.FileOutputStream; Catch:{ IOException -> 0x011c, all -> 0x018c }
  256. r2.<init>(r6); Catch:{ IOException -> 0x011c, all -> 0x018c }
  257. if (r2 == 0) goto L_0x0080;
  258. L_0x006c:
  259. r1 = java.lang.String.valueOf(r0); Catch:{ IOException -> 0x018a, all -> 0x0160 }
  260. if (r1 == 0) goto L_0x0080;
  261. L_0x0072:
  262. r3 = "US-ASCII";
  263. r1 = r1.getBytes(r3); Catch:{ IOException -> 0x018a, all -> 0x0160 }
  264. if (r1 == 0) goto L_0x0080;
  265. L_0x007a:
  266. r2.write(r1); Catch:{ IOException -> 0x018a, all -> 0x0160 }
  267. r2.flush(); Catch:{ IOException -> 0x018a, all -> 0x0160 }
  268. L_0x0080:
  269. if (r2 == 0) goto L_0x000b;
  270. L_0x0082:
  271. r2.close(); Catch:{ IOException -> 0x0086 }
  272. goto L_0x000b;
  273. L_0x0086:
  274. r1 = move-exception;
  275. r2 = "RILJ";
  276. r3 = new java.lang.StringBuilder; Catch:{ all -> 0x00a5 }
  277. r3.<init>(); Catch:{ all -> 0x00a5 }
  278. r3 = r3.append(r6); Catch:{ all -> 0x00a5 }
  279. r4 = " close err:";
  280. r3 = r3.append(r4); Catch:{ all -> 0x00a5 }
  281. r1 = r3.append(r1); Catch:{ all -> 0x00a5 }
  282. r1 = r1.toString(); Catch:{ all -> 0x00a5 }
  283. android.telephony.Rlog.e(r2, r1); Catch:{ all -> 0x00a5 }
  284. goto L_0x000b;
  285. L_0x00a5:
  286. r0 = move-exception;
  287. monitor-exit(r9);
  288. throw r0;
  289. L_0x00a8:
  290. r4 = 2;
  291. if (r11 != r4) goto L_0x0191;
  292. L_0x00ab:
  293. r4 = r1;
  294. goto L_0x002f;
  295. L_0x00ad:
  296. r1 = move-exception;
  297. r2 = "RILJ";
  298. r5 = new java.lang.StringBuilder; Catch:{ all -> 0x00a5 }
  299. r5.<init>(); Catch:{ all -> 0x00a5 }
  300. r5 = r5.append(r6); Catch:{ all -> 0x00a5 }
  301. r7 = " open err:";
  302. r5 = r5.append(r7); Catch:{ all -> 0x00a5 }
  303. r1 = r5.append(r1); Catch:{ all -> 0x00a5 }
  304. r1 = r1.toString(); Catch:{ all -> 0x00a5 }
  305. android.telephony.Rlog.w(r2, r1); Catch:{ all -> 0x00a5 }
  306. r2 = r3;
  307. goto L_0x0035;
  308. L_0x00cd:
  309. r1 = move-exception;
  310. r5 = "RILJ";
  311. r7 = new java.lang.StringBuilder; Catch:{ all -> 0x0117 }
  312. r7.<init>(); Catch:{ all -> 0x0117 }
  313. r7 = r7.append(r6); Catch:{ all -> 0x0117 }
  314. r8 = " read err:";
  315. r7 = r7.append(r8); Catch:{ all -> 0x0117 }
  316. r1 = r7.append(r1); Catch:{ all -> 0x0117 }
  317. r1 = r1.toString(); Catch:{ all -> 0x0117 }
  318. android.telephony.Rlog.e(r5, r1); Catch:{ all -> 0x0117 }
  319. r2.close(); Catch:{ IOException -> 0x00ef }
  320. goto L_0x0062;
  321. L_0x00ef:
  322. r1 = move-exception;
  323. goto L_0x0062;
  324. L_0x00f2:
  325. r1 = move-exception;
  326. r5 = "RILJ";
  327. r7 = new java.lang.StringBuilder; Catch:{ all -> 0x0117 }
  328. r7.<init>(); Catch:{ all -> 0x0117 }
  329. r7 = r7.append(r6); Catch:{ all -> 0x0117 }
  330. r8 = " read err:";
  331. r7 = r7.append(r8); Catch:{ all -> 0x0117 }
  332. r1 = r7.append(r1); Catch:{ all -> 0x0117 }
  333. r1 = r1.toString(); Catch:{ all -> 0x0117 }
  334. android.telephony.Rlog.e(r5, r1); Catch:{ all -> 0x0117 }
  335. r2.close(); Catch:{ IOException -> 0x0114 }
  336. goto L_0x0062;
  337. L_0x0114:
  338. r1 = move-exception;
  339. goto L_0x0062;
  340. L_0x0117:
  341. r0 = move-exception;
  342. r2.close(); Catch:{ IOException -> 0x0188 }
  343. L_0x011b:
  344. throw r0; Catch:{ all -> 0x00a5 }
  345. L_0x011c:
  346. r1 = move-exception;
  347. r2 = r3;
  348. L_0x011e:
  349. r3 = "RILJ";
  350. r4 = new java.lang.StringBuilder; Catch:{ all -> 0x018f }
  351. r4.<init>(); Catch:{ all -> 0x018f }
  352. r4 = r4.append(r6); Catch:{ all -> 0x018f }
  353. r5 = " write err:";
  354. r4 = r4.append(r5); Catch:{ all -> 0x018f }
  355. r1 = r4.append(r1); Catch:{ all -> 0x018f }
  356. r1 = r1.toString(); Catch:{ all -> 0x018f }
  357. android.telephony.Rlog.e(r3, r1); Catch:{ all -> 0x018f }
  358. if (r2 == 0) goto L_0x000b;
  359. L_0x013c:
  360. r2.close(); Catch:{ IOException -> 0x0141 }
  361. goto L_0x000b;
  362. L_0x0141:
  363. r1 = move-exception;
  364. r2 = "RILJ";
  365. r3 = new java.lang.StringBuilder; Catch:{ all -> 0x00a5 }
  366. r3.<init>(); Catch:{ all -> 0x00a5 }
  367. r3 = r3.append(r6); Catch:{ all -> 0x00a5 }
  368. r4 = " close err:";
  369. r3 = r3.append(r4); Catch:{ all -> 0x00a5 }
  370. r1 = r3.append(r1); Catch:{ all -> 0x00a5 }
  371. r1 = r1.toString(); Catch:{ all -> 0x00a5 }
  372. android.telephony.Rlog.e(r2, r1); Catch:{ all -> 0x00a5 }
  373. goto L_0x000b;
  374. L_0x0160:
  375. r0 = move-exception;
  376. L_0x0161:
  377. if (r2 == 0) goto L_0x0166;
  378. L_0x0163:
  379. r2.close(); Catch:{ IOException -> 0x0167 }
  380. L_0x0166:
  381. throw r0; Catch:{ all -> 0x00a5 }
  382. L_0x0167:
  383. r1 = move-exception;
  384. r2 = "RILJ";
  385. r3 = new java.lang.StringBuilder; Catch:{ all -> 0x00a5 }
  386. r3.<init>(); Catch:{ all -> 0x00a5 }
  387. r3 = r3.append(r6); Catch:{ all -> 0x00a5 }
  388. r4 = " close err:";
  389. r3 = r3.append(r4); Catch:{ all -> 0x00a5 }
  390. r1 = r3.append(r1); Catch:{ all -> 0x00a5 }
  391. r1 = r1.toString(); Catch:{ all -> 0x00a5 }
  392. android.telephony.Rlog.e(r2, r1); Catch:{ all -> 0x00a5 }
  393. goto L_0x0166;
  394. L_0x0185:
  395. r1 = move-exception;
  396. goto L_0x0062;
  397. L_0x0188:
  398. r1 = move-exception;
  399. goto L_0x011b;
  400. L_0x018a:
  401. r1 = move-exception;
  402. goto L_0x011e;
  403. L_0x018c:
  404. r0 = move-exception;
  405. r2 = r3;
  406. goto L_0x0161;
  407. L_0x018f:
  408. r0 = move-exception;
  409. goto L_0x0161;
  410. L_0x0191:
  411. r4 = r2;
  412. r0 = r5;
  413. goto L_0x002f;
  414. */
  415. throw new UnsupportedOperationException("Method not decompiled: com.android.internal.telephony.RIL$RILRadioLogWriter.getRadioLogIndex(java.lang.String, int, int):int");
  416. }
  417.  
  418. /* JADX WARNING: Unknown top exception splitter block from list: {B:77:0x0221=Splitter:B:77:0x0221, B:64:0x01c2=Splitter:B:64:0x01c2} */
  419. /* JADX WARNING: Unknown top exception splitter block from list: {B:38:0x00ed=Splitter:B:38:0x00ed, B:47:0x013d=Splitter:B:47:0x013d} */
  420. /* JADX WARNING: Removed duplicated region for block: B:164:0x0452 A:{SYNTHETIC, Splitter:B:164:0x0452} */
  421. /* JADX WARNING: Removed duplicated region for block: B:167:0x0457 */
  422. /* JADX WARNING: Removed duplicated region for block: B:193:0x04fb A:{SYNTHETIC, Splitter:B:193:0x04fb} */
  423. /* JADX WARNING: Removed duplicated region for block: B:90:0x0285 A:{SYNTHETIC, Splitter:B:90:0x0285} */
  424. /* JADX WARNING: Removed duplicated region for block: B:23:0x008f */
  425. /* JADX WARNING: Removed duplicated region for block: B:235:? A:{SYNTHETIC, RETURN} */
  426. /* JADX WARNING: Removed duplicated region for block: B:30:0x009e A:{SYNTHETIC, Splitter:B:30:0x009e} */
  427. /* JADX WARNING: Removed duplicated region for block: B:23:0x008f */
  428. /* JADX WARNING: Removed duplicated region for block: B:30:0x009e A:{SYNTHETIC, Splitter:B:30:0x009e} */
  429. /* JADX WARNING: Removed duplicated region for block: B:235:? A:{SYNTHETIC, RETURN} */
  430. /* JADX WARNING: Removed duplicated region for block: B:120:0x036c A:{SYNTHETIC, Splitter:B:120:0x036c} */
  431. /* JADX WARNING: Removed duplicated region for block: B:241:? A:{SYNTHETIC, RETURN} */
  432. /* JADX WARNING: Removed duplicated region for block: B:129:0x038f A:{SYNTHETIC, Splitter:B:129:0x038f} */
  433. /* JADX WARNING: Removed duplicated region for block: B:164:0x0452 A:{SYNTHETIC, Splitter:B:164:0x0452} */
  434. /* JADX WARNING: Removed duplicated region for block: B:167:0x0457 */
  435. /* JADX WARNING: Removed duplicated region for block: B:164:0x0452 A:{SYNTHETIC, Splitter:B:164:0x0452} */
  436. /* JADX WARNING: Removed duplicated region for block: B:167:0x0457 */
  437. /* JADX WARNING: Removed duplicated region for block: B:50:0x0161 A:{SYNTHETIC, Splitter:B:50:0x0161} */
  438. /* JADX WARNING: Removed duplicated region for block: B:23:0x008f */
  439. /* JADX WARNING: Removed duplicated region for block: B:235:? A:{SYNTHETIC, RETURN} */
  440. /* JADX WARNING: Removed duplicated region for block: B:30:0x009e A:{SYNTHETIC, Splitter:B:30:0x009e} */
  441. /* JADX WARNING: Removed duplicated region for block: B:56:0x018e A:{SYNTHETIC, Splitter:B:56:0x018e} */
  442. /* JADX WARNING: Removed duplicated region for block: B:193:0x04fb A:{SYNTHETIC, Splitter:B:193:0x04fb} */
  443. /* JADX WARNING: Removed duplicated region for block: B:200:0x051d A:{ExcHandler: all (th java.lang.Throwable), Splitter:B:105:0x02ef} */
  444. /* JADX WARNING: Removed duplicated region for block: B:56:0x018e A:{SYNTHETIC, Splitter:B:56:0x018e} */
  445. /* JADX WARNING: Removed duplicated region for block: B:239:? A:{SYNTHETIC, RETURN} */
  446. /* JADX WARNING: Removed duplicated region for block: B:80:0x0245 A:{SYNTHETIC, Splitter:B:80:0x0245} */
  447. /* JADX WARNING: Removed duplicated region for block: B:90:0x0285 A:{SYNTHETIC, Splitter:B:90:0x0285} */
  448. /* JADX WARNING: Removed duplicated region for block: B:245:? A:{SYNTHETIC, RETURN} */
  449. /* JADX WARNING: Removed duplicated region for block: B:186:0x04d7 A:{SYNTHETIC, Splitter:B:186:0x04d7} */
  450. /* JADX WARNING: Removed duplicated region for block: B:154:0x0426 A:{SYNTHETIC, Splitter:B:154:0x0426} */
  451. /* JADX WARNING: Removed duplicated region for block: B:157:0x042b */
  452. /* JADX WARNING: Removed duplicated region for block: B:120:0x036c A:{SYNTHETIC, Splitter:B:120:0x036c} */
  453. /* JADX WARNING: Removed duplicated region for block: B:129:0x038f A:{SYNTHETIC, Splitter:B:129:0x038f} */
  454. /* JADX WARNING: Removed duplicated region for block: B:241:? A:{SYNTHETIC, RETURN} */
  455. /* JADX WARNING: Failed to process nested try/catch */
  456. /* JADX WARNING: Missing block: B:200:0x051d, code skipped:
  457. r1 = th;
  458. */
  459. /* JADX WARNING: Missing block: B:201:0x051e, code skipped:
  460. r4 = r5;
  461. */
  462. /* JADX WARNING: Missing block: B:202:0x0521, code skipped:
  463. r6 = e;
  464. */
  465. public void run() {
  466. /*
  467. r11 = this;
  468. r6 = 262144; // 0x40000 float:3.67342E-40 double:1.295163E-318;
  469. r2 = 0;
  470. r3 = 0;
  471. r0 = com.android.internal.telephony.TelBrand.IS_DCM;
  472. if (r0 == 0) goto L_0x002f;
  473. L_0x0008:
  474. r0 = java.lang.Runtime.getRuntime();
  475. r0 = r0.freeMemory();
  476. r4 = 524288; // 0x80000 float:7.34684E-40 double:2.590327E-318;
  477. r4 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1));
  478. if (r4 > 0) goto L_0x0030;
  479. L_0x0017:
  480. r2 = "RILJ";
  481. r3 = new java.lang.StringBuilder;
  482. r3.<init>();
  483. r4 = "Deficient freeMemory : ";
  484. r3 = r3.append(r4);
  485. r0 = r3.append(r0);
  486. r0 = r0.toString();
  487. android.telephony.Rlog.e(r2, r0);
  488. L_0x002f:
  489. return;
  490. L_0x0030:
  491. r7 = new byte[r6];
  492. if (r7 != 0) goto L_0x003c;
  493. L_0x0034:
  494. r0 = "RILJ";
  495. r1 = "logcat buffer alloc err";
  496. android.telephony.Rlog.e(r0, r1);
  497. goto L_0x002f;
  498. L_0x003c:
  499. r0 = r11.mAppendString;
  500. if (r0 == 0) goto L_0x02b8;
  501. L_0x0040:
  502. r0 = r11.mRecType;
  503. r1 = r11.mBufType;
  504. r4 = r11.getPrefix(r0, r1);
  505. r0 = r11.mAppendString;
  506. r5 = r0.getBytes();
  507. r6 = r5.length;
  508. r1 = new java.io.FileInputStream; Catch:{ FileNotFoundException -> 0x00eb, IOException -> 0x013b, all -> 0x0555 }
  509. r0 = new java.lang.StringBuilder; Catch:{ FileNotFoundException -> 0x00eb, IOException -> 0x013b, all -> 0x0555 }
  510. r0.<init>(); Catch:{ FileNotFoundException -> 0x00eb, IOException -> 0x013b, all -> 0x0555 }
  511. r8 = "/durable/tmp/";
  512. r0 = r0.append(r8); Catch:{ FileNotFoundException -> 0x00eb, IOException -> 0x013b, all -> 0x0555 }
  513. r0 = r0.append(r4); Catch:{ FileNotFoundException -> 0x00eb, IOException -> 0x013b, all -> 0x0555 }
  514. r0 = r0.toString(); Catch:{ FileNotFoundException -> 0x00eb, IOException -> 0x013b, all -> 0x0555 }
  515. r1.<init>(r0); Catch:{ FileNotFoundException -> 0x00eb, IOException -> 0x013b, all -> 0x0555 }
  516. if (r1 == 0) goto L_0x0070;
  517. L_0x0069:
  518. r0 = 0;
  519. r8 = 262144; // 0x40000 float:3.67342E-40 double:1.295163E-318;
  520. r3 = r1.read(r7, r0, r8); Catch:{ FileNotFoundException -> 0x052e, IOException -> 0x0531, all -> 0x018b }
  521. L_0x0070:
  522. if (r1 == 0) goto L_0x0075;
  523. L_0x0072:
  524. r1.close(); Catch:{ IOException -> 0x00c7 }
  525. L_0x0075:
  526. r1 = new java.io.FileOutputStream; Catch:{ FileNotFoundException -> 0x052a, IOException -> 0x0526, all -> 0x0534 }
  527. r0 = new java.lang.StringBuilder; Catch:{ FileNotFoundException -> 0x052a, IOException -> 0x0526, all -> 0x0534 }
  528. r0.<init>(); Catch:{ FileNotFoundException -> 0x052a, IOException -> 0x0526, all -> 0x0534 }
  529. r8 = "/durable/tmp/";
  530. r0 = r0.append(r8); Catch:{ FileNotFoundException -> 0x052a, IOException -> 0x0526, all -> 0x0534 }
  531. r0 = r0.append(r4); Catch:{ FileNotFoundException -> 0x052a, IOException -> 0x0526, all -> 0x0534 }
  532. r0 = r0.toString(); Catch:{ FileNotFoundException -> 0x052a, IOException -> 0x0526, all -> 0x0534 }
  533. r1.<init>(r0); Catch:{ FileNotFoundException -> 0x052a, IOException -> 0x0526, all -> 0x0534 }
  534. if (r1 == 0) goto L_0x009c;
  535. L_0x008f:
  536. if (r3 > 0) goto L_0x0210;
  537. L_0x0091:
  538. r0 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  539. if (r6 > r0) goto L_0x01b6;
  540. L_0x0095:
  541. r0 = 0;
  542. r1.write(r5, r0, r6); Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  543. L_0x0099:
  544. r1.flush(); Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  545. L_0x009c:
  546. if (r1 == 0) goto L_0x002f;
  547. L_0x009e:
  548. r1.close(); Catch:{ IOException -> 0x00a2 }
  549. goto L_0x002f;
  550. L_0x00a2:
  551. r0 = move-exception;
  552. r1 = "RILJ";
  553. r2 = new java.lang.StringBuilder;
  554. r2.<init>();
  555. r3 = "/durable/tmp/";
  556. r2 = r2.append(r3);
  557. r2 = r2.append(r4);
  558. r3 = " radiolog close err:";
  559. r2 = r2.append(r3);
  560. r0 = r2.append(r0);
  561. r0 = r0.toString();
  562. android.telephony.Rlog.e(r1, r0);
  563. goto L_0x002f;
  564. L_0x00c7:
  565. r0 = move-exception;
  566. r1 = "RILJ";
  567. r8 = new java.lang.StringBuilder;
  568. r8.<init>();
  569. r9 = "/durable/tmp/";
  570. r8 = r8.append(r9);
  571. r8 = r8.append(r4);
  572. r9 = " close err:";
  573. r8 = r8.append(r9);
  574. r0 = r8.append(r0);
  575. r0 = r0.toString();
  576. android.telephony.Rlog.e(r1, r0);
  577. goto L_0x0075;
  578. L_0x00eb:
  579. r0 = move-exception;
  580. r1 = r2;
  581. L_0x00ed:
  582. r8 = "RILJ";
  583. r9 = new java.lang.StringBuilder; Catch:{ all -> 0x0559 }
  584. r9.<init>(); Catch:{ all -> 0x0559 }
  585. r10 = "/durable/tmp/";
  586. r9 = r9.append(r10); Catch:{ all -> 0x0559 }
  587. r9 = r9.append(r4); Catch:{ all -> 0x0559 }
  588. r10 = " open err:";
  589. r9 = r9.append(r10); Catch:{ all -> 0x0559 }
  590. r0 = r9.append(r0); Catch:{ all -> 0x0559 }
  591. r0 = r0.toString(); Catch:{ all -> 0x0559 }
  592. android.telephony.Rlog.w(r8, r0); Catch:{ all -> 0x0559 }
  593. if (r1 == 0) goto L_0x0075;
  594. L_0x0111:
  595. r1.close(); Catch:{ IOException -> 0x0116 }
  596. goto L_0x0075;
  597. L_0x0116:
  598. r0 = move-exception;
  599. r1 = "RILJ";
  600. r8 = new java.lang.StringBuilder;
  601. r8.<init>();
  602. r9 = "/durable/tmp/";
  603. r8 = r8.append(r9);
  604. r8 = r8.append(r4);
  605. r9 = " close err:";
  606. r8 = r8.append(r9);
  607. r0 = r8.append(r0);
  608. r0 = r0.toString();
  609. android.telephony.Rlog.e(r1, r0);
  610. goto L_0x0075;
  611. L_0x013b:
  612. r0 = move-exception;
  613. r1 = r2;
  614. L_0x013d:
  615. r8 = "RILJ";
  616. r9 = new java.lang.StringBuilder; Catch:{ all -> 0x0559 }
  617. r9.<init>(); Catch:{ all -> 0x0559 }
  618. r10 = "/durable/tmp/";
  619. r9 = r9.append(r10); Catch:{ all -> 0x0559 }
  620. r9 = r9.append(r4); Catch:{ all -> 0x0559 }
  621. r10 = " read err:";
  622. r9 = r9.append(r10); Catch:{ all -> 0x0559 }
  623. r0 = r9.append(r0); Catch:{ all -> 0x0559 }
  624. r0 = r0.toString(); Catch:{ all -> 0x0559 }
  625. android.telephony.Rlog.e(r8, r0); Catch:{ all -> 0x0559 }
  626. if (r1 == 0) goto L_0x0075;
  627. L_0x0161:
  628. r1.close(); Catch:{ IOException -> 0x0166 }
  629. goto L_0x0075;
  630. L_0x0166:
  631. r0 = move-exception;
  632. r1 = "RILJ";
  633. r8 = new java.lang.StringBuilder;
  634. r8.<init>();
  635. r9 = "/durable/tmp/";
  636. r8 = r8.append(r9);
  637. r8 = r8.append(r4);
  638. r9 = " close err:";
  639. r8 = r8.append(r9);
  640. r0 = r8.append(r0);
  641. r0 = r0.toString();
  642. android.telephony.Rlog.e(r1, r0);
  643. goto L_0x0075;
  644. L_0x018b:
  645. r0 = move-exception;
  646. L_0x018c:
  647. if (r1 == 0) goto L_0x0191;
  648. L_0x018e:
  649. r1.close(); Catch:{ IOException -> 0x0192 }
  650. L_0x0191:
  651. throw r0;
  652. L_0x0192:
  653. r1 = move-exception;
  654. r2 = "RILJ";
  655. r3 = new java.lang.StringBuilder;
  656. r3.<init>();
  657. r5 = "/durable/tmp/";
  658. r3 = r3.append(r5);
  659. r3 = r3.append(r4);
  660. r4 = " close err:";
  661. r3 = r3.append(r4);
  662. r1 = r3.append(r1);
  663. r1 = r1.toString();
  664. android.telephony.Rlog.e(r2, r1);
  665. goto L_0x0191;
  666. L_0x01b6:
  667. r0 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  668. r0 = r6 - r0;
  669. r2 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  670. r1.write(r5, r0, r2); Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  671. goto L_0x0099;
  672. L_0x01c1:
  673. r0 = move-exception;
  674. L_0x01c2:
  675. r2 = "RILJ";
  676. r3 = new java.lang.StringBuilder; Catch:{ all -> 0x0538 }
  677. r3.<init>(); Catch:{ all -> 0x0538 }
  678. r5 = "/durable/tmp/";
  679. r3 = r3.append(r5); Catch:{ all -> 0x0538 }
  680. r3 = r3.append(r4); Catch:{ all -> 0x0538 }
  681. r5 = " radiolog open err:";
  682. r3 = r3.append(r5); Catch:{ all -> 0x0538 }
  683. r0 = r3.append(r0); Catch:{ all -> 0x0538 }
  684. r0 = r0.toString(); Catch:{ all -> 0x0538 }
  685. android.telephony.Rlog.e(r2, r0); Catch:{ all -> 0x0538 }
  686. if (r1 == 0) goto L_0x002f;
  687. L_0x01e6:
  688. r1.close(); Catch:{ IOException -> 0x01eb }
  689. goto L_0x002f;
  690. L_0x01eb:
  691. r0 = move-exception;
  692. r1 = "RILJ";
  693. r2 = new java.lang.StringBuilder;
  694. r2.<init>();
  695. r3 = "/durable/tmp/";
  696. r2 = r2.append(r3);
  697. r2 = r2.append(r4);
  698. r3 = " radiolog close err:";
  699. r2 = r2.append(r3);
  700. r0 = r2.append(r0);
  701. r0 = r0.toString();
  702. android.telephony.Rlog.e(r1, r0);
  703. goto L_0x002f;
  704. L_0x0210:
  705. r0 = r3 + r6;
  706. r2 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  707. if (r0 > r2) goto L_0x026f;
  708. L_0x0216:
  709. r0 = 0;
  710. r1.write(r7, r0, r3); Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  711. r0 = 0;
  712. r1.write(r5, r0, r6); Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  713. goto L_0x0099;
  714. L_0x0220:
  715. r0 = move-exception;
  716. L_0x0221:
  717. r2 = "RILJ";
  718. r3 = new java.lang.StringBuilder; Catch:{ all -> 0x0538 }
  719. r3.<init>(); Catch:{ all -> 0x0538 }
  720. r5 = "/durable/tmp/";
  721. r3 = r3.append(r5); Catch:{ all -> 0x0538 }
  722. r3 = r3.append(r4); Catch:{ all -> 0x0538 }
  723. r5 = " radiolog write err:";
  724. r3 = r3.append(r5); Catch:{ all -> 0x0538 }
  725. r0 = r3.append(r0); Catch:{ all -> 0x0538 }
  726. r0 = r0.toString(); Catch:{ all -> 0x0538 }
  727. android.telephony.Rlog.e(r2, r0); Catch:{ all -> 0x0538 }
  728. if (r1 == 0) goto L_0x002f;
  729. L_0x0245:
  730. r1.close(); Catch:{ IOException -> 0x024a }
  731. goto L_0x002f;
  732. L_0x024a:
  733. r0 = move-exception;
  734. r1 = "RILJ";
  735. r2 = new java.lang.StringBuilder;
  736. r2.<init>();
  737. r3 = "/durable/tmp/";
  738. r2 = r2.append(r3);
  739. r2 = r2.append(r4);
  740. r3 = " radiolog close err:";
  741. r2 = r2.append(r3);
  742. r0 = r2.append(r0);
  743. r0 = r0.toString();
  744. android.telephony.Rlog.e(r1, r0);
  745. goto L_0x002f;
  746. L_0x026f:
  747. r2 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  748. if (r6 >= r2) goto L_0x0289;
  749. L_0x0273:
  750. r2 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  751. r0 = r0 - r2;
  752. r2 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  753. r2 = r2 - r6;
  754. r1.write(r7, r0, r2); Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  755. r0 = 0;
  756. r1.write(r5, r0, r6); Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  757. goto L_0x0099;
  758. L_0x0282:
  759. r0 = move-exception;
  760. L_0x0283:
  761. if (r1 == 0) goto L_0x0288;
  762. L_0x0285:
  763. r1.close(); Catch:{ IOException -> 0x0294 }
  764. L_0x0288:
  765. throw r0;
  766. L_0x0289:
  767. r0 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  768. r0 = r6 - r0;
  769. r2 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  770. r1.write(r5, r0, r2); Catch:{ FileNotFoundException -> 0x01c1, IOException -> 0x0220, all -> 0x0282 }
  771. goto L_0x0099;
  772. L_0x0294:
  773. r1 = move-exception;
  774. r2 = "RILJ";
  775. r3 = new java.lang.StringBuilder;
  776. r3.<init>();
  777. r5 = "/durable/tmp/";
  778. r3 = r3.append(r5);
  779. r3 = r3.append(r4);
  780. r4 = " radiolog close err:";
  781. r3 = r3.append(r4);
  782. r1 = r3.append(r1);
  783. r1 = r1.toString();
  784. android.telephony.Rlog.e(r2, r1);
  785. goto L_0x0288;
  786. L_0x02b8:
  787. r0 = r11.mBufType; Catch:{ IOException -> 0x0409, all -> 0x044a }
  788. if (r0 != 0) goto L_0x03af;
  789. L_0x02bc:
  790. r0 = java.lang.Runtime.getRuntime(); Catch:{ IOException -> 0x0409, all -> 0x044a }
  791. r1 = 5;
  792. r1 = new java.lang.String[r1]; Catch:{ IOException -> 0x0409, all -> 0x044a }
  793. r4 = 0;
  794. r5 = "logcat";
  795. r1[r4] = r5; Catch:{ IOException -> 0x0409, all -> 0x044a }
  796. r4 = 1;
  797. r5 = "-v";
  798. r1[r4] = r5; Catch:{ IOException -> 0x0409, all -> 0x044a }
  799. r4 = 2;
  800. r5 = "time";
  801. r1[r4] = r5; Catch:{ IOException -> 0x0409, all -> 0x044a }
  802. r4 = 3;
  803. r5 = "-b";
  804. r1[r4] = r5; Catch:{ IOException -> 0x0409, all -> 0x044a }
  805. r4 = 4;
  806. r5 = "main";
  807. r1[r4] = r5; Catch:{ IOException -> 0x0409, all -> 0x044a }
  808. r0 = r0.exec(r1); Catch:{ IOException -> 0x0409, all -> 0x044a }
  809. L_0x02e0:
  810. r5 = new java.io.BufferedInputStream; Catch:{ IOException -> 0x0552, all -> 0x0546 }
  811. r1 = r0.getInputStream(); Catch:{ IOException -> 0x0552, all -> 0x0546 }
  812. r4 = 262144; // 0x40000 float:3.67342E-40 double:1.295163E-318;
  813. r5.<init>(r1, r4); Catch:{ IOException -> 0x0552, all -> 0x0546 }
  814. if (r5 == 0) goto L_0x02fb;
  815. L_0x02ed:
  816. r8 = 60;
  817. android.os.SystemClock.sleep(r8); Catch:{ IOException -> 0x0521, all -> 0x051d }
  818. r1 = r3;
  819. r4 = r3;
  820. L_0x02f4:
  821. r3 = r5.available(); Catch:{ IOException -> 0x053b, all -> 0x051d }
  822. if (r3 > 0) goto L_0x03d5;
  823. L_0x02fa:
  824. r3 = r4;
  825. L_0x02fb:
  826. if (r5 == 0) goto L_0x0300;
  827. L_0x02fd:
  828. r5.close(); Catch:{ IOException -> 0x03ee }
  829. L_0x0300:
  830. if (r0 == 0) goto L_0x0305;
  831. L_0x0302:
  832. r0.destroy();
  833. L_0x0305:
  834. r0 = new java.lang.StringBuilder; Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  835. r0.<init>(); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  836. r1 = "0000";
  837. r0 = r0.append(r1); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  838. r1 = "/durable/tmp/";
  839. r4 = r11.mRecType; Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  840. r5 = r11.mBufType; Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  841. r1 = r11.getRadioLogIndex(r1, r4, r5); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  842. r1 = java.lang.Integer.toString(r1); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  843. r0 = r0.append(r1); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  844. r0 = r0.toString(); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  845. r1 = new java.lang.StringBuilder; Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  846. r1.<init>(); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  847. r4 = r11.mRecType; Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  848. r5 = r11.mBufType; Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  849. r4 = r11.getPrefix(r4, r5); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  850. r1 = r1.append(r4); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  851. r4 = r0.length(); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  852. r5 = "0000";
  853. r5 = r5.length(); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  854. r4 = r4 - r5;
  855. r5 = r0.length(); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  856. r0 = r0.substring(r4, r5); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  857. r0 = r1.append(r0); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  858. r0 = r0.toString(); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  859. r1 = new java.io.FileOutputStream; Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  860. r4 = new java.lang.StringBuilder; Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  861. r4.<init>(); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  862. r5 = "/durable/tmp/";
  863. r4 = r4.append(r5); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  864. r0 = r4.append(r0); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  865. r0 = r0.toString(); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  866. r1.<init>(r0); Catch:{ FileNotFoundException -> 0x0519, IOException -> 0x0543 }
  867. if (r1 == 0) goto L_0x038d;
  868. L_0x036c:
  869. r0 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  870. if (r3 > r0) goto L_0x0475;
  871. L_0x0370:
  872. r0 = 0;
  873. r1.write(r7, r0, r3); Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  874. L_0x0374:
  875. r0 = r11.mStackTrace; Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  876. if (r0 == 0) goto L_0x038a;
  877. L_0x0378:
  878. r0 = "--- Stack Trace Information ---\n";
  879. r0 = r0.getBytes(); Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  880. r1.write(r0); Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  881. r0 = r11.mStackTrace; Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  882. r0 = r0.getBytes(); Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  883. r1.write(r0); Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  884. L_0x038a:
  885. r1.flush(); Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  886. L_0x038d:
  887. if (r1 == 0) goto L_0x002f;
  888. L_0x038f:
  889. r1.close(); Catch:{ IOException -> 0x0394 }
  890. goto L_0x002f;
  891. L_0x0394:
  892. r0 = move-exception;
  893. r1 = "RILJ";
  894. r2 = new java.lang.StringBuilder;
  895. r2.<init>();
  896. r3 = "radiolog close err:";
  897. r2 = r2.append(r3);
  898. r0 = r2.append(r0);
  899. r0 = r0.toString();
  900. android.telephony.Rlog.e(r1, r0);
  901. goto L_0x002f;
  902. L_0x03af:
  903. r0 = java.lang.Runtime.getRuntime(); Catch:{ IOException -> 0x0409, all -> 0x044a }
  904. r1 = 5;
  905. r1 = new java.lang.String[r1]; Catch:{ IOException -> 0x0409, all -> 0x044a }
  906. r4 = 0;
  907. r5 = "logcat";
  908. r1[r4] = r5; Catch:{ IOException -> 0x0409, all -> 0x044a }
  909. r4 = 1;
  910. r5 = "-v";
  911. r1[r4] = r5; Catch:{ IOException -> 0x0409, all -> 0x044a }
  912. r4 = 2;
  913. r5 = "time";
  914. r1[r4] = r5; Catch:{ IOException -> 0x0409, all -> 0x044a }
  915. r4 = 3;
  916. r5 = "-b";
  917. r1[r4] = r5; Catch:{ IOException -> 0x0409, all -> 0x044a }
  918. r4 = 4;
  919. r5 = "radio";
  920. r1[r4] = r5; Catch:{ IOException -> 0x0409, all -> 0x044a }
  921. r0 = r0.exec(r1); Catch:{ IOException -> 0x0409, all -> 0x044a }
  922. goto L_0x02e0;
  923. L_0x03d5:
  924. r3 = r6 - r4;
  925. r3 = r5.read(r7, r4, r3); Catch:{ IOException -> 0x053b, all -> 0x051d }
  926. if (r3 <= 0) goto L_0x055c;
  927. L_0x03dd:
  928. r3 = r3 + r4;
  929. r1 = r1 + 1;
  930. r8 = 30;
  931. android.os.SystemClock.sleep(r8); Catch:{ IOException -> 0x0521, all -> 0x051d }
  932. r4 = 9;
  933. if (r1 > r4) goto L_0x02fb;
  934. L_0x03e9:
  935. if (r3 >= r6) goto L_0x02fb;
  936. L_0x03eb:
  937. r4 = r3;
  938. goto L_0x02f4;
  939. L_0x03ee:
  940. r1 = move-exception;
  941. r4 = "RILJ";
  942. r5 = new java.lang.StringBuilder;
  943. r5.<init>();
  944. r6 = "logcat close err:";
  945. r5 = r5.append(r6);
  946. r1 = r5.append(r1);
  947. r1 = r1.toString();
  948. android.telephony.Rlog.e(r4, r1);
  949. goto L_0x0300;
  950. L_0x0409:
  951. r4 = move-exception;
  952. r0 = r2;
  953. L_0x040b:
  954. r1 = r2;
  955. L_0x040c:
  956. r5 = "RILJ";
  957. r6 = new java.lang.StringBuilder; Catch:{ all -> 0x054c }
  958. r6.<init>(); Catch:{ all -> 0x054c }
  959. r8 = "logcat read err:";
  960. r6 = r6.append(r8); Catch:{ all -> 0x054c }
  961. r4 = r6.append(r4); Catch:{ all -> 0x054c }
  962. r4 = r4.toString(); Catch:{ all -> 0x054c }
  963. android.telephony.Rlog.e(r5, r4); Catch:{ all -> 0x054c }
  964. if (r1 == 0) goto L_0x0429;
  965. L_0x0426:
  966. r1.close(); Catch:{ IOException -> 0x0430 }
  967. L_0x0429:
  968. if (r0 == 0) goto L_0x0305;
  969. L_0x042b:
  970. r0.destroy();
  971. goto L_0x0305;
  972. L_0x0430:
  973. r1 = move-exception;
  974. r4 = "RILJ";
  975. r5 = new java.lang.StringBuilder;
  976. r5.<init>();
  977. r6 = "logcat close err:";
  978. r5 = r5.append(r6);
  979. r1 = r5.append(r1);
  980. r1 = r1.toString();
  981. android.telephony.Rlog.e(r4, r1);
  982. goto L_0x0429;
  983. L_0x044a:
  984. r0 = move-exception;
  985. r3 = r0;
  986. r4 = r2;
  987. r5 = r2;
  988. L_0x044e:
  989. r1 = r3;
  990. r0 = r5;
  991. L_0x0450:
  992. if (r4 == 0) goto L_0x0455;
  993. L_0x0452:
  994. r4.close(); Catch:{ IOException -> 0x045b }
  995. L_0x0455:
  996. if (r0 == 0) goto L_0x045a;
  997. L_0x0457:
  998. r0.destroy();
  999. L_0x045a:
  1000. throw r1;
  1001. L_0x045b:
  1002. r2 = move-exception;
  1003. r3 = "RILJ";
  1004. r4 = new java.lang.StringBuilder;
  1005. r4.<init>();
  1006. r5 = "logcat close err:";
  1007. r4 = r4.append(r5);
  1008. r2 = r4.append(r2);
  1009. r2 = r2.toString();
  1010. android.telephony.Rlog.e(r3, r2);
  1011. goto L_0x0455;
  1012. L_0x0475:
  1013. r0 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  1014. r0 = r3 - r0;
  1015. r2 = r11.mWriteSize; Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  1016. r1.write(r7, r0, r2); Catch:{ FileNotFoundException -> 0x0480, IOException -> 0x04bb, all -> 0x053e }
  1017. goto L_0x0374;
  1018. L_0x0480:
  1019. r0 = move-exception;
  1020. L_0x0481:
  1021. r2 = "RILJ";
  1022. r3 = new java.lang.StringBuilder; Catch:{ all -> 0x0540 }
  1023. r3.<init>(); Catch:{ all -> 0x0540 }
  1024. r4 = "radiolog write err:";
  1025. r3 = r3.append(r4); Catch:{ all -> 0x0540 }
  1026. r0 = r3.append(r0); Catch:{ all -> 0x0540 }
  1027. r0 = r0.toString(); Catch:{ all -> 0x0540 }
  1028. android.telephony.Rlog.e(r2, r0); Catch:{ all -> 0x0540 }
  1029. if (r1 == 0) goto L_0x002f;
  1030. L_0x049b:
  1031. r1.close(); Catch:{ IOException -> 0x04a0 }
  1032. goto L_0x002f;
  1033. L_0x04a0:
  1034. r0 = move-exception;
  1035. r1 = "RILJ";
  1036. r2 = new java.lang.StringBuilder;
  1037. r2.<init>();
  1038. r3 = "radiolog close err:";
  1039. r2 = r2.append(r3);
  1040. r0 = r2.append(r0);
  1041. r0 = r0.toString();
  1042. android.telephony.Rlog.e(r1, r0);
  1043. goto L_0x002f;
  1044. L_0x04bb:
  1045. r0 = move-exception;
  1046. r2 = r1;
  1047. L_0x04bd:
  1048. r1 = "RILJ";
  1049. r3 = new java.lang.StringBuilder; Catch:{ all -> 0x04f7 }
  1050. r3.<init>(); Catch:{ all -> 0x04f7 }
  1051. r4 = "radiolog write err:";
  1052. r3 = r3.append(r4); Catch:{ all -> 0x04f7 }
  1053. r0 = r3.append(r0); Catch:{ all -> 0x04f7 }
  1054. r0 = r0.toString(); Catch:{ all -> 0x04f7 }
  1055. android.telephony.Rlog.e(r1, r0); Catch:{ all -> 0x04f7 }
  1056. if (r2 == 0) goto L_0x002f;
  1057. L_0x04d7:
  1058. r2.close(); Catch:{ IOException -> 0x04dc }
  1059. goto L_0x002f;
  1060. L_0x04dc:
  1061. r0 = move-exception;
  1062. r1 = "RILJ";
  1063. r2 = new java.lang.StringBuilder;
  1064. r2.<init>();
  1065. r3 = "radiolog close err:";
  1066. r2 = r2.append(r3);
  1067. r0 = r2.append(r0);
  1068. r0 = r0.toString();
  1069. android.telephony.Rlog.e(r1, r0);
  1070. goto L_0x002f;
  1071. L_0x04f7:
  1072. r0 = move-exception;
  1073. L_0x04f8:
  1074. r1 = r2;
  1075. L_0x04f9:
  1076. if (r1 == 0) goto L_0x04fe;
  1077. L_0x04fb:
  1078. r1.close(); Catch:{ IOException -> 0x04ff }
  1079. L_0x04fe:
  1080. throw r0;
  1081. L_0x04ff:
  1082. r1 = move-exception;
  1083. r2 = "RILJ";
  1084. r3 = new java.lang.StringBuilder;
  1085. r3.<init>();
  1086. r4 = "radiolog close err:";
  1087. r3 = r3.append(r4);
  1088. r1 = r3.append(r1);
  1089. r1 = r1.toString();
  1090. android.telephony.Rlog.e(r2, r1);
  1091. goto L_0x04fe;
  1092. L_0x0519:
  1093. r0 = move-exception;
  1094. r1 = r2;
  1095. goto L_0x0481;
  1096. L_0x051d:
  1097. r1 = move-exception;
  1098. r4 = r5;
  1099. goto L_0x0450;
  1100. L_0x0521:
  1101. r6 = move-exception;
  1102. L_0x0522:
  1103. r1 = r5;
  1104. r4 = r6;
  1105. goto L_0x040c;
  1106. L_0x0526:
  1107. r0 = move-exception;
  1108. r1 = r2;
  1109. goto L_0x0221;
  1110. L_0x052a:
  1111. r0 = move-exception;
  1112. r1 = r2;
  1113. goto L_0x01c2;
  1114. L_0x052e:
  1115. r0 = move-exception;
  1116. goto L_0x00ed;
  1117. L_0x0531:
  1118. r0 = move-exception;
  1119. goto L_0x013d;
  1120. L_0x0534:
  1121. r0 = move-exception;
  1122. r1 = r2;
  1123. goto L_0x0283;
  1124. L_0x0538:
  1125. r0 = move-exception;
  1126. goto L_0x0283;
  1127. L_0x053b:
  1128. r6 = move-exception;
  1129. r3 = r4;
  1130. goto L_0x0522;
  1131. L_0x053e:
  1132. r0 = move-exception;
  1133. goto L_0x04f9;
  1134. L_0x0540:
  1135. r0 = move-exception;
  1136. r2 = r1;
  1137. goto L_0x04f8;
  1138. L_0x0543:
  1139. r0 = move-exception;
  1140. goto L_0x04bd;
  1141. L_0x0546:
  1142. r1 = move-exception;
  1143. r3 = r1;
  1144. r4 = r2;
  1145. r5 = r0;
  1146. goto L_0x044e;
  1147. L_0x054c:
  1148. r2 = move-exception;
  1149. r3 = r2;
  1150. r4 = r1;
  1151. r5 = r0;
  1152. goto L_0x044e;
  1153. L_0x0552:
  1154. r4 = move-exception;
  1155. goto L_0x040b;
  1156. L_0x0555:
  1157. r0 = move-exception;
  1158. r1 = r2;
  1159. goto L_0x018c;
  1160. L_0x0559:
  1161. r0 = move-exception;
  1162. goto L_0x018c;
  1163. L_0x055c:
  1164. r3 = r4;
  1165. goto L_0x02fb;
  1166. */
  1167. throw new UnsupportedOperationException("Method not decompiled: com.android.internal.telephony.RIL$RILRadioLogWriter.run():void");
  1168. }
  1169.  
  1170. public void setLog(String str) {
  1171. if (TelBrand.IS_DCM) {
  1172. this.mAppendString = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS").format(new Date()) + " : " + str + "\n";
  1173. }
  1174. }
  1175.  
  1176. public void setStackTrace() {
  1177. if (TelBrand.IS_DCM) {
  1178. this.mStackTrace = Log.getStackTraceString(new Throwable());
  1179. }
  1180. }
  1181. }
  1182.  
  1183. class RILReceiver implements Runnable {
  1184. byte[] buffer = new byte[8192];
  1185.  
  1186. RILReceiver() {
  1187. }
  1188.  
  1189. /* JADX WARNING: Removed duplicated region for block: B:52:0x0154 A:{ExcHandler: IOException (r0_16 'e' java.io.IOException), Splitter:B:14:0x0060} */
  1190. /* JADX WARNING: Removed duplicated region for block: B:36:0x00e3 A:{SYNTHETIC, Splitter:B:36:0x00e3} */
  1191. /* JADX WARNING: Removed duplicated region for block: B:45:0x0119 A:{SKIP} */
  1192. /* JADX WARNING: Removed duplicated region for block: B:39:0x00e8 A:{SYNTHETIC, Splitter:B:39:0x00e8} */
  1193. /* JADX WARNING: Failed to process nested try/catch */
  1194. /* JADX WARNING: Missing block: B:52:0x0154, code skipped:
  1195. r0 = move-exception;
  1196. */
  1197. /* JADX WARNING: Missing block: B:54:?, code skipped:
  1198. android.telephony.Rlog.i(com.android.internal.telephony.RIL.RILJ_LOG_TAG, "'" + r4 + "' socket closed", r0);
  1199. */
  1200. /* JADX WARNING: Missing block: B:57:0x0178, code skipped:
  1201. r0 = th;
  1202. */
  1203. /* JADX WARNING: Missing block: B:58:0x0179, code skipped:
  1204. r2 = 0;
  1205. */
  1206. public void run() {
  1207. /*
  1208. r9 = this;
  1209. r3 = 0;
  1210. r8 = 8;
  1211. r1 = 0;
  1212. r0 = r1;
  1213. L_0x0005:
  1214. r2 = com.android.internal.telephony.RIL.this; Catch:{ Throwable -> 0x00bf }
  1215. r2 = r2.mInstanceId; Catch:{ Throwable -> 0x00bf }
  1216. if (r2 == 0) goto L_0x0019;
  1217. L_0x000d:
  1218. r2 = com.android.internal.telephony.RIL.this; Catch:{ Throwable -> 0x00bf }
  1219. r2 = r2.mInstanceId; Catch:{ Throwable -> 0x00bf }
  1220. r2 = r2.intValue(); Catch:{ Throwable -> 0x00bf }
  1221. if (r2 != 0) goto L_0x00ce;
  1222. L_0x0019:
  1223. r2 = com.android.internal.telephony.RIL.SOCKET_NAME_RIL; Catch:{ Throwable -> 0x00bf }
  1224. r4 = 0;
  1225. r2 = r2[r4]; Catch:{ Throwable -> 0x00bf }
  1226. r4 = r2;
  1227. L_0x001f:
  1228. r2 = new android.net.LocalSocket; Catch:{ IOException -> 0x00df }
  1229. r2.<init>(); Catch:{ IOException -> 0x00df }
  1230. r5 = new android.net.LocalSocketAddress; Catch:{ IOException -> 0x01a8 }
  1231. r6 = android.net.LocalSocketAddress.Namespace.RESERVED; Catch:{ IOException -> 0x01a8 }
  1232. r5.<init>(r4, r6); Catch:{ IOException -> 0x01a8 }
  1233. r2.connect(r5); Catch:{ IOException -> 0x01a8 }
  1234. r0 = com.android.internal.telephony.RIL.this; Catch:{ Throwable -> 0x0175 }
  1235. r0.mSocket = r2; Catch:{ Throwable -> 0x0175 }
  1236. r0 = "RILJ";
  1237. r2 = new java.lang.StringBuilder; Catch:{ Throwable -> 0x0175 }
  1238. r2.<init>(); Catch:{ Throwable -> 0x0175 }
  1239. r5 = "(";
  1240. r2 = r2.append(r5); Catch:{ Throwable -> 0x0175 }
  1241. r5 = com.android.internal.telephony.RIL.this; Catch:{ Throwable -> 0x0175 }
  1242. r5 = r5.mInstanceId; Catch:{ Throwable -> 0x0175 }
  1243. r2 = r2.append(r5); Catch:{ Throwable -> 0x0175 }
  1244. r5 = ") Connected to '";
  1245. r2 = r2.append(r5); Catch:{ Throwable -> 0x0175 }
  1246. r2 = r2.append(r4); Catch:{ Throwable -> 0x0175 }
  1247. r5 = "' socket";
  1248. r2 = r2.append(r5); Catch:{ Throwable -> 0x0175 }
  1249. r2 = r2.toString(); Catch:{ Throwable -> 0x0175 }
  1250. android.telephony.Rlog.i(r0, r2); Catch:{ Throwable -> 0x0175 }
  1251. r0 = com.android.internal.telephony.RIL.this; Catch:{ IOException -> 0x0154, Throwable -> 0x0178 }
  1252. r0 = r0.mSocket; Catch:{ IOException -> 0x0154, Throwable -> 0x0178 }
  1253. r0 = r0.getInputStream(); Catch:{ IOException -> 0x0154, Throwable -> 0x0178 }
  1254. r2 = r1;
  1255. L_0x0069:
  1256. r5 = r9.buffer; Catch:{ IOException -> 0x0154, Throwable -> 0x01ae }
  1257. r2 = com.android.internal.telephony.RIL.readRilMessage(r0, r5); Catch:{ IOException -> 0x0154, Throwable -> 0x01ae }
  1258. if (r2 >= 0) goto L_0x013c;
  1259. L_0x0071:
  1260. r0 = "RILJ";
  1261. r2 = new java.lang.StringBuilder; Catch:{ Throwable -> 0x0175 }
  1262. r2.<init>(); Catch:{ Throwable -> 0x0175 }
  1263. r5 = "(";
  1264. r2 = r2.append(r5); Catch:{ Throwable -> 0x0175 }
  1265. r5 = com.android.internal.telephony.RIL.this; Catch:{ Throwable -> 0x0175 }
  1266. r5 = r5.mInstanceId; Catch:{ Throwable -> 0x0175 }
  1267. r2 = r2.append(r5); Catch:{ Throwable -> 0x0175 }
  1268. r5 = ") Disconnected from '";
  1269. r2 = r2.append(r5); Catch:{ Throwable -> 0x0175 }
  1270. r2 = r2.append(r4); Catch:{ Throwable -> 0x0175 }
  1271. r4 = "' socket";
  1272. r2 = r2.append(r4); Catch:{ Throwable -> 0x0175 }
  1273. r2 = r2.toString(); Catch:{ Throwable -> 0x0175 }
  1274. android.telephony.Rlog.i(r0, r2); Catch:{ Throwable -> 0x0175 }
  1275. r0 = com.android.internal.telephony.RIL.this; Catch:{ Throwable -> 0x0175 }
  1276. r2 = com.android.internal.telephony.CommandsInterface.RadioState.RADIO_UNAVAILABLE; Catch:{ Throwable -> 0x0175 }
  1277. r0.setRadioState(r2); Catch:{ Throwable -> 0x0175 }
  1278. r0 = com.android.internal.telephony.RIL.this; Catch:{ IOException -> 0x01ab }
  1279. r0 = r0.mSocket; Catch:{ IOException -> 0x01ab }
  1280. r0.close(); Catch:{ IOException -> 0x01ab }
  1281. L_0x00ad:
  1282. r0 = com.android.internal.telephony.RIL.this; Catch:{ Throwable -> 0x0175 }
  1283. r2 = 0;
  1284. r0.mSocket = r2; Catch:{ Throwable -> 0x0175 }
  1285. com.android.internal.telephony.RILRequest.resetSerial(); Catch:{ Throwable -> 0x0175 }
  1286. r0 = com.android.internal.telephony.RIL.this; Catch:{ Throwable -> 0x0175 }
  1287. r2 = 1;
  1288. r4 = 0;
  1289. r0.clearRequestList(r2, r4); Catch:{ Throwable -> 0x0175 }
  1290. r0 = r1;
  1291. goto L_0x0005;
  1292. L_0x00bf:
  1293. r0 = move-exception;
  1294. L_0x00c0:
  1295. r1 = "RILJ";
  1296. r2 = "Uncaught exception";
  1297. android.telephony.Rlog.e(r1, r2, r0);
  1298. r0 = com.android.internal.telephony.RIL.this;
  1299. r1 = -1;
  1300. r0.notifyRegistrantsRilConnectionChanged(r1);
  1301. return;
  1302. L_0x00ce:
  1303. r2 = com.android.internal.telephony.RIL.SOCKET_NAME_RIL; Catch:{ Throwable -> 0x00bf }
  1304. r4 = com.android.internal.telephony.RIL.this; Catch:{ Throwable -> 0x00bf }
  1305. r4 = r4.mInstanceId; Catch:{ Throwable -> 0x00bf }
  1306. r4 = r4.intValue(); Catch:{ Throwable -> 0x00bf }
  1307. r2 = r2[r4]; Catch:{ Throwable -> 0x00bf }
  1308. r4 = r2;
  1309. goto L_0x001f;
  1310. L_0x00df:
  1311. r2 = move-exception;
  1312. r2 = r3;
  1313. L_0x00e1:
  1314. if (r2 == 0) goto L_0x00e6;
  1315. L_0x00e3:
  1316. r2.close(); Catch:{ IOException -> 0x01a2 }
  1317. L_0x00e6:
  1318. if (r0 != r8) goto L_0x0119;
  1319. L_0x00e8:
  1320. r2 = "RILJ";
  1321. r5 = new java.lang.StringBuilder; Catch:{ Throwable -> 0x00bf }
  1322. r5.<init>(); Catch:{ Throwable -> 0x00bf }
  1323. r6 = "Couldn't find '";
  1324. r5 = r5.append(r6); Catch:{ Throwable -> 0x00bf }
  1325. r4 = r5.append(r4); Catch:{ Throwable -> 0x00bf }
  1326. r5 = "' socket after ";
  1327. r4 = r4.append(r5); Catch:{ Throwable -> 0x00bf }
  1328. r4 = r4.append(r0); Catch:{ Throwable -> 0x00bf }
  1329. r5 = " times, continuing to retry silently";
  1330. r4 = r4.append(r5); Catch:{ Throwable -> 0x00bf }
  1331. r4 = r4.toString(); Catch:{ Throwable -> 0x00bf }
  1332. android.telephony.Rlog.e(r2, r4); Catch:{ Throwable -> 0x00bf }
  1333. L_0x0110:
  1334. r4 = 4000; // 0xfa0 float:5.605E-42 double:1.9763E-320;
  1335. java.lang.Thread.sleep(r4); Catch:{ InterruptedException -> 0x01a5 }
  1336. L_0x0115:
  1337. r0 = r0 + 1;
  1338. goto L_0x0005;
  1339. L_0x0119:
  1340. if (r0 < 0) goto L_0x0110;
  1341. L_0x011b:
  1342. if (r0 >= r8) goto L_0x0110;
  1343. L_0x011d:
  1344. r2 = "RILJ";
  1345. r5 = new java.lang.StringBuilder; Catch:{ Throwable -> 0x00bf }
  1346. r5.<init>(); Catch:{ Throwable -> 0x00bf }
  1347. r6 = "Couldn't find '";
  1348. r5 = r5.append(r6); Catch:{ Throwable -> 0x00bf }
  1349. r4 = r5.append(r4); Catch:{ Throwable -> 0x00bf }
  1350. r5 = "' socket; retrying after timeout";
  1351. r4 = r4.append(r5); Catch:{ Throwable -> 0x00bf }
  1352. r4 = r4.toString(); Catch:{ Throwable -> 0x00bf }
  1353. android.telephony.Rlog.i(r2, r4); Catch:{ Throwable -> 0x00bf }
  1354. goto L_0x0110;
  1355. L_0x013c:
  1356. r5 = android.os.Parcel.obtain(); Catch:{ IOException -> 0x0154, Throwable -> 0x01ae }
  1357. r6 = r9.buffer; Catch:{ IOException -> 0x0154, Throwable -> 0x01ae }
  1358. r7 = 0;
  1359. r5.unmarshall(r6, r7, r2); Catch:{ IOException -> 0x0154, Throwable -> 0x01ae }
  1360. r6 = 0;
  1361. r5.setDataPosition(r6); Catch:{ IOException -> 0x0154, Throwable -> 0x01ae }
  1362. r6 = com.android.internal.telephony.RIL.this; Catch:{ IOException -> 0x0154, Throwable -> 0x01ae }
  1363. r6.processResponse(r5); Catch:{ IOException -> 0x0154, Throwable -> 0x01ae }
  1364. r5.recycle(); Catch:{ IOException -> 0x0154, Throwable -> 0x01ae }
  1365. goto L_0x0069;
  1366. L_0x0154:
  1367. r0 = move-exception;
  1368. r2 = "RILJ";
  1369. r5 = new java.lang.StringBuilder; Catch:{ Throwable -> 0x0175 }
  1370. r5.<init>(); Catch:{ Throwable -> 0x0175 }
  1371. r6 = "'";
  1372. r5 = r5.append(r6); Catch:{ Throwable -> 0x0175 }
  1373. r5 = r5.append(r4); Catch:{ Throwable -> 0x0175 }
  1374. r6 = "' socket closed";
  1375. r5 = r5.append(r6); Catch:{ Throwable -> 0x0175 }
  1376. r5 = r5.toString(); Catch:{ Throwable -> 0x0175 }
  1377. android.telephony.Rlog.i(r2, r5, r0); Catch:{ Throwable -> 0x0175 }
  1378. goto L_0x0071;
  1379. L_0x0175:
  1380. r0 = move-exception;
  1381. goto L_0x00c0;
  1382. L_0x0178:
  1383. r0 = move-exception;
  1384. r2 = r1;
  1385. L_0x017a:
  1386. r5 = "RILJ";
  1387. r6 = new java.lang.StringBuilder; Catch:{ Throwable -> 0x0175 }
  1388. r6.<init>(); Catch:{ Throwable -> 0x0175 }
  1389. r7 = "Uncaught exception read length=";
  1390. r6 = r6.append(r7); Catch:{ Throwable -> 0x0175 }
  1391. r2 = r6.append(r2); Catch:{ Throwable -> 0x0175 }
  1392. r6 = "Exception:";
  1393. r2 = r2.append(r6); Catch:{ Throwable -> 0x0175 }
  1394. r0 = r0.toString(); Catch:{ Throwable -> 0x0175 }
  1395. r0 = r2.append(r0); Catch:{ Throwable -> 0x0175 }
  1396. r0 = r0.toString(); Catch:{ Throwable -> 0x0175 }
  1397. android.telephony.Rlog.e(r5, r0); Catch:{ Throwable -> 0x0175 }
  1398. goto L_0x0071;
  1399. L_0x01a2:
  1400. r2 = move-exception;
  1401. goto L_0x00e6;
  1402. L_0x01a5:
  1403. r2 = move-exception;
  1404. goto L_0x0115;
  1405. L_0x01a8:
  1406. r5 = move-exception;
  1407. goto L_0x00e1;
  1408. L_0x01ab:
  1409. r0 = move-exception;
  1410. goto L_0x00ad;
  1411. L_0x01ae:
  1412. r0 = move-exception;
  1413. goto L_0x017a;
  1414. */
  1415. throw new UnsupportedOperationException("Method not decompiled: com.android.internal.telephony.RIL$RILReceiver.run():void");
  1416. }
  1417. }
  1418.  
  1419. class RILSender extends Handler implements Runnable {
  1420. byte[] dataLength = new byte[4];
  1421.  
  1422. public RILSender(Looper looper) {
  1423. super(looper);
  1424. }
  1425.  
  1426. public void handleMessage(Message message) {
  1427. int i = 0;
  1428. RILRequest rILRequest = (RILRequest) message.obj;
  1429. switch (message.what) {
  1430. case 1:
  1431. try {
  1432. LocalSocket localSocket = RIL.this.mSocket;
  1433. if (localSocket == null) {
  1434. rILRequest.onError(1, null);
  1435. rILRequest.release();
  1436. RIL.this.decrementWakeLock();
  1437. return;
  1438. }
  1439. synchronized (RIL.this.mRequestList) {
  1440. RIL.this.mRequestList.append(rILRequest.mSerial, rILRequest);
  1441. }
  1442. byte[] marshall = rILRequest.mParcel.marshall();
  1443. rILRequest.mParcel.recycle();
  1444. rILRequest.mParcel = null;
  1445. if (marshall.length > 8192) {
  1446. throw new RuntimeException("Parcel larger than max bytes allowed! " + marshall.length);
  1447. }
  1448. byte[] bArr = this.dataLength;
  1449. this.dataLength[1] = (byte) 0;
  1450. bArr[0] = (byte) 0;
  1451. this.dataLength[2] = (byte) ((marshall.length >> 8) & 255);
  1452. this.dataLength[3] = (byte) (marshall.length & 255);
  1453. localSocket.getOutputStream().write(this.dataLength);
  1454. localSocket.getOutputStream().write(marshall);
  1455. return;
  1456. } catch (IOException e) {
  1457. Rlog.e(RIL.RILJ_LOG_TAG, "IOException", e);
  1458. if (RIL.this.findAndRemoveRequestFromList(rILRequest.mSerial) != null) {
  1459. rILRequest.onError(1, null);
  1460. rILRequest.release();
  1461. RIL.this.decrementWakeLock();
  1462. return;
  1463. }
  1464. return;
  1465. } catch (RuntimeException e2) {
  1466. Rlog.e(RIL.RILJ_LOG_TAG, "Uncaught exception ", e2);
  1467. if (RIL.this.findAndRemoveRequestFromList(rILRequest.mSerial) != null) {
  1468. rILRequest.onError(2, null);
  1469. rILRequest.release();
  1470. RIL.this.decrementWakeLock();
  1471. return;
  1472. }
  1473. return;
  1474. }
  1475. case 2:
  1476. synchronized (RIL.this.mRequestList) {
  1477. if (RIL.this.clearWakeLock()) {
  1478. int size = RIL.this.mRequestList.size();
  1479. Rlog.d(RIL.RILJ_LOG_TAG, "WAKE_LOCK_TIMEOUT mRequestList=" + size);
  1480. while (i < size) {
  1481. rILRequest = (RILRequest) RIL.this.mRequestList.valueAt(i);
  1482. Rlog.d(RIL.RILJ_LOG_TAG, i + ": [" + rILRequest.mSerial + "] " + RIL.requestToString(rILRequest.mRequest));
  1483. i++;
  1484. }
  1485. }
  1486. }
  1487. return;
  1488. case 4:
  1489. if (TelBrand.IS_DCM) {
  1490. RIL.this.send(rILRequest);
  1491. return;
  1492. }
  1493. return;
  1494. default:
  1495. return;
  1496. }
  1497. }
  1498.  
  1499. public void run() {
  1500. }
  1501. }
  1502.  
  1503. public final class UnsolOemHookBuffer {
  1504. private byte[] mData;
  1505. private int mRilInstance;
  1506.  
  1507. public UnsolOemHookBuffer(int i, byte[] bArr) {
  1508. this.mRilInstance = i;
  1509. this.mData = bArr;
  1510. }
  1511.  
  1512. public int getRilInstance() {
  1513. return this.mRilInstance;
  1514. }
  1515.  
  1516. public byte[] getUnsolOemHookBuffer() {
  1517. return this.mData;
  1518. }
  1519. }
  1520.  
  1521. public RIL(Context context, int i, int i2) {
  1522. this(context, i, i2, null);
  1523. }
  1524.  
  1525. public RIL(Context context, int i, int i2, Integer num) {
  1526. super(context);
  1527. this.OEMHOOK_UNSOL_SIM_REFRESH = 525304;
  1528. this.OEMHOOK_UNSOL_WWAN_IWLAN_COEXIST = 525306;
  1529. this.mHeaderSize = OEM_IDENTIFIER.length() + 8;
  1530. this.QCRIL_EVT_HOOK_UNSOL_MODEM_CAPABILITY = 525308;
  1531. this.mDefaultDisplayState = 0;
  1532. this.mRequestList = new SparseArray();
  1533. this.mTestingEmergencyCall = new AtomicBoolean(false);
  1534. this.mLimitedService = false;
  1535. this.mRILConnected_UpdateOemDataSettings_OnceSkip = true;
  1536. this.mUpdateOemDataSettings_MobileData = false;
  1537. this.mUpdateOemDataSettings_DataRoaming = false;
  1538. this.mRILConnected_SetInitialAttachApn_OnceSkip = true;
  1539. this.mSetInitialAttachApn_Apn = null;
  1540. this.mSetInitialAttachApn_Protocol = null;
  1541. this.mSetInitialAttachApn_AuthType = -1;
  1542. this.mSetInitialAttachApn_Username = null;
  1543. this.mSetInitialAttachApn_Password = null;
  1544. this.mSetLimitationByChameleon = false;
  1545. this.mLimitationByChameleon = true;
  1546. this.mIntentReceiver = new BroadcastReceiver() {
  1547. public void onReceive(Context context, Intent intent) {
  1548. if (intent.getAction().equals("android.intent.action.SERVICE_STATE")) {
  1549. RIL.this.upDomesticInService(context, intent);
  1550. } else if (TelBrand.IS_DCM && intent.getAction().equals("android.intent.action.ACTION_SHUTDOWN")) {
  1551. Thread thread = new Thread(new RILRadioLogWriter(1, 1));
  1552. if (thread != null) {
  1553. thread.start();
  1554. }
  1555. } else {
  1556. Rlog.w(RIL.RILJ_LOG_TAG, "RIL received unexpected Intent: " + intent.getAction());
  1557. }
  1558. }
  1559. };
  1560. this.mDisplayListener = new DisplayListener() {
  1561. public void onDisplayAdded(int i) {
  1562. }
  1563.  
  1564. public void onDisplayChanged(int i) {
  1565. if (i == 0) {
  1566. RIL.this.updateScreenState();
  1567. }
  1568. }
  1569.  
  1570. public void onDisplayRemoved(int i) {
  1571. }
  1572. };
  1573. riljLog("RIL(context, preferredNetworkType=" + i + " cdmaSubscription=" + i2 + ")");
  1574. this.mContext = context;
  1575. this.mCdmaSubscription = i2;
  1576. this.mPreferredNetworkType = i;
  1577. this.mPhoneType = 0;
  1578. this.mInstanceId = num;
  1579. this.mWakeLock = ((PowerManager) context.getSystemService("power")).newWakeLock(1, RILJ_LOG_TAG);
  1580. this.mWakeLock.setReferenceCounted(false);
  1581. this.mWakeLockTimeout = SystemProperties.getInt("ro.ril.wake_lock_timeout", 60000);
  1582. this.mWakeLockCount = 0;
  1583. this.mSenderThread = new HandlerThread("RILSender" + this.mInstanceId);
  1584. this.mSenderThread.start();
  1585. this.mSender = new RILSender(this.mSenderThread.getLooper());
  1586. if (((ConnectivityManager) context.getSystemService("connectivity")).isNetworkSupported(0)) {
  1587. riljLog("Starting RILReceiver" + this.mInstanceId);
  1588. this.mReceiver = new RILReceiver();
  1589. this.mReceiverThread = new Thread(this.mReceiver, "RILReceiver" + this.mInstanceId);
  1590. this.mReceiverThread.start();
  1591. DisplayManager displayManager = (DisplayManager) context.getSystemService("display");
  1592. this.mDefaultDisplay = displayManager.getDisplay(0);
  1593. displayManager.registerDisplayListener(this.mDisplayListener, null);
  1594. IntentFilter intentFilter = new IntentFilter();
  1595. intentFilter.addAction("android.intent.action.SERVICE_STATE");
  1596. if (TelBrand.IS_DCM && LOG_SD) {
  1597. intentFilter.addAction("android.intent.action.ACTION_SHUTDOWN");
  1598. }
  1599. context.registerReceiver(this.mIntentReceiver, intentFilter);
  1600. } else {
  1601. riljLog("Not starting RILReceiver: wifi-only");
  1602. }
  1603. TelephonyDevController.getInstance();
  1604. TelephonyDevController.registerRIL(this);
  1605. this.mLimitedService = this.mLimitationByChameleon;
  1606. }
  1607.  
  1608. private void acquireWakeLock() {
  1609. synchronized (this.mWakeLock) {
  1610. this.mWakeLock.acquire();
  1611. this.mWakeLockCount++;
  1612. this.mSender.removeMessages(2);
  1613. this.mSender.sendMessageDelayed(this.mSender.obtainMessage(2), (long) this.mWakeLockTimeout);
  1614. }
  1615. }
  1616.  
  1617. private void clearRequestList(int i, boolean z) {
  1618. synchronized (this.mRequestList) {
  1619. int size = this.mRequestList.size();
  1620. if (z) {
  1621. Rlog.d(RILJ_LOG_TAG, "clearRequestList mWakeLockCount=" + this.mWakeLockCount + " mRequestList=" + size);
  1622. }
  1623. for (int i2 = 0; i2 < size; i2++) {
  1624. RILRequest rILRequest = (RILRequest) this.mRequestList.valueAt(i2);
  1625. if (z) {
  1626. Rlog.d(RILJ_LOG_TAG, i2 + ": [" + rILRequest.mSerial + "] " + requestToString(rILRequest.mRequest));
  1627. }
  1628. rILRequest.onError(i, null);
  1629. rILRequest.release();
  1630. decrementWakeLock();
  1631. }
  1632. this.mRequestList.clear();
  1633. }
  1634. }
  1635.  
  1636. private boolean clearWakeLock() {
  1637. synchronized (this.mWakeLock) {
  1638. if (this.mWakeLockCount != 0 || this.mWakeLock.isHeld()) {
  1639. Rlog.d(RILJ_LOG_TAG, "NOTE: mWakeLockCount is " + this.mWakeLockCount + "at time of clearing");
  1640. this.mWakeLockCount = 0;
  1641. this.mWakeLock.release();
  1642. this.mSender.removeMessages(2);
  1643. return true;
  1644. }
  1645. return false;
  1646. }
  1647. }
  1648.  
  1649. private void constructCdmaSendSmsRilRequest(RILRequest rILRequest, byte[] bArr) {
  1650. int i = 0;
  1651. DataInputStream dataInputStream = new DataInputStream(new ByteArrayInputStream(bArr));
  1652. try {
  1653. byte b;
  1654. rILRequest.mParcel.writeInt(dataInputStream.readInt());
  1655. rILRequest.mParcel.writeByte((byte) dataInputStream.readInt());
  1656. rILRequest.mParcel.writeInt(dataInputStream.readInt());
  1657. rILRequest.mParcel.writeInt(dataInputStream.read());
  1658. rILRequest.mParcel.writeInt(dataInputStream.read());
  1659. rILRequest.mParcel.writeInt(dataInputStream.read());
  1660. rILRequest.mParcel.writeInt(dataInputStream.read());
  1661. byte read = (byte) dataInputStream.read();
  1662. rILRequest.mParcel.writeByte((byte) read);
  1663. for (b = (byte) 0; b < read; b++) {
  1664. rILRequest.mParcel.writeByte(dataInputStream.readByte());
  1665. }
  1666. rILRequest.mParcel.writeInt(dataInputStream.read());
  1667. rILRequest.mParcel.writeByte((byte) dataInputStream.read());
  1668. read = (byte) dataInputStream.read();
  1669. rILRequest.mParcel.writeByte((byte) read);
  1670. for (b = (byte) 0; b < read; b++) {
  1671. rILRequest.mParcel.writeByte(dataInputStream.readByte());
  1672. }
  1673. int read2 = dataInputStream.read();
  1674. rILRequest.mParcel.writeInt(read2);
  1675. while (i < read2) {
  1676. rILRequest.mParcel.writeByte(dataInputStream.readByte());
  1677. i++;
  1678. }
  1679. } catch (IOException e) {
  1680. riljLog("sendSmsCdma: conversion from input stream to object failed: " + e);
  1681. }
  1682. }
  1683.  
  1684. private void constructCdmaWriteSmsRilRequest(RILRequest rILRequest, byte[] bArr) {
  1685. ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bArr);
  1686. DataInputStream dataInputStream = new DataInputStream(byteArrayInputStream);
  1687. try {
  1688. byte b;
  1689. int readInt = dataInputStream.readInt();
  1690. rILRequest.mParcel.writeInt(readInt);
  1691. byte readInt2 = (byte) dataInputStream.readInt();
  1692. rILRequest.mParcel.writeByte(readInt2);
  1693. int readInt3 = dataInputStream.readInt();
  1694. rILRequest.mParcel.writeInt(readInt3);
  1695. byte readByte = dataInputStream.readByte();
  1696. rILRequest.mParcel.writeInt(readByte);
  1697. byte readByte2 = dataInputStream.readByte();
  1698. rILRequest.mParcel.writeInt(readByte2);
  1699. byte readByte3 = dataInputStream.readByte();
  1700. rILRequest.mParcel.writeInt(readByte3);
  1701. byte readByte4 = dataInputStream.readByte();
  1702. rILRequest.mParcel.writeInt(readByte4);
  1703. byte readByte5 = dataInputStream.readByte();
  1704. rILRequest.mParcel.writeByte((byte) readByte5);
  1705. for (b = (byte) 0; b < readByte5; b++) {
  1706. rILRequest.mParcel.writeByte(dataInputStream.readByte());
  1707. }
  1708. byte readByte6 = dataInputStream.readByte();
  1709. rILRequest.mParcel.writeInt(readByte6);
  1710. byte readByte7 = dataInputStream.readByte();
  1711. rILRequest.mParcel.writeByte(readByte7);
  1712. byte readByte8 = dataInputStream.readByte();
  1713. rILRequest.mParcel.writeByte((byte) readByte8);
  1714. for (b = (byte) 0; b < readByte8; b++) {
  1715. rILRequest.mParcel.writeByte(dataInputStream.readByte());
  1716. }
  1717. int readByte9 = dataInputStream.readByte() & 255;
  1718. rILRequest.mParcel.writeInt(readByte9);
  1719. for (int i = 0; i < readByte9; i++) {
  1720. rILRequest.mParcel.writeByte(dataInputStream.readByte());
  1721. }
  1722. riljLog(" teleServiceId=" + readInt + " servicePresent=" + readInt2 + " serviceCategory=" + readInt3 + " address_digit_mode=" + readByte + " address_nbr_mode=" + readByte2 + " address_ton=" + readByte3 + " address_nbr_plan=" + readByte4 + " address_nbr_of_digits=" + readByte5 + " subaddressType=" + readByte6 + " subaddr_odd= " + readByte7 + " subaddr_nbr_of_digits=" + readByte8 + " bearerDataLength=" + readByte9);
  1723. if (byteArrayInputStream != null) {
  1724. try {
  1725. byteArrayInputStream.close();
  1726. } catch (IOException e) {
  1727. riljLog("sendSmsCdma: close input stream exception" + e);
  1728. return;
  1729. }
  1730. }
  1731. if (dataInputStream != null) {
  1732. dataInputStream.close();
  1733. }
  1734. } catch (IOException e2) {
  1735. riljLog("sendSmsCdma: conversion from input stream to object failed: " + e2);
  1736. if (byteArrayInputStream != null) {
  1737. try {
  1738. byteArrayInputStream.close();
  1739. } catch (IOException e22) {
  1740. riljLog("sendSmsCdma: close input stream exception" + e22);
  1741. return;
  1742. }
  1743. }
  1744. if (dataInputStream != null) {
  1745. dataInputStream.close();
  1746. }
  1747. } catch (Throwable th) {
  1748. if (byteArrayInputStream != null) {
  1749. try {
  1750. byteArrayInputStream.close();
  1751. } catch (IOException e3) {
  1752. riljLog("sendSmsCdma: close input stream exception" + e3);
  1753. }
  1754. }
  1755. if (dataInputStream != null) {
  1756. dataInputStream.close();
  1757. }
  1758. }
  1759. }
  1760.  
  1761. private void constructGsmSendSmsRilRequest(RILRequest rILRequest, String str, String str2) {
  1762. rILRequest.mParcel.writeInt(2);
  1763. rILRequest.mParcel.writeString(str);
  1764. rILRequest.mParcel.writeString(str2);
  1765. }
  1766.  
  1767. private void decrementWakeLock() {
  1768. synchronized (this.mWakeLock) {
  1769. if (this.mWakeLockCount > 1) {
  1770. this.mWakeLockCount--;
  1771. } else {
  1772. this.mWakeLockCount = 0;
  1773. this.mWakeLock.release();
  1774. this.mSender.removeMessages(2);
  1775. }
  1776. }
  1777. }
  1778.  
  1779. private RILRequest findAndRemoveRequestFromList(int i) {
  1780. RILRequest rILRequest;
  1781. synchronized (this.mRequestList) {
  1782. rILRequest = (RILRequest) this.mRequestList.get(i);
  1783. if (rILRequest != null) {
  1784. this.mRequestList.remove(i);
  1785. }
  1786. }
  1787. return rILRequest;
  1788. }
  1789.  
  1790. private DataCallResponse getDataCallResponse(Parcel parcel, int i) {
  1791. DataCallResponse dataCallResponse = new DataCallResponse();
  1792. dataCallResponse.version = i;
  1793. String readString;
  1794. if (i < 5) {
  1795. dataCallResponse.cid = parcel.readInt();
  1796. dataCallResponse.active = parcel.readInt();
  1797. dataCallResponse.type = parcel.readString();
  1798. readString = parcel.readString();
  1799. if (!TextUtils.isEmpty(readString)) {
  1800. dataCallResponse.addresses = readString.split(" ");
  1801. }
  1802. } else {
  1803. dataCallResponse.status = parcel.readInt();
  1804. dataCallResponse.suggestedRetryTime = parcel.readInt();
  1805. dataCallResponse.cid = parcel.readInt();
  1806. dataCallResponse.active = parcel.readInt();
  1807. dataCallResponse.type = parcel.readString();
  1808. dataCallResponse.ifname = parcel.readString();
  1809. if (dataCallResponse.status == DcFailCause.NONE.getErrorCode() && TextUtils.isEmpty(dataCallResponse.ifname)) {
  1810. throw new RuntimeException("getDataCallResponse, no ifname");
  1811. }
  1812. readString = parcel.readString();
  1813. if (!TextUtils.isEmpty(readString)) {
  1814. dataCallResponse.addresses = readString.split(" ");
  1815. }
  1816. readString = parcel.readString();
  1817. if (!TextUtils.isEmpty(readString)) {
  1818. dataCallResponse.dnses = readString.split(" ");
  1819. }
  1820. readString = parcel.readString();
  1821. if (!TextUtils.isEmpty(readString)) {
  1822. dataCallResponse.gateways = readString.split(" ");
  1823. }
  1824. if (i >= 10) {
  1825. readString = parcel.readString();
  1826. if (!TextUtils.isEmpty(readString)) {
  1827. dataCallResponse.pcscf = readString.split(" ");
  1828. }
  1829. dataCallResponse.mtu = parcel.readInt();
  1830. }
  1831. }
  1832. return dataCallResponse;
  1833. }
  1834.  
  1835. private RadioState getRadioStateFromInt(int i) {
  1836. switch (i) {
  1837. case 0:
  1838. return RadioState.RADIO_OFF;
  1839. case 1:
  1840. return RadioState.RADIO_UNAVAILABLE;
  1841. case 10:
  1842. return RadioState.RADIO_ON;
  1843. default:
  1844. throw new RuntimeException("Unrecognized RIL_RadioState: " + i);
  1845. }
  1846. }
  1847.  
  1848. private void iccTransmitApduHelper(int i, int i2, int i3, int i4, int i5, int i6, int i7, String str, Message message) {
  1849. RILRequest obtain = RILRequest.obtain(i, message);
  1850. obtain.mParcel.writeInt(i2);
  1851. obtain.mParcel.writeInt(i3);
  1852. obtain.mParcel.writeInt(i4);
  1853. obtain.mParcel.writeInt(i5);
  1854. obtain.mParcel.writeInt(i6);
  1855. obtain.mParcel.writeInt(i7);
  1856. obtain.mParcel.writeString(str);
  1857. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  1858. send(obtain);
  1859. }
  1860.  
  1861. public static boolean isDomesticInService() {
  1862. return SystemProperties.getBoolean("gsm.domesticinservice", false);
  1863. }
  1864.  
  1865. private boolean isQcUnsolOemHookResp(ByteBuffer byteBuffer) {
  1866. if (byteBuffer.capacity() < this.mHeaderSize) {
  1867. Rlog.d(RILJ_LOG_TAG, "RIL_UNSOL_OEM_HOOK_RAW data size is " + byteBuffer.capacity());
  1868. } else {
  1869. byte[] bArr = new byte[OEM_IDENTIFIER.length()];
  1870. byteBuffer.get(bArr);
  1871. String str = new String(bArr);
  1872. Rlog.d(RILJ_LOG_TAG, "Oem ID in RIL_UNSOL_OEM_HOOK_RAW is " + str);
  1873. if (str.equals(OEM_IDENTIFIER)) {
  1874. return true;
  1875. }
  1876. }
  1877. return false;
  1878. }
  1879.  
  1880. private void notifyRegistrantsCdmaInfoRec(CdmaInformationRecords cdmaInformationRecords) {
  1881. if (cdmaInformationRecords.record instanceof CdmaDisplayInfoRec) {
  1882. if (this.mDisplayInfoRegistrants != null) {
  1883. unsljLogRet(1027, cdmaInformationRecords.record);
  1884. this.mDisplayInfoRegistrants.notifyRegistrants(new AsyncResult(null, cdmaInformationRecords.record, null));
  1885. }
  1886. } else if (cdmaInformationRecords.record instanceof CdmaSignalInfoRec) {
  1887. if (this.mSignalInfoRegistrants != null) {
  1888. unsljLogRet(1027, cdmaInformationRecords.record);
  1889. this.mSignalInfoRegistrants.notifyRegistrants(new AsyncResult(null, cdmaInformationRecords.record, null));
  1890. }
  1891. } else if (cdmaInformationRecords.record instanceof CdmaNumberInfoRec) {
  1892. if (this.mNumberInfoRegistrants != null) {
  1893. unsljLogRet(1027, cdmaInformationRecords.record);
  1894. this.mNumberInfoRegistrants.notifyRegistrants(new AsyncResult(null, cdmaInformationRecords.record, null));
  1895. }
  1896. } else if (cdmaInformationRecords.record instanceof CdmaRedirectingNumberInfoRec) {
  1897. if (this.mRedirNumInfoRegistrants != null) {
  1898. unsljLogRet(1027, cdmaInformationRecords.record);
  1899. this.mRedirNumInfoRegistrants.notifyRegistrants(new AsyncResult(null, cdmaInformationRecords.record, null));
  1900. }
  1901. } else if (cdmaInformationRecords.record instanceof CdmaLineControlInfoRec) {
  1902. if (this.mLineControlInfoRegistrants != null) {
  1903. unsljLogRet(1027, cdmaInformationRecords.record);
  1904. this.mLineControlInfoRegistrants.notifyRegistrants(new AsyncResult(null, cdmaInformationRecords.record, null));
  1905. }
  1906. } else if (cdmaInformationRecords.record instanceof CdmaT53ClirInfoRec) {
  1907. if (this.mT53ClirInfoRegistrants != null) {
  1908. unsljLogRet(1027, cdmaInformationRecords.record);
  1909. this.mT53ClirInfoRegistrants.notifyRegistrants(new AsyncResult(null, cdmaInformationRecords.record, null));
  1910. }
  1911. } else if ((cdmaInformationRecords.record instanceof CdmaT53AudioControlInfoRec) && this.mT53AudCntrlInfoRegistrants != null) {
  1912. unsljLogRet(1027, cdmaInformationRecords.record);
  1913. this.mT53AudCntrlInfoRegistrants.notifyRegistrants(new AsyncResult(null, cdmaInformationRecords.record, null));
  1914. }
  1915. }
  1916.  
  1917. private void notifyRegistrantsRilConnectionChanged(int i) {
  1918. this.mRilVersion = i;
  1919. if (this.mRilConnectedRegistrants != null) {
  1920. this.mRilConnectedRegistrants.notifyRegistrants(new AsyncResult(null, new Integer(i), null));
  1921. }
  1922. }
  1923.  
  1924. private void processResponse(Parcel parcel) {
  1925. int readInt = parcel.readInt();
  1926. if (readInt == 1) {
  1927. processUnsolicited(parcel);
  1928. } else if (readInt == 0) {
  1929. RILRequest processSolicited = processSolicited(parcel);
  1930. if (processSolicited != null) {
  1931. processSolicited.release();
  1932. decrementWakeLock();
  1933. }
  1934. }
  1935. }
  1936.  
  1937. private RILRequest processSolicited(Parcel parcel) {
  1938. RILRequest rILRequest = null;
  1939. int readInt = parcel.readInt();
  1940. int readInt2 = parcel.readInt();
  1941. RILRequest findAndRemoveRequestFromList = findAndRemoveRequestFromList(readInt);
  1942. if (findAndRemoveRequestFromList == null) {
  1943. Rlog.w(RILJ_LOG_TAG, "Unexpected solicited response! sn: " + readInt + " error: " + readInt2);
  1944. } else {
  1945. Object responseIccCardStatus;
  1946. Thread thread;
  1947. if (readInt2 == 0 || parcel.dataAvail() > 0) {
  1948. try {
  1949. switch (findAndRemoveRequestFromList.mRequest) {
  1950. case 1:
  1951. responseIccCardStatus = responseIccCardStatus(parcel);
  1952. break;
  1953. case 2:
  1954. responseIccCardStatus = responseInts(parcel);
  1955. break;
  1956. case 3:
  1957. responseIccCardStatus = responseInts(parcel);
  1958. break;
  1959. case 4:
  1960. responseIccCardStatus = responseInts(parcel);
  1961. break;
  1962. case 5:
  1963. responseIccCardStatus = responseInts(parcel);
  1964. break;
  1965. case 6:
  1966. responseIccCardStatus = responseInts(parcel);
  1967. break;
  1968. case 7:
  1969. responseIccCardStatus = responseInts(parcel);
  1970. break;
  1971. case 8:
  1972. responseIccCardStatus = responseInts(parcel);
  1973. break;
  1974. case 9:
  1975. responseIccCardStatus = responseCallList(parcel);
  1976. break;
  1977. case 10:
  1978. responseIccCardStatus = responseVoid(parcel);
  1979. break;
  1980. case 11:
  1981. responseIccCardStatus = responseString(parcel);
  1982. break;
  1983. case 12:
  1984. responseIccCardStatus = responseVoid(parcel);
  1985. break;
  1986. case 13:
  1987. responseIccCardStatus = responseVoid(parcel);
  1988. break;
  1989. case 14:
  1990. if (this.mTestingEmergencyCall.getAndSet(false) && this.mEmergencyCallbackModeRegistrant != null) {
  1991. riljLog("testing emergency call, notify ECM Registrants");
  1992. this.mEmergencyCallbackModeRegistrant.notifyRegistrant();
  1993. }
  1994. responseIccCardStatus = responseVoid(parcel);
  1995. break;
  1996. case 15:
  1997. responseIccCardStatus = responseVoid(parcel);
  1998. break;
  1999. case 16:
  2000. responseIccCardStatus = responseVoid(parcel);
  2001. break;
  2002. case 17:
  2003. responseIccCardStatus = responseVoid(parcel);
  2004. break;
  2005. case 18:
  2006. responseIccCardStatus = responseInts(parcel);
  2007. break;
  2008. case 19:
  2009. responseIccCardStatus = responseSignalStrength(parcel);
  2010. break;
  2011. case 20:
  2012. responseIccCardStatus = responseStrings(parcel);
  2013. break;
  2014. case 21:
  2015. responseIccCardStatus = responseStrings(parcel);
  2016. break;
  2017. case 22:
  2018. responseIccCardStatus = responseStrings(parcel);
  2019. break;
  2020. case 23:
  2021. responseIccCardStatus = responseVoid(parcel);
  2022. break;
  2023. case SmsHeader.ELT_ID_STANDARD_WVG_OBJECT /*24*/:
  2024. responseIccCardStatus = responseVoid(parcel);
  2025. break;
  2026. case 25:
  2027. responseIccCardStatus = responseSMS(parcel);
  2028. break;
  2029. case 26:
  2030. responseIccCardStatus = responseSMS(parcel);
  2031. break;
  2032. case OEM_RIL_RDE_Data.RDE_NV_OTKSL_I /*27*/:
  2033. responseIccCardStatus = responseSetupDataCall(parcel);
  2034. break;
  2035. case 28:
  2036. responseIccCardStatus = responseICC_IO(parcel);
  2037. break;
  2038. case IccRecords.EVENT_REFRESH_OEM /*29*/:
  2039. responseIccCardStatus = responseVoid(parcel);
  2040. break;
  2041. case 30:
  2042. responseIccCardStatus = responseVoid(parcel);
  2043. break;
  2044. case 31:
  2045. responseIccCardStatus = responseInts(parcel);
  2046. break;
  2047. case 32:
  2048. responseIccCardStatus = responseVoid(parcel);
  2049. break;
  2050. case 33:
  2051. responseIccCardStatus = responseCallForward(parcel);
  2052. break;
  2053. case 34:
  2054. responseIccCardStatus = responseVoid(parcel);
  2055. break;
  2056. case 35:
  2057. responseIccCardStatus = responseInts(parcel);
  2058. break;
  2059. case 36:
  2060. responseIccCardStatus = responseVoid(parcel);
  2061. break;
  2062. case 37:
  2063. responseIccCardStatus = responseVoid(parcel);
  2064. break;
  2065. case RadioNVItems.RIL_NV_MIP_PROFILE_HA_SPI /*38*/:
  2066. responseIccCardStatus = responseString(parcel);
  2067. break;
  2068. case 39:
  2069. responseIccCardStatus = responseString(parcel);
  2070. break;
  2071. case 40:
  2072. responseIccCardStatus = responseVoid(parcel);
  2073. break;
  2074. case 41:
  2075. responseIccCardStatus = responseVoid(parcel);
  2076. break;
  2077. case 42:
  2078. responseIccCardStatus = responseInts(parcel);
  2079. break;
  2080. case OEM_RIL_RDE_Data.RDE_NV_EHRPD_ENABLED_I /*43*/:
  2081. responseIccCardStatus = responseInts(parcel);
  2082. break;
  2083. case CallFailCause.CHANNEL_NOT_AVAIL /*44*/:
  2084. responseIccCardStatus = responseVoid(parcel);
  2085. break;
  2086. case OEM_RIL_RDE_Data.RDE_NV_CDMA_SO73_ENABLED_I /*45*/:
  2087. responseIccCardStatus = responseInts(parcel);
  2088. break;
  2089. case OEM_RIL_RDE_Data.RDE_NV_DS_MIP_SS_USER_PROF_I /*46*/:
  2090. responseIccCardStatus = responseVoid(parcel);
  2091. break;
  2092. case 47:
  2093. responseIccCardStatus = responseVoid(parcel);
  2094. break;
  2095. case OEM_RIL_RDE_Data.RDE_NV_CDMA_SO68_ENABLED_I /*48*/:
  2096. responseIccCardStatus = responseOperatorInfos(parcel);
  2097. break;
  2098. case 49:
  2099. responseIccCardStatus = responseVoid(parcel);
  2100. break;
  2101. case OEM_RIL_RDE_Data.RDE_NV_MOB_TERM_HOME_I /*50*/:
  2102. responseIccCardStatus = responseVoid(parcel);
  2103. break;
  2104. case 51:
  2105. responseIccCardStatus = responseString(parcel);
  2106. break;
  2107. case 52:
  2108. responseIccCardStatus = responseVoid(parcel);
  2109. break;
  2110. case 53:
  2111. responseIccCardStatus = responseVoid(parcel);
  2112. break;
  2113. case RadioNVItems.RIL_NV_CDMA_SO68 /*54*/:
  2114. responseIccCardStatus = responseInts(parcel);
  2115. break;
  2116. case 55:
  2117. responseIccCardStatus = responseInts(parcel);
  2118. break;
  2119. case 56:
  2120. responseIccCardStatus = responseInts(parcel);
  2121. break;
  2122. case RadioNVItems.RIL_NV_CDMA_1X_ADVANCED_ENABLED /*57*/:
  2123. responseIccCardStatus = responseDataCallList(parcel);
  2124. break;
  2125. case 58:
  2126. responseIccCardStatus = responseVoid(parcel);
  2127. break;
  2128. case RadioNVItems.RIL_NV_CDMA_EHRPD_FORCED /*59*/:
  2129. responseIccCardStatus = responseRaw(parcel);
  2130. break;
  2131. case 60:
  2132. responseIccCardStatus = responseStrings(parcel);
  2133. break;
  2134. case 61:
  2135. responseIccCardStatus = responseVoid(parcel);
  2136. break;
  2137. case 62:
  2138. responseIccCardStatus = responseVoid(parcel);
  2139. break;
  2140. case SignalToneUtil.IS95_CONST_IR_SIG_TONE_NO_TONE /*63*/:
  2141. responseIccCardStatus = responseInts(parcel);
  2142. break;
  2143. case 64:
  2144. responseIccCardStatus = responseVoid(parcel);
  2145. break;
  2146. case 65:
  2147. responseIccCardStatus = responseVoid(parcel);
  2148. break;
  2149. case 66:
  2150. responseIccCardStatus = responseInts(parcel);
  2151. break;
  2152. case 67:
  2153. responseIccCardStatus = responseString(parcel);
  2154. break;
  2155. case 68:
  2156. responseIccCardStatus = responseVoid(parcel);
  2157. break;
  2158. case 69:
  2159. responseIccCardStatus = responseString(parcel);
  2160. break;
  2161. case 70:
  2162. responseIccCardStatus = responseVoid(parcel);
  2163. break;
  2164. case RadioNVItems.RIL_NV_LTE_BAND_ENABLE_25 /*71*/:
  2165. responseIccCardStatus = responseInts(parcel);
  2166. break;
  2167. case 72:
  2168. responseIccCardStatus = responseVoid(parcel);
  2169. break;
  2170. case RadioNVItems.RIL_NV_LTE_BAND_ENABLE_41 /*73*/:
  2171. responseIccCardStatus = responseVoid(parcel);
  2172. break;
  2173. case RadioNVItems.RIL_NV_LTE_SCAN_PRIORITY_25 /*74*/:
  2174. responseIccCardStatus = responseGetPreferredNetworkType(parcel);
  2175. break;
  2176. case RadioNVItems.RIL_NV_LTE_SCAN_PRIORITY_26 /*75*/:
  2177. responseIccCardStatus = responseCellList(parcel);
  2178. break;
  2179. case RadioNVItems.RIL_NV_LTE_SCAN_PRIORITY_41 /*76*/:
  2180. responseIccCardStatus = responseVoid(parcel);
  2181. break;
  2182. case RadioNVItems.RIL_NV_LTE_HIDDEN_BAND_PRIORITY_25 /*77*/:
  2183. responseIccCardStatus = responseVoid(parcel);
  2184. break;
  2185. case RadioNVItems.RIL_NV_LTE_HIDDEN_BAND_PRIORITY_26 /*78*/:
  2186. responseIccCardStatus = responseVoid(parcel);
  2187. break;
  2188. case RadioNVItems.RIL_NV_LTE_HIDDEN_BAND_PRIORITY_41 /*79*/:
  2189. responseIccCardStatus = responseInts(parcel);
  2190. break;
  2191. case RadioNVItems.RIL_NV_LTE_NEXT_SCAN /*80*/:
  2192. responseIccCardStatus = responseVoid(parcel);
  2193. break;
  2194. case RadioNVItems.RIL_NV_LTE_BSR_TIMER /*81*/:
  2195. responseIccCardStatus = responseInts(parcel);
  2196. break;
  2197. case RadioNVItems.RIL_NV_LTE_BSR_MAX_TIME /*82*/:
  2198. responseIccCardStatus = responseVoid(parcel);
  2199. break;
  2200. case 83:
  2201. responseIccCardStatus = responseInts(parcel);
  2202. break;
  2203. case 84:
  2204. responseIccCardStatus = responseVoid(parcel);
  2205. break;
  2206. case 85:
  2207. responseIccCardStatus = responseVoid(parcel);
  2208. break;
  2209. case 86:
  2210. responseIccCardStatus = responseVoid(parcel);
  2211. break;
  2212. case 87:
  2213. responseIccCardStatus = responseSMS(parcel);
  2214. break;
  2215. case 88:
  2216. responseIccCardStatus = responseVoid(parcel);
  2217. break;
  2218. case 89:
  2219. responseIccCardStatus = responseGmsBroadcastConfig(parcel);
  2220. break;
  2221. case 90:
  2222. responseIccCardStatus = responseVoid(parcel);
  2223. break;
  2224. case 91:
  2225. responseIccCardStatus = responseVoid(parcel);
  2226. break;
  2227. case 92:
  2228. responseIccCardStatus = responseCdmaBroadcastConfig(parcel);
  2229. break;
  2230. case 93:
  2231. responseIccCardStatus = responseVoid(parcel);
  2232. break;
  2233. case 94:
  2234. responseIccCardStatus = responseVoid(parcel);
  2235. break;
  2236. case 95:
  2237. responseIccCardStatus = responseStrings(parcel);
  2238. break;
  2239. case CommandsInterface.CDMA_SMS_FAIL_CAUSE_ENCODING_PROBLEM /*96*/:
  2240. responseIccCardStatus = responseInts(parcel);
  2241. break;
  2242. case 97:
  2243. responseIccCardStatus = responseVoid(parcel);
  2244. break;
  2245. case 98:
  2246. responseIccCardStatus = responseStrings(parcel);
  2247. break;
  2248. case 99:
  2249. responseIccCardStatus = responseVoid(parcel);
  2250. break;
  2251. case IccRecords.EVENT_GET_ICC_RECORD_DONE /*100*/:
  2252. responseIccCardStatus = responseString(parcel);
  2253. break;
  2254. case 101:
  2255. responseIccCardStatus = responseVoid(parcel);
  2256. break;
  2257. case 102:
  2258. responseIccCardStatus = responseVoid(parcel);
  2259. break;
  2260. case 103:
  2261. responseIccCardStatus = responseVoid(parcel);
  2262. break;
  2263. case 104:
  2264. responseIccCardStatus = responseInts(parcel);
  2265. break;
  2266. case 105:
  2267. responseIccCardStatus = responseString(parcel);
  2268. break;
  2269. case 106:
  2270. responseIccCardStatus = responseVoid(parcel);
  2271. break;
  2272. case 107:
  2273. responseIccCardStatus = responseICC_IO(parcel);
  2274. break;
  2275. case OEM_RIL_RDE_Data.RDE_NV_ROAMING_LIST_683_I /*108*/:
  2276. responseIccCardStatus = responseInts(parcel);
  2277. break;
  2278. case 109:
  2279. responseIccCardStatus = responseCellInfoList(parcel);
  2280. break;
  2281. case 110:
  2282. responseIccCardStatus = responseVoid(parcel);
  2283. break;
  2284. case 111:
  2285. responseIccCardStatus = responseVoid(parcel);
  2286. break;
  2287. case 112:
  2288. responseIccCardStatus = responseInts(parcel);
  2289. break;
  2290. case 113:
  2291. responseIccCardStatus = responseSMS(parcel);
  2292. break;
  2293. case 114:
  2294. responseIccCardStatus = responseICC_IO(parcel);
  2295. break;
  2296. case 115:
  2297. responseIccCardStatus = responseInts(parcel);
  2298. break;
  2299. case 116:
  2300. responseIccCardStatus = responseVoid(parcel);
  2301. break;
  2302. case 117:
  2303. responseIccCardStatus = responseICC_IO(parcel);
  2304. break;
  2305. case 118:
  2306. responseIccCardStatus = responseString(parcel);
  2307. break;
  2308. case 119:
  2309. responseIccCardStatus = responseVoid(parcel);
  2310. break;
  2311. case 120:
  2312. responseIccCardStatus = responseVoid(parcel);
  2313. break;
  2314. case 121:
  2315. responseIccCardStatus = responseVoid(parcel);
  2316. break;
  2317. case 122:
  2318. responseIccCardStatus = responseVoid(parcel);
  2319. break;
  2320. case 123:
  2321. responseIccCardStatus = responseVoid(parcel);
  2322. break;
  2323. case 124:
  2324. responseIccCardStatus = responseHardwareConfig(parcel);
  2325. break;
  2326. case 125:
  2327. responseIccCardStatus = responseICC_IOBase64(parcel);
  2328. break;
  2329. case 128:
  2330. responseIccCardStatus = responseVoid(parcel);
  2331. break;
  2332. case 129:
  2333. responseIccCardStatus = responseVoid(parcel);
  2334. break;
  2335. case 132:
  2336. responseIccCardStatus = responseGetDataCallProfile(parcel);
  2337. break;
  2338. case 133:
  2339. responseIccCardStatus = responseString(parcel);
  2340. break;
  2341. case 134:
  2342. responseIccCardStatus = responseICC_IO(parcel);
  2343. break;
  2344. case 135:
  2345. responseIccCardStatus = responseInts(parcel);
  2346. break;
  2347. case 136:
  2348. responseIccCardStatus = responseVoid(parcel);
  2349. break;
  2350. case 137:
  2351. responseIccCardStatus = responseICC_IO(parcel);
  2352. break;
  2353. default:
  2354. throw new RuntimeException("Unrecognized solicited response: " + findAndRemoveRequestFromList.mRequest);
  2355. }
  2356. } catch (Throwable th) {
  2357. Rlog.w(RILJ_LOG_TAG, findAndRemoveRequestFromList.serialString() + "< " + requestToString(findAndRemoveRequestFromList.mRequest) + " exception, possible invalid RIL response", th);
  2358. if (findAndRemoveRequestFromList.mResult != null) {
  2359. AsyncResult.forMessage(findAndRemoveRequestFromList.mResult, null, th);
  2360. findAndRemoveRequestFromList.mResult.sendToTarget();
  2361. return findAndRemoveRequestFromList;
  2362. }
  2363. }
  2364. }
  2365. responseIccCardStatus = null;
  2366. if (findAndRemoveRequestFromList.mRequest == 129) {
  2367. riljLog("Response to RIL_REQUEST_SHUTDOWN received. Error is " + readInt2 + " Setting Radio State to Unavailable regardless of error.");
  2368. setRadioState(RadioState.RADIO_UNAVAILABLE);
  2369. }
  2370. switch (findAndRemoveRequestFromList.mRequest) {
  2371. case 3:
  2372. case 5:
  2373. if (this.mIccStatusChangedRegistrants != null) {
  2374. riljLog("ON enter sim puk fakeSimStatusChanged: reg count=" + this.mIccStatusChangedRegistrants.size());
  2375. this.mIccStatusChangedRegistrants.notifyRegistrants();
  2376. break;
  2377. }
  2378. break;
  2379. case OEM_RIL_RDE_Data.RDE_NV_DS_MIP_SS_USER_PROF_I /*46*/:
  2380. case 47:
  2381. if (TelBrand.IS_DCM && LOG_NS) {
  2382. RILRadioLogWriter rILRadioLogWriter = new RILRadioLogWriter(2, 2);
  2383. rILRadioLogWriter.setLog(findAndRemoveRequestFromList.serialString() + "< " + requestToString(findAndRemoveRequestFromList.mRequest) + " error: " + CommandException.fromRilErrno(readInt2));
  2384. Thread thread2 = new Thread(rILRadioLogWriter);
  2385. if (thread2 != null) {
  2386. thread2.start();
  2387. break;
  2388. }
  2389. }
  2390. break;
  2391. case RadioNVItems.RIL_NV_LTE_BAND_ENABLE_41 /*73*/:
  2392. if (TelBrand.IS_DCM && LOG_NW) {
  2393. thread = new Thread(new RILRadioLogWriter(0, 1));
  2394. if (thread != null) {
  2395. thread.start();
  2396. break;
  2397. }
  2398. }
  2399. break;
  2400. }
  2401. if (readInt2 != 0) {
  2402. switch (findAndRemoveRequestFromList.mRequest) {
  2403. case 2:
  2404. case 4:
  2405. case 6:
  2406. case 7:
  2407. case OEM_RIL_RDE_Data.RDE_NV_EHRPD_ENABLED_I /*43*/:
  2408. if (this.mIccStatusChangedRegistrants != null) {
  2409. riljLog("ON some errors fakeSimStatusChanged: reg count=" + this.mIccStatusChangedRegistrants.size());
  2410. this.mIccStatusChangedRegistrants.notifyRegistrants();
  2411. break;
  2412. }
  2413. break;
  2414. case OEM_RIL_RDE_Data.RDE_NV_DS_MIP_SS_USER_PROF_I /*46*/:
  2415. case 47:
  2416. if (TelBrand.IS_DCM && LOG_NS) {
  2417. RILRadioLogWriter rILRadioLogWriter2 = new RILRadioLogWriter(2, 2);
  2418. rILRadioLogWriter2.setLog(findAndRemoveRequestFromList.serialString() + "< " + requestToString(findAndRemoveRequestFromList.mRequest) + " error: " + CommandException.fromRilErrno(readInt2));
  2419. thread = new Thread(rILRadioLogWriter2);
  2420. if (thread != null) {
  2421. thread.start();
  2422. break;
  2423. }
  2424. }
  2425. break;
  2426. case RadioNVItems.RIL_NV_LTE_BAND_ENABLE_41 /*73*/:
  2427. if (TelBrand.IS_DCM && LOG_NW) {
  2428. Thread thread3 = new Thread(new RILRadioLogWriter(0, 1));
  2429. if (thread3 != null) {
  2430. thread3.start();
  2431. break;
  2432. }
  2433. }
  2434. break;
  2435. }
  2436. findAndRemoveRequestFromList.onError(readInt2, responseIccCardStatus);
  2437. return findAndRemoveRequestFromList;
  2438. }
  2439. riljLog(findAndRemoveRequestFromList.serialString() + "< " + requestToString(findAndRemoveRequestFromList.mRequest) + " " + retToString(findAndRemoveRequestFromList.mRequest, responseIccCardStatus));
  2440. if (findAndRemoveRequestFromList.mResult != null) {
  2441. AsyncResult.forMessage(findAndRemoveRequestFromList.mResult, responseIccCardStatus, null);
  2442. findAndRemoveRequestFromList.mResult.sendToTarget();
  2443. return findAndRemoveRequestFromList;
  2444. }
  2445. rILRequest = findAndRemoveRequestFromList;
  2446. }
  2447. return rILRequest;
  2448. }
  2449.  
  2450. private void processUnsolOemhookResponse(ByteBuffer byteBuffer) {
  2451. int i = byteBuffer.getInt();
  2452. Rlog.d(RILJ_LOG_TAG, "Response ID in RIL_UNSOL_OEM_HOOK_RAW is " + i);
  2453. int i2 = byteBuffer.getInt();
  2454. if (i2 < 0) {
  2455. Rlog.e(RILJ_LOG_TAG, "Response Size is Invalid " + i2);
  2456. return;
  2457. }
  2458. byte[] bArr = new byte[i2];
  2459. if (byteBuffer.remaining() == i2) {
  2460. byteBuffer.get(bArr, 0, i2);
  2461. switch (i) {
  2462. case 525304:
  2463. notifySimRefresh(bArr);
  2464. return;
  2465. case 525306:
  2466. notifyWwanIwlanCoexist(bArr);
  2467. return;
  2468. case 525308:
  2469. Rlog.d(RILJ_LOG_TAG, "QCRIL_EVT_HOOK_UNSOL_MODEM_CAPABILITY = mInstanceId" + this.mInstanceId);
  2470. notifyModemCap(bArr, this.mInstanceId);
  2471. return;
  2472. case 592825:
  2473. if (TelBrand.IS_SBM) {
  2474. notifyOemSignalStrength(bArr);
  2475. return;
  2476. }
  2477. return;
  2478. case 592826:
  2479. notifyLteBandInfo(bArr);
  2480. return;
  2481. case 592827:
  2482. if (TelBrand.IS_SBM) {
  2483. notifySpeechCodec(bArr);
  2484. return;
  2485. }
  2486. return;
  2487. default:
  2488. Rlog.d(RILJ_LOG_TAG, "Response ID " + i + " is not served in this process.");
  2489. return;
  2490. }
  2491. }
  2492. Rlog.e(RILJ_LOG_TAG, "Response Size(" + i2 + ") doesnot match remaining bytes(" + byteBuffer.remaining() + ") in the buffer. So, don't process further");
  2493. }
  2494.  
  2495. private void processUnsolicited(Parcel parcel) {
  2496. Object responseVoid;
  2497. int readInt = parcel.readInt();
  2498. switch (readInt) {
  2499. case 1000:
  2500. responseVoid = responseVoid(parcel);
  2501. break;
  2502. case com.android.internal.telephony.cdma.CallFailCause.CDMA_DROP /*1001*/:
  2503. responseVoid = responseVoid(parcel);
  2504. break;
  2505. case com.android.internal.telephony.cdma.CallFailCause.CDMA_INTERCEPT /*1002*/:
  2506. responseVoid = responseVoid(parcel);
  2507. break;
  2508. case com.android.internal.telephony.cdma.CallFailCause.CDMA_REORDER /*1003*/:
  2509. responseVoid = responseString(parcel);
  2510. break;
  2511. case com.android.internal.telephony.cdma.CallFailCause.CDMA_SO_REJECT /*1004*/:
  2512. responseVoid = responseString(parcel);
  2513. break;
  2514. case com.android.internal.telephony.cdma.CallFailCause.CDMA_RETRY_ORDER /*1005*/:
  2515. responseVoid = responseInts(parcel);
  2516. break;
  2517. case com.android.internal.telephony.cdma.CallFailCause.CDMA_ACCESS_FAILURE /*1006*/:
  2518. responseVoid = responseStrings(parcel);
  2519. break;
  2520. case com.android.internal.telephony.cdma.CallFailCause.CDMA_NOT_EMERGENCY /*1008*/:
  2521. responseVoid = responseString(parcel);
  2522. break;
  2523. case com.android.internal.telephony.cdma.CallFailCause.CDMA_ACCESS_BLOCKED /*1009*/:
  2524. responseVoid = responseSignalStrength(parcel);
  2525. break;
  2526. case 1010:
  2527. responseVoid = responseDataCallList(parcel);
  2528. break;
  2529. case 1011:
  2530. responseVoid = responseSuppServiceNotification(parcel);
  2531. break;
  2532. case 1012:
  2533. responseVoid = responseVoid(parcel);
  2534. break;
  2535. case 1013:
  2536. responseVoid = responseString(parcel);
  2537. break;
  2538. case 1014:
  2539. responseVoid = responseString(parcel);
  2540. break;
  2541. case CharacterSets.UTF_16 /*1015*/:
  2542. responseVoid = responseInts(parcel);
  2543. break;
  2544. case 1016:
  2545. responseVoid = responseVoid(parcel);
  2546. break;
  2547. case 1017:
  2548. responseVoid = responseSimRefresh(parcel);
  2549. break;
  2550. case 1018:
  2551. responseVoid = responseCallRing(parcel);
  2552. break;
  2553. case 1019:
  2554. responseVoid = responseVoid(parcel);
  2555. break;
  2556. case 1020:
  2557. responseVoid = responseCdmaSms(parcel);
  2558. break;
  2559. case 1021:
  2560. responseVoid = responseRaw(parcel);
  2561. break;
  2562. case 1022:
  2563. responseVoid = responseVoid(parcel);
  2564. break;
  2565. case 1023:
  2566. responseVoid = responseInts(parcel);
  2567. break;
  2568. case 1024:
  2569. responseVoid = responseVoid(parcel);
  2570. break;
  2571. case 1025:
  2572. responseVoid = responseCdmaCallWaiting(parcel);
  2573. break;
  2574. case 1026:
  2575. responseVoid = responseInts(parcel);
  2576. break;
  2577. case 1027:
  2578. responseVoid = responseCdmaInformationRecord(parcel);
  2579. break;
  2580. case 1028:
  2581. responseVoid = responseRaw(parcel);
  2582. break;
  2583. case 1029:
  2584. responseVoid = responseInts(parcel);
  2585. break;
  2586. case 1030:
  2587. responseVoid = responseVoid(parcel);
  2588. break;
  2589. case 1031:
  2590. responseVoid = responseInts(parcel);
  2591. break;
  2592. case 1032:
  2593. responseVoid = responseInts(parcel);
  2594. break;
  2595. case 1033:
  2596. responseVoid = responseVoid(parcel);
  2597. break;
  2598. case 1034:
  2599. responseVoid = responseInts(parcel);
  2600. break;
  2601. case 1035:
  2602. responseVoid = responseInts(parcel);
  2603. break;
  2604. case 1036:
  2605. responseVoid = responseCellInfoList(parcel);
  2606. break;
  2607. case 1037:
  2608. responseVoid = responseVoid(parcel);
  2609. break;
  2610. case 1038:
  2611. responseVoid = responseInts(parcel);
  2612. break;
  2613. case 1039:
  2614. responseVoid = responseInts(parcel);
  2615. break;
  2616. case 1040:
  2617. responseVoid = responseHardwareConfig(parcel);
  2618. break;
  2619. case 1043:
  2620. responseVoid = responseSsData(parcel);
  2621. break;
  2622. case 1044:
  2623. responseVoid = responseString(parcel);
  2624. break;
  2625. default:
  2626. try {
  2627. throw new RuntimeException("Unrecognized unsol response: " + readInt);
  2628. } catch (Throwable th) {
  2629. Rlog.e(RILJ_LOG_TAG, "Exception processing unsol response: " + readInt + "Exception:" + th.toString());
  2630. return;
  2631. }
  2632. }
  2633. String[] strArr;
  2634. SmsMessage newFromCMT;
  2635. switch (readInt) {
  2636. case 1000:
  2637. RadioState radioStateFromInt = getRadioStateFromInt(parcel.readInt());
  2638. unsljLogMore(readInt, radioStateFromInt.toString());
  2639. switchToRadioState(radioStateFromInt);
  2640. return;
  2641. case com.android.internal.telephony.cdma.CallFailCause.CDMA_DROP /*1001*/:
  2642. unsljLog(readInt);
  2643. this.mCallStateRegistrants.notifyRegistrants(new AsyncResult(null, null, null));
  2644. return;
  2645. case com.android.internal.telephony.cdma.CallFailCause.CDMA_INTERCEPT /*1002*/:
  2646. unsljLog(readInt);
  2647. this.mVoiceNetworkStateRegistrants.notifyRegistrants(new AsyncResult(null, null, null));
  2648. return;
  2649. case com.android.internal.telephony.cdma.CallFailCause.CDMA_REORDER /*1003*/:
  2650. unsljLog(readInt);
  2651. strArr = new String[2];
  2652. strArr[1] = (String) responseVoid;
  2653. newFromCMT = SmsMessage.newFromCMT(strArr);
  2654. if (this.mGsmSmsRegistrant != null) {
  2655. this.mGsmSmsRegistrant.notifyRegistrant(new AsyncResult(null, newFromCMT, null));
  2656. return;
  2657. }
  2658. return;
  2659. case com.android.internal.telephony.cdma.CallFailCause.CDMA_SO_REJECT /*1004*/:
  2660. unsljLogRet(readInt, responseVoid);
  2661. if (this.mSmsStatusRegistrant != null) {
  2662. this.mSmsStatusRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2663. return;
  2664. }
  2665. return;
  2666. case com.android.internal.telephony.cdma.CallFailCause.CDMA_RETRY_ORDER /*1005*/:
  2667. unsljLogRet(readInt, responseVoid);
  2668. int[] iArr = (int[]) responseVoid;
  2669. if (iArr.length != 1) {
  2670. riljLog(" NEW_SMS_ON_SIM ERROR with wrong length " + iArr.length);
  2671. return;
  2672. } else if (this.mSmsOnSimRegistrant != null) {
  2673. this.mSmsOnSimRegistrant.notifyRegistrant(new AsyncResult(null, iArr, null));
  2674. return;
  2675. } else {
  2676. return;
  2677. }
  2678. case com.android.internal.telephony.cdma.CallFailCause.CDMA_ACCESS_FAILURE /*1006*/:
  2679. strArr = (String[]) responseVoid;
  2680. if (strArr.length < 2) {
  2681. strArr = new String[]{((String[]) responseVoid)[0], null};
  2682. }
  2683. unsljLogMore(readInt, strArr[0]);
  2684. if (this.mUSSDRegistrant != null) {
  2685. this.mUSSDRegistrant.notifyRegistrant(new AsyncResult(null, strArr, null));
  2686. return;
  2687. }
  2688. return;
  2689. case com.android.internal.telephony.cdma.CallFailCause.CDMA_NOT_EMERGENCY /*1008*/:
  2690. unsljLogRet(readInt, responseVoid);
  2691. long readLong = parcel.readLong();
  2692. Object[] objArr = new Object[]{responseVoid, Long.valueOf(readLong)};
  2693. if (SystemProperties.getBoolean("telephony.test.ignore.nitz", false)) {
  2694. riljLog("ignoring UNSOL_NITZ_TIME_RECEIVED");
  2695. return;
  2696. }
  2697. if (this.mNITZTimeRegistrant != null) {
  2698. this.mNITZTimeRegistrant.notifyRegistrant(new AsyncResult(null, objArr, null));
  2699. }
  2700. this.mLastNITZTimeInfo = objArr;
  2701. return;
  2702. case com.android.internal.telephony.cdma.CallFailCause.CDMA_ACCESS_BLOCKED /*1009*/:
  2703. if (this.mSignalStrengthRegistrant != null) {
  2704. this.mSignalStrengthRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2705. return;
  2706. }
  2707. return;
  2708. case 1010:
  2709. unsljLogRet(readInt, responseVoid);
  2710. this.mDataNetworkStateRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2711. return;
  2712. case 1011:
  2713. unsljLogRet(readInt, responseVoid);
  2714. if (this.mSsnRegistrant != null) {
  2715. this.mSsnRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2716. return;
  2717. }
  2718. return;
  2719. case 1012:
  2720. unsljLog(readInt);
  2721. if (this.mCatSessionEndRegistrant != null) {
  2722. this.mCatSessionEndRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2723. return;
  2724. }
  2725. return;
  2726. case 1013:
  2727. unsljLog(readInt);
  2728. if (this.mCatProCmdRegistrant != null) {
  2729. this.mCatProCmdRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2730. return;
  2731. }
  2732. return;
  2733. case 1014:
  2734. unsljLog(readInt);
  2735. if (this.mCatEventRegistrant != null) {
  2736. this.mCatEventRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2737. return;
  2738. }
  2739. return;
  2740. case CharacterSets.UTF_16 /*1015*/:
  2741. unsljLogRet(readInt, responseVoid);
  2742. if (this.mCatCallSetUpRegistrant != null) {
  2743. this.mCatCallSetUpRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2744. return;
  2745. }
  2746. return;
  2747. case 1016:
  2748. unsljLog(readInt);
  2749. if (this.mIccSmsFullRegistrant != null) {
  2750. this.mIccSmsFullRegistrant.notifyRegistrant();
  2751. return;
  2752. }
  2753. return;
  2754. case 1017:
  2755. unsljLogRet(readInt, responseVoid);
  2756. if (this.mIccRefreshRegistrants != null) {
  2757. this.mIccRefreshRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2758. return;
  2759. }
  2760. return;
  2761. case 1018:
  2762. unsljLogRet(readInt, responseVoid);
  2763. if (this.mRingRegistrant != null) {
  2764. this.mRingRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2765. return;
  2766. }
  2767. return;
  2768. case 1019:
  2769. unsljLog(readInt);
  2770. if (this.mIccStatusChangedRegistrants != null) {
  2771. this.mIccStatusChangedRegistrants.notifyRegistrants();
  2772. return;
  2773. }
  2774. return;
  2775. case 1020:
  2776. unsljLog(readInt);
  2777. newFromCMT = (SmsMessage) responseVoid;
  2778. if (this.mCdmaSmsRegistrant != null) {
  2779. this.mCdmaSmsRegistrant.notifyRegistrant(new AsyncResult(null, newFromCMT, null));
  2780. return;
  2781. }
  2782. return;
  2783. case 1021:
  2784. unsljLogvRet(readInt, IccUtils.bytesToHexString((byte[]) responseVoid));
  2785. if (this.mGsmBroadcastSmsRegistrant != null) {
  2786. this.mGsmBroadcastSmsRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2787. return;
  2788. }
  2789. return;
  2790. case 1022:
  2791. unsljLog(readInt);
  2792. if (this.mIccSmsFullRegistrant != null) {
  2793. this.mIccSmsFullRegistrant.notifyRegistrant();
  2794. return;
  2795. }
  2796. return;
  2797. case 1023:
  2798. unsljLogvRet(readInt, responseVoid);
  2799. if (this.mRestrictedStateRegistrant != null) {
  2800. this.mRestrictedStateRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2801. return;
  2802. }
  2803. return;
  2804. case 1024:
  2805. unsljLog(readInt);
  2806. if (this.mEmergencyCallbackModeRegistrant != null) {
  2807. this.mEmergencyCallbackModeRegistrant.notifyRegistrant();
  2808. return;
  2809. }
  2810. return;
  2811. case 1025:
  2812. unsljLogRet(readInt, responseVoid);
  2813. if (this.mCallWaitingInfoRegistrants != null) {
  2814. this.mCallWaitingInfoRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2815. return;
  2816. }
  2817. return;
  2818. case 1026:
  2819. unsljLogRet(readInt, responseVoid);
  2820. if (this.mOtaProvisionRegistrants != null) {
  2821. this.mOtaProvisionRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2822. return;
  2823. }
  2824. return;
  2825. case 1027:
  2826. try {
  2827. Iterator it = ((ArrayList) responseVoid).iterator();
  2828. while (it.hasNext()) {
  2829. CdmaInformationRecords cdmaInformationRecords = (CdmaInformationRecords) it.next();
  2830. unsljLogRet(readInt, cdmaInformationRecords);
  2831. notifyRegistrantsCdmaInfoRec(cdmaInformationRecords);
  2832. }
  2833. return;
  2834. } catch (ClassCastException e) {
  2835. Rlog.e(RILJ_LOG_TAG, "Unexpected exception casting to listInfoRecs", e);
  2836. return;
  2837. }
  2838. case 1028:
  2839. unsljLogvRet(readInt, IccUtils.bytesToHexString((byte[]) responseVoid));
  2840. ByteBuffer wrap = ByteBuffer.wrap((byte[]) responseVoid);
  2841. wrap.order(ByteOrder.nativeOrder());
  2842. if (isQcUnsolOemHookResp(wrap)) {
  2843. Rlog.d(RILJ_LOG_TAG, "OEM ID check Passed");
  2844. processUnsolOemhookResponse(wrap);
  2845. return;
  2846. } else if (this.mUnsolOemHookRawRegistrant != null) {
  2847. Rlog.d(RILJ_LOG_TAG, "External OEM message, to be notified");
  2848. this.mUnsolOemHookRawRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2849. return;
  2850. } else {
  2851. return;
  2852. }
  2853. case 1029:
  2854. unsljLogvRet(readInt, responseVoid);
  2855. if (this.mRingbackToneRegistrants != null) {
  2856. this.mRingbackToneRegistrants.notifyRegistrants(new AsyncResult(null, Boolean.valueOf(((int[]) ((int[]) responseVoid))[0] == 1), null));
  2857. return;
  2858. }
  2859. return;
  2860. case 1030:
  2861. unsljLogRet(readInt, responseVoid);
  2862. if (this.mResendIncallMuteRegistrants != null) {
  2863. this.mResendIncallMuteRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2864. return;
  2865. }
  2866. return;
  2867. case 1031:
  2868. unsljLogRet(readInt, responseVoid);
  2869. if (this.mCdmaSubscriptionChangedRegistrants != null) {
  2870. this.mCdmaSubscriptionChangedRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2871. return;
  2872. }
  2873. return;
  2874. case 1032:
  2875. unsljLogRet(readInt, responseVoid);
  2876. if (this.mCdmaPrlChangedRegistrants != null) {
  2877. this.mCdmaPrlChangedRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2878. return;
  2879. }
  2880. return;
  2881. case 1033:
  2882. unsljLogRet(readInt, responseVoid);
  2883. if (this.mExitEmergencyCallbackModeRegistrants != null) {
  2884. this.mExitEmergencyCallbackModeRegistrants.notifyRegistrants(new AsyncResult(null, null, null));
  2885. return;
  2886. }
  2887. return;
  2888. case 1034:
  2889. unsljLogRet(readInt, responseVoid);
  2890. setRadioPower(false, null);
  2891. setCdmaSubscriptionSource(this.mCdmaSubscription, null);
  2892. setCellInfoListRate(Integer.MAX_VALUE, null);
  2893. notifyRegistrantsRilConnectionChanged(((int[]) responseVoid)[0]);
  2894. if (!this.mRILConnected_SetInitialAttachApn_OnceSkip) {
  2895. riljLog("[EXTDBG] RILD crash, call setInitialAttachApn");
  2896. setInitialAttachApn(this.mSetInitialAttachApn_Apn, this.mSetInitialAttachApn_Protocol, this.mSetInitialAttachApn_AuthType, this.mSetInitialAttachApn_Username, this.mSetInitialAttachApn_Password, null);
  2897. }
  2898. if (!this.mRILConnected_UpdateOemDataSettings_OnceSkip) {
  2899. riljLog("[EXTDBG] RILD crash, call updateOemDataSettings");
  2900. updateOemDataSettings(this.mUpdateOemDataSettings_MobileData, this.mUpdateOemDataSettings_DataRoaming, true, null);
  2901. }
  2902. if (this.mSetLimitationByChameleon) {
  2903. setLimitationByChameleon(this.mLimitationByChameleon, null);
  2904. return;
  2905. }
  2906. return;
  2907. case 1035:
  2908. unsljLogRet(readInt, responseVoid);
  2909. if (this.mVoiceRadioTechChangedRegistrants != null) {
  2910. this.mVoiceRadioTechChangedRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2911. return;
  2912. }
  2913. return;
  2914. case 1036:
  2915. unsljLogRet(readInt, responseVoid);
  2916. if (this.mRilCellInfoListRegistrants != null) {
  2917. this.mRilCellInfoListRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2918. return;
  2919. }
  2920. return;
  2921. case 1037:
  2922. unsljLog(readInt);
  2923. this.mImsNetworkStateChangedRegistrants.notifyRegistrants(new AsyncResult(null, null, null));
  2924. return;
  2925. case 1038:
  2926. unsljLogRet(readInt, responseVoid);
  2927. if (this.mSubscriptionStatusRegistrants != null) {
  2928. this.mSubscriptionStatusRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2929. return;
  2930. }
  2931. return;
  2932. case 1039:
  2933. unsljLogRet(readInt, responseVoid);
  2934. if (this.mSrvccStateRegistrants != null) {
  2935. this.mSrvccStateRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2936. return;
  2937. }
  2938. return;
  2939. case 1040:
  2940. unsljLogRet(readInt, responseVoid);
  2941. if (this.mHardwareConfigChangeRegistrants != null) {
  2942. this.mHardwareConfigChangeRegistrants.notifyRegistrants(new AsyncResult(null, responseVoid, null));
  2943. return;
  2944. }
  2945. return;
  2946. case 1043:
  2947. unsljLogRet(readInt, responseVoid);
  2948. if (this.mSsRegistrant != null) {
  2949. this.mSsRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2950. return;
  2951. }
  2952. return;
  2953. case 1044:
  2954. unsljLogRet(readInt, responseVoid);
  2955. if (this.mCatCcAlphaRegistrant != null) {
  2956. this.mCatCcAlphaRegistrant.notifyRegistrant(new AsyncResult(null, responseVoid, null));
  2957. return;
  2958. }
  2959. return;
  2960. default:
  2961. return;
  2962. }
  2963. }
  2964.  
  2965. private static int readRilMessage(InputStream inputStream, byte[] bArr) throws IOException {
  2966. int read;
  2967. int i = 0;
  2968. int i2 = 4;
  2969. int i3 = 0;
  2970. do {
  2971. read = inputStream.read(bArr, i3, i2);
  2972. if (read < 0) {
  2973. Rlog.e(RILJ_LOG_TAG, "Hit EOS reading message length");
  2974. return -1;
  2975. }
  2976. i3 += read;
  2977. i2 -= read;
  2978. } while (i2 > 0);
  2979. i2 = (bArr[3] & 255) | ((((bArr[0] & 255) << 24) | ((bArr[1] & 255) << 16)) | ((bArr[2] & 255) << 8));
  2980. i3 = i2;
  2981. do {
  2982. read = inputStream.read(bArr, i, i3);
  2983. if (read < 0) {
  2984. Rlog.e(RILJ_LOG_TAG, "Hit EOS reading message. messageLength=" + i2 + " remaining=" + i3);
  2985. return -1;
  2986. }
  2987. i += read;
  2988. i3 -= read;
  2989. } while (i3 > 0);
  2990. return i2;
  2991. }
  2992.  
  2993. static String requestToString(int i) {
  2994. switch (i) {
  2995. case 1:
  2996. return "GET_SIM_STATUS";
  2997. case 2:
  2998. return "ENTER_SIM_PIN";
  2999. case 3:
  3000. return "ENTER_SIM_PUK";
  3001. case 4:
  3002. return "ENTER_SIM_PIN2";
  3003. case 5:
  3004. return "ENTER_SIM_PUK2";
  3005. case 6:
  3006. return "CHANGE_SIM_PIN";
  3007. case 7:
  3008. return "CHANGE_SIM_PIN2";
  3009. case 8:
  3010. return "ENTER_DEPERSONALIZATION_CODE";
  3011. case 9:
  3012. return "GET_CURRENT_CALLS";
  3013. case 10:
  3014. return "DIAL";
  3015. case 11:
  3016. return "GET_IMSI";
  3017. case 12:
  3018. return "HANGUP";
  3019. case 13:
  3020. return "HANGUP_WAITING_OR_BACKGROUND";
  3021. case 14:
  3022. return "HANGUP_FOREGROUND_RESUME_BACKGROUND";
  3023. case 15:
  3024. return "REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE";
  3025. case 16:
  3026. return "CONFERENCE";
  3027. case 17:
  3028. return "UDUB";
  3029. case 18:
  3030. return "LAST_CALL_FAIL_CAUSE";
  3031. case 19:
  3032. return "SIGNAL_STRENGTH";
  3033. case 20:
  3034. return "VOICE_REGISTRATION_STATE";
  3035. case 21:
  3036. return "DATA_REGISTRATION_STATE";
  3037. case 22:
  3038. return "OPERATOR";
  3039. case 23:
  3040. return "RADIO_POWER";
  3041. case SmsHeader.ELT_ID_STANDARD_WVG_OBJECT /*24*/:
  3042. return "DTMF";
  3043. case 25:
  3044. return "SEND_SMS";
  3045. case 26:
  3046. return "SEND_SMS_EXPECT_MORE";
  3047. case OEM_RIL_RDE_Data.RDE_NV_OTKSL_I /*27*/:
  3048. return "SETUP_DATA_CALL";
  3049. case 28:
  3050. return "SIM_IO";
  3051. case IccRecords.EVENT_REFRESH_OEM /*29*/:
  3052. return "SEND_USSD";
  3053. case 30:
  3054. return "CANCEL_USSD";
  3055. case 31:
  3056. return "GET_CLIR";
  3057. case 32:
  3058. return "SET_CLIR";
  3059. case 33:
  3060. return "QUERY_CALL_FORWARD_STATUS";
  3061. case 34:
  3062. return "SET_CALL_FORWARD";
  3063. case 35:
  3064. return "QUERY_CALL_WAITING";
  3065. case 36:
  3066. return "SET_CALL_WAITING";
  3067. case 37:
  3068. return "SMS_ACKNOWLEDGE";
  3069. case RadioNVItems.RIL_NV_MIP_PROFILE_HA_SPI /*38*/:
  3070. return "GET_IMEI";
  3071. case 39:
  3072. return "GET_IMEISV";
  3073. case 40:
  3074. return "ANSWER";
  3075. case 41:
  3076. return "DEACTIVATE_DATA_CALL";
  3077. case 42:
  3078. return "QUERY_FACILITY_LOCK";
  3079. case OEM_RIL_RDE_Data.RDE_NV_EHRPD_ENABLED_I /*43*/:
  3080. return "SET_FACILITY_LOCK";
  3081. case CallFailCause.CHANNEL_NOT_AVAIL /*44*/:
  3082. return "CHANGE_BARRING_PASSWORD";
  3083. case OEM_RIL_RDE_Data.RDE_NV_CDMA_SO73_ENABLED_I /*45*/:
  3084. return "QUERY_NETWORK_SELECTION_MODE";
  3085. case OEM_RIL_RDE_Data.RDE_NV_DS_MIP_SS_USER_PROF_I /*46*/:
  3086. return "SET_NETWORK_SELECTION_AUTOMATIC";
  3087. case 47:
  3088. return "SET_NETWORK_SELECTION_MANUAL";
  3089. case OEM_RIL_RDE_Data.RDE_NV_CDMA_SO68_ENABLED_I /*48*/:
  3090. return "QUERY_AVAILABLE_NETWORKS ";
  3091. case 49:
  3092. return "DTMF_START";
  3093. case OEM_RIL_RDE_Data.RDE_NV_MOB_TERM_HOME_I /*50*/:
  3094. return "DTMF_STOP";
  3095. case 51:
  3096. return "BASEBAND_VERSION";
  3097. case 52:
  3098. return "SEPARATE_CONNECTION";
  3099. case 53:
  3100. return "SET_MUTE";
  3101. case RadioNVItems.RIL_NV_CDMA_SO68 /*54*/:
  3102. return "GET_MUTE";
  3103. case 55:
  3104. return "QUERY_CLIP";
  3105. case 56:
  3106. return "LAST_DATA_CALL_FAIL_CAUSE";
  3107. case RadioNVItems.RIL_NV_CDMA_1X_ADVANCED_ENABLED /*57*/:
  3108. return "DATA_CALL_LIST";
  3109. case 58:
  3110. return "RESET_RADIO";
  3111. case RadioNVItems.RIL_NV_CDMA_EHRPD_FORCED /*59*/:
  3112. return "OEM_HOOK_RAW";
  3113. case 60:
  3114. return "OEM_HOOK_STRINGS";
  3115. case 61:
  3116. return "SCREEN_STATE";
  3117. case 62:
  3118. return "SET_SUPP_SVC_NOTIFICATION";
  3119. case SignalToneUtil.IS95_CONST_IR_SIG_TONE_NO_TONE /*63*/:
  3120. return "WRITE_SMS_TO_SIM";
  3121. case 64:
  3122. return "DELETE_SMS_ON_SIM";
  3123. case 65:
  3124. return "SET_BAND_MODE";
  3125. case 66:
  3126. return "QUERY_AVAILABLE_BAND_MODE";
  3127. case 67:
  3128. return "REQUEST_STK_GET_PROFILE";
  3129. case 68:
  3130. return "REQUEST_STK_SET_PROFILE";
  3131. case 69:
  3132. return "REQUEST_STK_SEND_ENVELOPE_COMMAND";
  3133. case 70:
  3134. return "REQUEST_STK_SEND_TERMINAL_RESPONSE";
  3135. case RadioNVItems.RIL_NV_LTE_BAND_ENABLE_25 /*71*/:
  3136. return "REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM";
  3137. case 72:
  3138. return "REQUEST_EXPLICIT_CALL_TRANSFER";
  3139. case RadioNVItems.RIL_NV_LTE_BAND_ENABLE_41 /*73*/:
  3140. return "REQUEST_SET_PREFERRED_NETWORK_TYPE";
  3141. case RadioNVItems.RIL_NV_LTE_SCAN_PRIORITY_25 /*74*/:
  3142. return "REQUEST_GET_PREFERRED_NETWORK_TYPE";
  3143. case RadioNVItems.RIL_NV_LTE_SCAN_PRIORITY_26 /*75*/:
  3144. return "REQUEST_GET_NEIGHBORING_CELL_IDS";
  3145. case RadioNVItems.RIL_NV_LTE_SCAN_PRIORITY_41 /*76*/:
  3146. return "REQUEST_SET_LOCATION_UPDATES";
  3147. case RadioNVItems.RIL_NV_LTE_HIDDEN_BAND_PRIORITY_25 /*77*/:
  3148. return "RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE";
  3149. case RadioNVItems.RIL_NV_LTE_HIDDEN_BAND_PRIORITY_26 /*78*/:
  3150. return "RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE";
  3151. case RadioNVItems.RIL_NV_LTE_HIDDEN_BAND_PRIORITY_41 /*79*/:
  3152. return "RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE";
  3153. case RadioNVItems.RIL_NV_LTE_NEXT_SCAN /*80*/:
  3154. return "RIL_REQUEST_SET_TTY_MODE";
  3155. case RadioNVItems.RIL_NV_LTE_BSR_TIMER /*81*/:
  3156. return "RIL_REQUEST_QUERY_TTY_MODE";
  3157. case RadioNVItems.RIL_NV_LTE_BSR_MAX_TIME /*82*/:
  3158. return "RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE";
  3159. case 83:
  3160. return "RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE";
  3161. case 84:
  3162. return "RIL_REQUEST_CDMA_FLASH";
  3163. case 85:
  3164. return "RIL_REQUEST_CDMA_BURST_DTMF";
  3165. case 86:
  3166. return "RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY";
  3167. case 87:
  3168. return "RIL_REQUEST_CDMA_SEND_SMS";
  3169. case 88:
  3170. return "RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE";
  3171. case 89:
  3172. return "RIL_REQUEST_GSM_GET_BROADCAST_CONFIG";
  3173. case 90:
  3174. return "RIL_REQUEST_GSM_SET_BROADCAST_CONFIG";
  3175. case 91:
  3176. return "RIL_REQUEST_GSM_BROADCAST_ACTIVATION";
  3177. case 92:
  3178. return "RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG";
  3179. case 93:
  3180. return "RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG";
  3181. case 94:
  3182. return "RIL_REQUEST_CDMA_BROADCAST_ACTIVATION";
  3183. case 95:
  3184. return "RIL_REQUEST_CDMA_SUBSCRIPTION";
  3185. case CommandsInterface.CDMA_SMS_FAIL_CAUSE_ENCODING_PROBLEM /*96*/:
  3186. return "RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM";
  3187. case 97:
  3188. return "RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM";
  3189. case 98:
  3190. return "RIL_REQUEST_DEVICE_IDENTITY";
  3191. case 99:
  3192. return "REQUEST_EXIT_EMERGENCY_CALLBACK_MODE";
  3193. case IccRecords.EVENT_GET_ICC_RECORD_DONE /*100*/:
  3194. return "RIL_REQUEST_GET_SMSC_ADDRESS";
  3195. case 101:
  3196. return "RIL_REQUEST_SET_SMSC_ADDRESS";
  3197. case 102:
  3198. return "RIL_REQUEST_REPORT_SMS_MEMORY_STATUS";
  3199. case 103:
  3200. return "RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING";
  3201. case 104:
  3202. return "RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE";
  3203. case 105:
  3204. return "RIL_REQUEST_ISIM_AUTHENTICATION";
  3205. case 106:
  3206. return "RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU";
  3207. case 107:
  3208. return "RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS";
  3209. case OEM_RIL_RDE_Data.RDE_NV_ROAMING_LIST_683_I /*108*/:
  3210. return "RIL_REQUEST_VOICE_RADIO_TECH";
  3211. case 109:
  3212. return "RIL_REQUEST_GET_CELL_INFO_LIST";
  3213. case 110:
  3214. return "RIL_REQUEST_SET_CELL_INFO_LIST_RATE";
  3215. case 111:
  3216. return "RIL_REQUEST_SET_INITIAL_ATTACH_APN";
  3217. case 112:
  3218. return "RIL_REQUEST_IMS_REGISTRATION_STATE";
  3219. case 113:
  3220. return "RIL_REQUEST_IMS_SEND_SMS";
  3221. case 114:
  3222. return "RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC";
  3223. case 115:
  3224. return "RIL_REQUEST_SIM_OPEN_CHANNEL";
  3225. case 116:
  3226. return "RIL_REQUEST_SIM_CLOSE_CHANNEL";
  3227. case 117:
  3228. return "RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL";
  3229. case 118:
  3230. return "RIL_REQUEST_NV_READ_ITEM";
  3231. case 119:
  3232. return "RIL_REQUEST_NV_WRITE_ITEM";
  3233. case 120:
  3234. return "RIL_REQUEST_NV_WRITE_CDMA_PRL";
  3235. case 121:
  3236. return "RIL_REQUEST_NV_RESET_CONFIG";
  3237. case 122:
  3238. return "RIL_REQUEST_SET_UICC_SUBSCRIPTION";
  3239. case 123:
  3240. return "RIL_REQUEST_ALLOW_DATA";
  3241. case 124:
  3242. return "GET_HARDWARE_CONFIG";
  3243. case 125:
  3244. return "RIL_REQUEST_SIM_AUTHENTICATION";
  3245. case 128:
  3246. return "RIL_REQUEST_SET_DATA_PROFILE";
  3247. case 129:
  3248. return "RIL_REQUEST_SHUTDOWN";
  3249. case 132:
  3250. return "RIL_REQUEST_GET_DATA_CALL_PROFILE";
  3251. case 133:
  3252. return "SIM_GET_ATR";
  3253. case 134:
  3254. return "SIM_TRANSMIT_BASIC_SHARP";
  3255. case 135:
  3256. return "SIM_OPEN_CHANNEL_SHARP";
  3257. case 136:
  3258. return "SIM_CLOSE_CHANNEL_SHARP";
  3259. case 137:
  3260. return "SIM_TRANSMIT_CHANNEL_SHARP";
  3261. default:
  3262. return "<unknown request>";
  3263. }
  3264. }
  3265.  
  3266. private Object responseCallForward(Parcel parcel) {
  3267. int readInt = parcel.readInt();
  3268. CallForwardInfo[] callForwardInfoArr = new CallForwardInfo[readInt];
  3269. for (int i = 0; i < readInt; i++) {
  3270. callForwardInfoArr[i] = new CallForwardInfo();
  3271. callForwardInfoArr[i].status = parcel.readInt();
  3272. callForwardInfoArr[i].reason = parcel.readInt();
  3273. callForwardInfoArr[i].serviceClass = parcel.readInt();
  3274. callForwardInfoArr[i].toa = parcel.readInt();
  3275. callForwardInfoArr[i].number = parcel.readString();
  3276. callForwardInfoArr[i].timeSeconds = parcel.readInt();
  3277. }
  3278. return callForwardInfoArr;
  3279. }
  3280.  
  3281. private Object responseCallList(Parcel parcel) {
  3282. int readInt = parcel.readInt();
  3283. ArrayList arrayList = new ArrayList(readInt);
  3284. for (int i = 0; i < readInt; i++) {
  3285. DriverCall driverCall = new DriverCall();
  3286. driverCall.state = DriverCall.stateFromCLCC(parcel.readInt());
  3287. driverCall.index = parcel.readInt();
  3288. driverCall.TOA = parcel.readInt();
  3289. driverCall.isMpty = parcel.readInt() != 0;
  3290. driverCall.isMT = parcel.readInt() != 0;
  3291. driverCall.als = parcel.readInt();
  3292. driverCall.isVoice = parcel.readInt() != 0;
  3293. driverCall.isVoicePrivacy = parcel.readInt() != 0;
  3294. driverCall.number = parcel.readString();
  3295. driverCall.numberPresentation = DriverCall.presentationFromCLIP(parcel.readInt());
  3296. driverCall.name = parcel.readString();
  3297. driverCall.namePresentation = DriverCall.presentationFromCLIP(parcel.readInt());
  3298. if (parcel.readInt() == 1) {
  3299. driverCall.uusInfo = new UUSInfo();
  3300. driverCall.uusInfo.setType(parcel.readInt());
  3301. driverCall.uusInfo.setDcs(parcel.readInt());
  3302. driverCall.uusInfo.setUserData(parcel.createByteArray());
  3303. riljLogv(String.format("Incoming UUS : type=%d, dcs=%d, length=%d", new Object[]{Integer.valueOf(driverCall.uusInfo.getType()), Integer.valueOf(driverCall.uusInfo.getDcs()), Integer.valueOf(driverCall.uusInfo.getUserData().length)}));
  3304. riljLogv("Incoming UUS : data (string)=" + new String(driverCall.uusInfo.getUserData()));
  3305. riljLogv("Incoming UUS : data (hex): " + IccUtils.bytesToHexString(driverCall.uusInfo.getUserData()));
  3306. } else {
  3307. riljLogv("Incoming UUS : NOT present!");
  3308. }
  3309. driverCall.number = PhoneNumberUtils.stringFromStringAndTOA(driverCall.number, driverCall.TOA);
  3310. arrayList.add(driverCall);
  3311. if (driverCall.isVoicePrivacy) {
  3312. this.mVoicePrivacyOnRegistrants.notifyRegistrants();
  3313. riljLog("InCall VoicePrivacy is enabled");
  3314. } else {
  3315. this.mVoicePrivacyOffRegistrants.notifyRegistrants();
  3316. riljLog("InCall VoicePrivacy is disabled");
  3317. }
  3318. }
  3319. Collections.sort(arrayList);
  3320. if (readInt == 0 && this.mTestingEmergencyCall.getAndSet(false) && this.mEmergencyCallbackModeRegistrant != null) {
  3321. riljLog("responseCallList: call ended, testing emergency call, notify ECM Registrants");
  3322. this.mEmergencyCallbackModeRegistrant.notifyRegistrant();
  3323. }
  3324. return arrayList;
  3325. }
  3326.  
  3327. private Object responseCallRing(Parcel parcel) {
  3328. return new char[]{(char) parcel.readInt(), (char) parcel.readInt(), (char) parcel.readInt(), (char) parcel.readInt()};
  3329. }
  3330.  
  3331. private Object responseCdmaBroadcastConfig(Parcel parcel) {
  3332. Object obj;
  3333. int i = 1;
  3334. int readInt = parcel.readInt();
  3335. if (readInt == 0) {
  3336. obj = new int[94];
  3337. obj[0] = 31;
  3338. for (readInt = 1; readInt < 94; readInt += 3) {
  3339. obj[readInt + 0] = readInt / 3;
  3340. obj[readInt + 1] = 1;
  3341. obj[readInt + 2] = null;
  3342. }
  3343. } else {
  3344. int i2 = (readInt * 3) + 1;
  3345. obj = new int[i2];
  3346. obj[0] = readInt;
  3347. while (i < i2) {
  3348. obj[i] = parcel.readInt();
  3349. i++;
  3350. }
  3351. }
  3352. return obj;
  3353. }
  3354.  
  3355. private Object responseCdmaCallWaiting(Parcel parcel) {
  3356. CdmaCallWaitingNotification cdmaCallWaitingNotification = new CdmaCallWaitingNotification();
  3357. cdmaCallWaitingNotification.number = parcel.readString();
  3358. cdmaCallWaitingNotification.numberPresentation = CdmaCallWaitingNotification.presentationFromCLIP(parcel.readInt());
  3359. cdmaCallWaitingNotification.name = parcel.readString();
  3360. cdmaCallWaitingNotification.namePresentation = cdmaCallWaitingNotification.numberPresentation;
  3361. cdmaCallWaitingNotification.isPresent = parcel.readInt();
  3362. cdmaCallWaitingNotification.signalType = parcel.readInt();
  3363. cdmaCallWaitingNotification.alertPitch = parcel.readInt();
  3364. cdmaCallWaitingNotification.signal = parcel.readInt();
  3365. cdmaCallWaitingNotification.numberType = parcel.readInt();
  3366. cdmaCallWaitingNotification.numberPlan = parcel.readInt();
  3367. return cdmaCallWaitingNotification;
  3368. }
  3369.  
  3370. private ArrayList<CdmaInformationRecords> responseCdmaInformationRecord(Parcel parcel) {
  3371. int readInt = parcel.readInt();
  3372. ArrayList arrayList = new ArrayList(readInt);
  3373. for (int i = 0; i < readInt; i++) {
  3374. arrayList.add(new CdmaInformationRecords(parcel));
  3375. }
  3376. return arrayList;
  3377. }
  3378.  
  3379. private Object responseCdmaSms(Parcel parcel) {
  3380. return SmsMessage.newFromParcel(parcel);
  3381. }
  3382.  
  3383. private ArrayList<CellInfo> responseCellInfoList(Parcel parcel) {
  3384. int readInt = parcel.readInt();
  3385. ArrayList arrayList = new ArrayList(readInt);
  3386. for (int i = 0; i < readInt; i++) {
  3387. arrayList.add((CellInfo) CellInfo.CREATOR.createFromParcel(parcel));
  3388. }
  3389. return arrayList;
  3390. }
  3391.  
  3392. private Object responseCellList(Parcel parcel) {
  3393. int readInt = parcel.readInt();
  3394. ArrayList arrayList = new ArrayList();
  3395. int dataNetworkType = ((TelephonyManager) this.mContext.getSystemService("phone")).getDataNetworkType(SubscriptionManager.getSubId(this.mInstanceId.intValue())[0]);
  3396. if (dataNetworkType != 0) {
  3397. for (int i = 0; i < readInt; i++) {
  3398. arrayList.add(new NeighboringCellInfo(parcel.readInt(), parcel.readString(), dataNetworkType));
  3399. }
  3400. }
  3401. return arrayList;
  3402. }
  3403.  
  3404. private Object responseDataCallList(Parcel parcel) {
  3405. int readInt = parcel.readInt();
  3406. int readInt2 = parcel.readInt();
  3407. riljLog("responseDataCallList ver=" + readInt + " num=" + readInt2);
  3408. ArrayList arrayList = new ArrayList(readInt2);
  3409. for (int i = 0; i < readInt2; i++) {
  3410. arrayList.add(getDataCallResponse(parcel, readInt));
  3411. }
  3412. return arrayList;
  3413. }
  3414.  
  3415. private ArrayList<ApnSetting> responseGetDataCallProfile(Parcel parcel) {
  3416. int readInt = parcel.readInt();
  3417. riljLog("# data call profiles:" + readInt);
  3418. ArrayList arrayList = new ArrayList(readInt);
  3419. for (int i = 0; i < readInt; i++) {
  3420. ApnProfileOmh apnProfileOmh = new ApnProfileOmh(parcel.readInt(), parcel.readInt());
  3421. riljLog("responseGetDataCallProfile()" + apnProfileOmh.getProfileId() + ":" + apnProfileOmh.getPriority());
  3422. arrayList.add(apnProfileOmh);
  3423. }
  3424. return arrayList;
  3425. }
  3426.  
  3427. private Object responseGetPreferredNetworkType(Parcel parcel) {
  3428. int[] iArr = (int[]) responseInts(parcel);
  3429. if (iArr.length >= 1) {
  3430. this.mPreferredNetworkType = iArr[0];
  3431. }
  3432. return iArr;
  3433. }
  3434.  
  3435. private Object responseGmsBroadcastConfig(Parcel parcel) {
  3436. int readInt = parcel.readInt();
  3437. ArrayList arrayList = new ArrayList(readInt);
  3438. for (int i = 0; i < readInt; i++) {
  3439. arrayList.add(new SmsBroadcastConfigInfo(parcel.readInt(), parcel.readInt(), parcel.readInt(), parcel.readInt(), parcel.readInt() == 1));
  3440. }
  3441. return arrayList;
  3442. }
  3443.  
  3444. private Object responseHardwareConfig(Parcel parcel) {
  3445. int readInt = parcel.readInt();
  3446. ArrayList arrayList = new ArrayList(readInt);
  3447. for (int i = 0; i < readInt; i++) {
  3448. Object hardwareConfig;
  3449. int readInt2 = parcel.readInt();
  3450. switch (readInt2) {
  3451. case 0:
  3452. hardwareConfig = new HardwareConfig(readInt2);
  3453. hardwareConfig.assignModem(parcel.readString(), parcel.readInt(), parcel.readInt(), parcel.readInt(), parcel.readInt(), parcel.readInt(), parcel.readInt());
  3454. break;
  3455. case 1:
  3456. hardwareConfig = new HardwareConfig(readInt2);
  3457. hardwareConfig.assignSim(parcel.readString(), parcel.readInt(), parcel.readString());
  3458. break;
  3459. default:
  3460. throw new RuntimeException("RIL_REQUEST_GET_HARDWARE_CONFIG invalid hardward type:" + readInt2);
  3461. }
  3462. arrayList.add(hardwareConfig);
  3463. }
  3464. return arrayList;
  3465. }
  3466.  
  3467. private Object responseICC_IO(Parcel parcel) {
  3468. return new IccIoResult(parcel.readInt(), parcel.readInt(), parcel.readString());
  3469. }
  3470.  
  3471. private Object responseICC_IOBase64(Parcel parcel) {
  3472. return new IccIoResult(parcel.readInt(), parcel.readInt(), Base64.decode(parcel.readString(), 0));
  3473. }
  3474.  
  3475. private Object responseIccCardStatus(Parcel parcel) {
  3476. int i = 8;
  3477. IccCardStatus iccCardStatus = new IccCardStatus();
  3478. iccCardStatus.setCardState(parcel.readInt());
  3479. iccCardStatus.setUniversalPinState(parcel.readInt());
  3480. iccCardStatus.mGsmUmtsSubscriptionAppIndex = parcel.readInt();
  3481. iccCardStatus.mCdmaSubscriptionAppIndex = parcel.readInt();
  3482. iccCardStatus.mImsSubscriptionAppIndex = parcel.readInt();
  3483. int readInt = parcel.readInt();
  3484. if (readInt <= 8) {
  3485. i = readInt;
  3486. }
  3487. iccCardStatus.mApplications = new IccCardApplicationStatus[i];
  3488. for (readInt = 0; readInt < i; readInt++) {
  3489. IccCardApplicationStatus iccCardApplicationStatus = new IccCardApplicationStatus();
  3490. iccCardApplicationStatus.app_type = iccCardApplicationStatus.AppTypeFromRILInt(parcel.readInt());
  3491. iccCardApplicationStatus.app_state = iccCardApplicationStatus.AppStateFromRILInt(parcel.readInt());
  3492. iccCardApplicationStatus.perso_substate = iccCardApplicationStatus.PersoSubstateFromRILInt(parcel.readInt());
  3493. iccCardApplicationStatus.aid = parcel.readString();
  3494. iccCardApplicationStatus.app_label = parcel.readString();
  3495. iccCardApplicationStatus.pin1_replaced = parcel.readInt();
  3496. iccCardApplicationStatus.pin1 = iccCardApplicationStatus.PinStateFromRILInt(parcel.readInt());
  3497. iccCardApplicationStatus.pin2 = iccCardApplicationStatus.PinStateFromRILInt(parcel.readInt());
  3498. iccCardStatus.mApplications[readInt] = iccCardApplicationStatus;
  3499. }
  3500. return iccCardStatus;
  3501. }
  3502.  
  3503. private Object responseInts(Parcel parcel) {
  3504. int readInt = parcel.readInt();
  3505. int[] iArr = new int[readInt];
  3506. for (int i = 0; i < readInt; i++) {
  3507. iArr[i] = parcel.readInt();
  3508. }
  3509. return iArr;
  3510. }
  3511.  
  3512. private Object responseOperatorInfos(Parcel parcel) {
  3513. String[] strArr = (String[]) responseStrings(parcel);
  3514. SpnOverride spnOverride = new SpnOverride();
  3515. if (strArr.length % 4 != 0) {
  3516. throw new RuntimeException("RIL_REQUEST_QUERY_AVAILABLE_NETWORKS: invalid response. Got " + strArr.length + " strings, expected multible of 4");
  3517. }
  3518. ArrayList arrayList = new ArrayList(strArr.length / 4);
  3519. int i = 0;
  3520. while (true) {
  3521. int i2 = i;
  3522. if (i2 >= strArr.length) {
  3523. return arrayList;
  3524. }
  3525. arrayList.add(new OperatorInfo(spnOverride.containsCarrier(strArr[i2 + 2]) ? spnOverride.getSpn(strArr[i2 + 2]) : strArr[i2 + 0], strArr[i2 + 1], strArr[i2 + 2], strArr[i2 + 3]));
  3526. i = i2 + 4;
  3527. }
  3528. }
  3529.  
  3530. private Object responseRaw(Parcel parcel) {
  3531. return parcel.createByteArray();
  3532. }
  3533.  
  3534. private Object responseSMS(Parcel parcel) {
  3535. return new SmsResponse(parcel.readInt(), parcel.readString(), parcel.readInt());
  3536. }
  3537.  
  3538. private Object responseSetupDataCall(Parcel parcel) {
  3539. int readInt = parcel.readInt();
  3540. int readInt2 = parcel.readInt();
  3541. if (readInt < 5) {
  3542. DataCallResponse dataCallResponse = new DataCallResponse();
  3543. dataCallResponse.version = readInt;
  3544. dataCallResponse.cid = Integer.parseInt(parcel.readString());
  3545. dataCallResponse.ifname = parcel.readString();
  3546. if (TextUtils.isEmpty(dataCallResponse.ifname)) {
  3547. throw new RuntimeException("RIL_REQUEST_SETUP_DATA_CALL response, no ifname");
  3548. }
  3549. String readString = parcel.readString();
  3550. if (!TextUtils.isEmpty(readString)) {
  3551. dataCallResponse.addresses = readString.split(" ");
  3552. }
  3553. if (readInt2 >= 4) {
  3554. readString = parcel.readString();
  3555. riljLog("responseSetupDataCall got dnses=" + readString);
  3556. if (!TextUtils.isEmpty(readString)) {
  3557. dataCallResponse.dnses = readString.split(" ");
  3558. }
  3559. }
  3560. if (readInt2 >= 5) {
  3561. readString = parcel.readString();
  3562. riljLog("responseSetupDataCall got gateways=" + readString);
  3563. if (!TextUtils.isEmpty(readString)) {
  3564. dataCallResponse.gateways = readString.split(" ");
  3565. }
  3566. }
  3567. if (readInt2 >= 6) {
  3568. readString = parcel.readString();
  3569. riljLog("responseSetupDataCall got pcscf=" + readString);
  3570. if (!TextUtils.isEmpty(readString)) {
  3571. dataCallResponse.pcscf = readString.split(" ");
  3572. }
  3573. }
  3574. if (readInt2 < 7) {
  3575. return dataCallResponse;
  3576. }
  3577. dataCallResponse.mtu = Integer.parseInt(parcel.readString());
  3578. riljLog("responseSetupDataCall got mtu=" + dataCallResponse.mtu);
  3579. return dataCallResponse;
  3580. } else if (readInt2 == 1) {
  3581. return getDataCallResponse(parcel, readInt);
  3582. } else {
  3583. throw new RuntimeException("RIL_REQUEST_SETUP_DATA_CALL response expecting 1 RIL_Data_Call_response_v5 got " + readInt2);
  3584. }
  3585. }
  3586.  
  3587. private Object responseSignalStrength(Parcel parcel) {
  3588. return SignalStrength.makeSignalStrengthFromRilParcel(parcel);
  3589. }
  3590.  
  3591. private Object responseSimRefresh(Parcel parcel) {
  3592. IccRefreshResponse iccRefreshResponse = new IccRefreshResponse();
  3593. iccRefreshResponse.refreshResult = parcel.readInt();
  3594. iccRefreshResponse.efId = parcel.readInt();
  3595. iccRefreshResponse.aid = parcel.readString();
  3596. return iccRefreshResponse;
  3597. }
  3598.  
  3599. private Object responseSsData(Parcel parcel) {
  3600. int i = 0;
  3601. SsData ssData = new SsData();
  3602. ssData.serviceType = ssData.ServiceTypeFromRILInt(parcel.readInt());
  3603. ssData.requestType = ssData.RequestTypeFromRILInt(parcel.readInt());
  3604. ssData.teleserviceType = ssData.TeleserviceTypeFromRILInt(parcel.readInt());
  3605. ssData.serviceClass = parcel.readInt();
  3606. ssData.result = parcel.readInt();
  3607. int readInt = parcel.readInt();
  3608. if (ssData.serviceType.isTypeCF() && ssData.requestType.isTypeInterrogation()) {
  3609. ssData.cfInfo = new CallForwardInfo[readInt];
  3610. while (i < readInt) {
  3611. ssData.cfInfo[i] = new CallForwardInfo();
  3612. ssData.cfInfo[i].status = parcel.readInt();
  3613. ssData.cfInfo[i].reason = parcel.readInt();
  3614. ssData.cfInfo[i].serviceClass = parcel.readInt();
  3615. ssData.cfInfo[i].toa = parcel.readInt();
  3616. ssData.cfInfo[i].number = parcel.readString();
  3617. ssData.cfInfo[i].timeSeconds = parcel.readInt();
  3618. riljLog("[SS Data] CF Info " + i + " : " + ssData.cfInfo[i]);
  3619. i++;
  3620. }
  3621. } else {
  3622. ssData.ssInfo = new int[readInt];
  3623. while (i < readInt) {
  3624. ssData.ssInfo[i] = parcel.readInt();
  3625. riljLog("[SS Data] SS Info " + i + " : " + ssData.ssInfo[i]);
  3626. i++;
  3627. }
  3628. }
  3629. return ssData;
  3630. }
  3631.  
  3632. private Object responseString(Parcel parcel) {
  3633. return parcel.readString();
  3634. }
  3635.  
  3636. private Object responseStrings(Parcel parcel) {
  3637. return parcel.readStringArray();
  3638. }
  3639.  
  3640. private Object responseSuppServiceNotification(Parcel parcel) {
  3641. SuppServiceNotification suppServiceNotification = new SuppServiceNotification();
  3642. suppServiceNotification.notificationType = parcel.readInt();
  3643. suppServiceNotification.code = parcel.readInt();
  3644. suppServiceNotification.index = parcel.readInt();
  3645. suppServiceNotification.type = parcel.readInt();
  3646. suppServiceNotification.number = parcel.readString();
  3647. return suppServiceNotification;
  3648. }
  3649.  
  3650. static String responseToString(int i) {
  3651. switch (i) {
  3652. case 1000:
  3653. return "UNSOL_RESPONSE_RADIO_STATE_CHANGED";
  3654. case com.android.internal.telephony.cdma.CallFailCause.CDMA_DROP /*1001*/:
  3655. return "UNSOL_RESPONSE_CALL_STATE_CHANGED";
  3656. case com.android.internal.telephony.cdma.CallFailCause.CDMA_INTERCEPT /*1002*/:
  3657. return "UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED";
  3658. case com.android.internal.telephony.cdma.CallFailCause.CDMA_REORDER /*1003*/:
  3659. return "UNSOL_RESPONSE_NEW_SMS";
  3660. case com.android.internal.telephony.cdma.CallFailCause.CDMA_SO_REJECT /*1004*/:
  3661. return "UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT";
  3662. case com.android.internal.telephony.cdma.CallFailCause.CDMA_RETRY_ORDER /*1005*/:
  3663. return "UNSOL_RESPONSE_NEW_SMS_ON_SIM";
  3664. case com.android.internal.telephony.cdma.CallFailCause.CDMA_ACCESS_FAILURE /*1006*/:
  3665. return "UNSOL_ON_USSD";
  3666. case com.android.internal.telephony.cdma.CallFailCause.CDMA_PREEMPTED /*1007*/:
  3667. return "UNSOL_ON_USSD_REQUEST";
  3668. case com.android.internal.telephony.cdma.CallFailCause.CDMA_NOT_EMERGENCY /*1008*/:
  3669. return "UNSOL_NITZ_TIME_RECEIVED";
  3670. case com.android.internal.telephony.cdma.CallFailCause.CDMA_ACCESS_BLOCKED /*1009*/:
  3671. return "UNSOL_SIGNAL_STRENGTH";
  3672. case 1010:
  3673. return "UNSOL_DATA_CALL_LIST_CHANGED";
  3674. case 1011:
  3675. return "UNSOL_SUPP_SVC_NOTIFICATION";
  3676. case 1012:
  3677. return "UNSOL_STK_SESSION_END";
  3678. case 1013:
  3679. return "UNSOL_STK_PROACTIVE_COMMAND";
  3680. case 1014:
  3681. return "UNSOL_STK_EVENT_NOTIFY";
  3682. case CharacterSets.UTF_16 /*1015*/:
  3683. return "UNSOL_STK_CALL_SETUP";
  3684. case 1016:
  3685. return "UNSOL_SIM_SMS_STORAGE_FULL";
  3686. case 1017:
  3687. return "UNSOL_SIM_REFRESH";
  3688. case 1018:
  3689. return "UNSOL_CALL_RING";
  3690. case 1019:
  3691. return "UNSOL_RESPONSE_SIM_STATUS_CHANGED";
  3692. case 1020:
  3693. return "UNSOL_RESPONSE_CDMA_NEW_SMS";
  3694. case 1021:
  3695. return "UNSOL_RESPONSE_NEW_BROADCAST_SMS";
  3696. case 1022:
  3697. return "UNSOL_CDMA_RUIM_SMS_STORAGE_FULL";
  3698. case 1023:
  3699. return "UNSOL_RESTRICTED_STATE_CHANGED";
  3700. case 1024:
  3701. return "UNSOL_ENTER_EMERGENCY_CALLBACK_MODE";
  3702. case 1025:
  3703. return "UNSOL_CDMA_CALL_WAITING";
  3704. case 1026:
  3705. return "UNSOL_CDMA_OTA_PROVISION_STATUS";
  3706. case 1027:
  3707. return "UNSOL_CDMA_INFO_REC";
  3708. case 1028:
  3709. return "UNSOL_OEM_HOOK_RAW";
  3710. case 1029:
  3711. return "UNSOL_RINGBACK_TONE";
  3712. case 1030:
  3713. return "UNSOL_RESEND_INCALL_MUTE";
  3714. case 1031:
  3715. return "CDMA_SUBSCRIPTION_SOURCE_CHANGED";
  3716. case 1032:
  3717. return "UNSOL_CDMA_PRL_CHANGED";
  3718. case 1033:
  3719. return "UNSOL_EXIT_EMERGENCY_CALLBACK_MODE";
  3720. case 1034:
  3721. return "UNSOL_RIL_CONNECTED";
  3722. case 1035:
  3723. return "UNSOL_VOICE_RADIO_TECH_CHANGED";
  3724. case 1036:
  3725. return "UNSOL_CELL_INFO_LIST";
  3726. case 1037:
  3727. return "UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED";
  3728. case 1038:
  3729. return "RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED";
  3730. case 1039:
  3731. return "UNSOL_SRVCC_STATE_NOTIFY";
  3732. case 1040:
  3733. return "RIL_UNSOL_HARDWARE_CONFIG_CHANGED";
  3734. case 1043:
  3735. return "UNSOL_ON_SS";
  3736. case 1044:
  3737. return "UNSOL_STK_CC_ALPHA_NOTIFY";
  3738. default:
  3739. return "<unknown response>";
  3740. }
  3741. }
  3742.  
  3743. private Object responseVoid(Parcel parcel) {
  3744. return null;
  3745. }
  3746.  
  3747. static String retToString(int i, Object obj) {
  3748. int i2 = 1;
  3749. if (obj == null) {
  3750. return "";
  3751. }
  3752. switch (i) {
  3753. case 11:
  3754. case RadioNVItems.RIL_NV_MIP_PROFILE_HA_SPI /*38*/:
  3755. case 39:
  3756. case 115:
  3757. case 117:
  3758. return "";
  3759. default:
  3760. int length;
  3761. StringBuilder stringBuilder;
  3762. ArrayList arrayList;
  3763. StringBuilder stringBuilder2;
  3764. Iterator it;
  3765. if (obj instanceof int[]) {
  3766. int[] iArr = (int[]) obj;
  3767. length = iArr.length;
  3768. stringBuilder = new StringBuilder("{");
  3769. if (length > 0) {
  3770. stringBuilder.append(iArr[0]);
  3771. while (i2 < length) {
  3772. stringBuilder.append(", ").append(iArr[i2]);
  3773. i2++;
  3774. }
  3775. }
  3776. stringBuilder.append("}");
  3777. return stringBuilder.toString();
  3778. } else if (obj instanceof String[]) {
  3779. String[] strArr = (String[]) obj;
  3780. length = strArr.length;
  3781. stringBuilder = new StringBuilder("{");
  3782. if (length > 0) {
  3783. stringBuilder.append(strArr[0]);
  3784. while (i2 < length) {
  3785. stringBuilder.append(", ").append(strArr[i2]);
  3786. i2++;
  3787. }
  3788. }
  3789. stringBuilder.append("}");
  3790. return stringBuilder.toString();
  3791. } else if (i == 9) {
  3792. arrayList = (ArrayList) obj;
  3793. stringBuilder2 = new StringBuilder(" ");
  3794. it = arrayList.iterator();
  3795. while (it.hasNext()) {
  3796. stringBuilder2.append("[").append((DriverCall) it.next()).append("] ");
  3797. }
  3798. return stringBuilder2.toString();
  3799. } else if (i == 75) {
  3800. arrayList = (ArrayList) obj;
  3801. stringBuilder2 = new StringBuilder(" ");
  3802. it = arrayList.iterator();
  3803. while (it.hasNext()) {
  3804. stringBuilder2.append((NeighboringCellInfo) it.next()).append(" ");
  3805. }
  3806. return stringBuilder2.toString();
  3807. } else if (i != 124) {
  3808. return obj.toString();
  3809. } else {
  3810. arrayList = (ArrayList) obj;
  3811. stringBuilder2 = new StringBuilder(" ");
  3812. it = arrayList.iterator();
  3813. while (it.hasNext()) {
  3814. stringBuilder2.append("[").append((HardwareConfig) it.next()).append("] ");
  3815. }
  3816. return stringBuilder2.toString();
  3817. }
  3818. }
  3819. }
  3820.  
  3821. private void riljLog(String str) {
  3822. Rlog.d(RILJ_LOG_TAG, str + (this.mInstanceId != null ? " [SUB" + this.mInstanceId + "]" : ""));
  3823. }
  3824.  
  3825. private void riljLogv(String str) {
  3826. Rlog.v(RILJ_LOG_TAG, str + (this.mInstanceId != null ? " [SUB" + this.mInstanceId + "]" : ""));
  3827. }
  3828.  
  3829. private void send(RILRequest rILRequest) {
  3830. if (this.mSocket == null) {
  3831. rILRequest.onError(1, null);
  3832. rILRequest.release();
  3833. return;
  3834. }
  3835. Message obtainMessage = this.mSender.obtainMessage(1, rILRequest);
  3836. acquireWakeLock();
  3837. obtainMessage.sendToTarget();
  3838. }
  3839.  
  3840. private void sendOemRilRequestRaw(int i, int i2, byte[] bArr, Message message) {
  3841. byte[] bArr2 = new byte[(this.mHeaderSize + (i2 * 1))];
  3842. ByteBuffer wrap = ByteBuffer.wrap(bArr2);
  3843. wrap.order(ByteOrder.nativeOrder());
  3844. wrap.put(OEM_IDENTIFIER.getBytes());
  3845. wrap.putInt(i);
  3846. if (i2 > 0 && bArr != null) {
  3847. wrap.putInt(i2 * 1);
  3848. for (byte put : bArr) {
  3849. wrap.put(put);
  3850. }
  3851. }
  3852. invokeOemRilRequestRaw(bArr2, message);
  3853. }
  3854.  
  3855. private void sendScreenState(boolean z) {
  3856. int i = 1;
  3857. RILRequest obtain = RILRequest.obtain(61, null);
  3858. obtain.mParcel.writeInt(1);
  3859. Parcel parcel = obtain.mParcel;
  3860. if (!z) {
  3861. i = 0;
  3862. }
  3863. parcel.writeInt(i);
  3864. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + ": " + z);
  3865. send(obtain);
  3866. }
  3867.  
  3868. private void setLimitedService(Message message) {
  3869. byte[] bArr = new byte[(this.mHeaderSize + 4)];
  3870. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  3871. wrap.order(ByteOrder.nativeOrder());
  3872. wrap.put(OEM_IDENTIFIER.getBytes());
  3873. wrap.putInt(591829);
  3874. wrap.putInt(4);
  3875. wrap.putInt(this.mLimitedService ? 1 : 0);
  3876. invokeOemRilRequestRaw(bArr, message);
  3877. riljLog("[EXTDBG] setLimitedService: " + this.mLimitedService);
  3878. }
  3879.  
  3880. private void switchToRadioState(RadioState radioState) {
  3881. setRadioState(radioState);
  3882. }
  3883.  
  3884. private Object toIntArrayFromByteArray(byte[] bArr) {
  3885. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  3886. wrap.order(ByteOrder.nativeOrder());
  3887. int capacity = wrap.capacity() / 4;
  3888. int[] iArr = new int[capacity];
  3889. for (int i = 0; i < capacity; i++) {
  3890. iArr[i] = wrap.getInt();
  3891. }
  3892. return iArr;
  3893. }
  3894.  
  3895. private int translateStatus(int i) {
  3896. switch (i & 7) {
  3897. case 3:
  3898. return 0;
  3899. case 5:
  3900. return 3;
  3901. case 7:
  3902. return 2;
  3903. default:
  3904. return 1;
  3905. }
  3906. }
  3907.  
  3908. private void unsljLog(int i) {
  3909. riljLog("[UNSL]< " + responseToString(i));
  3910. }
  3911.  
  3912. private void unsljLogMore(int i, String str) {
  3913. riljLog("[UNSL]< " + responseToString(i) + " " + str);
  3914. }
  3915.  
  3916. private void unsljLogRet(int i, Object obj) {
  3917. riljLog("[UNSL]< " + responseToString(i) + " " + retToString(i, obj));
  3918. }
  3919.  
  3920. private void unsljLogvRet(int i, Object obj) {
  3921. riljLogv("[UNSL]< " + responseToString(i) + " " + retToString(i, obj));
  3922. }
  3923.  
  3924. private void upDomesticInService(Context context, Intent intent) {
  3925. riljLog("upDomesticInService start ");
  3926. ServiceState newFromBundle = ServiceState.newFromBundle(intent.getExtras());
  3927. if (newFromBundle != null) {
  3928. riljLog("upDomesticInService gsm.domesticinservice before: " + String.valueOf(isDomesticInService()));
  3929. int state = newFromBundle.getState();
  3930. riljLog("upDomesticInService state : " + Integer.toString(state));
  3931. if (state == 0) {
  3932. switch (this.mPhoneType) {
  3933. case 1:
  3934. riljLog("upDomesticInService PhoneType : GSM_PHONE");
  3935. SystemProperties.set("gsm.domesticinservice", String.valueOf(new TelephonyManager(context).getNetworkCountryIso().equals("jp")));
  3936. break;
  3937. case 2:
  3938. riljLog("upDomesticInService PhoneType : CDMA_PHONE");
  3939. SystemProperties.set("gsm.domesticinservice", String.valueOf(!new TelephonyManager(context).isNetworkRoaming()));
  3940. break;
  3941. default:
  3942. riljLog("upDomesticInService PhoneType : Outside the scope PhoneType: " + Integer.toString(this.mPhoneType));
  3943. break;
  3944. }
  3945. riljLog("upDomesticInService gsm.domesticinservice after: " + String.valueOf(isDomesticInService()));
  3946. }
  3947. }
  3948. riljLog("upDomesticInService end ");
  3949. }
  3950.  
  3951. private void updateScreenState() {
  3952. int i = this.mDefaultDisplayState;
  3953. this.mDefaultDisplayState = this.mDefaultDisplay.getState();
  3954. if (this.mDefaultDisplayState == i) {
  3955. return;
  3956. }
  3957. if (i != 2 && this.mDefaultDisplayState == 2) {
  3958. sendScreenState(true);
  3959. } else if ((i == 2 || i == 0) && this.mDefaultDisplayState != 2) {
  3960. sendScreenState(false);
  3961. }
  3962. }
  3963.  
  3964. private void validateMsl(byte[] bArr, Message message) {
  3965. byte[] bArr2 = new byte[(this.mHeaderSize + 6)];
  3966. ByteBuffer wrap = ByteBuffer.wrap(bArr2);
  3967. wrap.order(ByteOrder.nativeOrder());
  3968. wrap.put(OEM_IDENTIFIER.getBytes());
  3969. wrap.putInt(591837);
  3970. wrap.putInt(6);
  3971. for (int i = 0; i < 6; i++) {
  3972. wrap.put(bArr[i]);
  3973. }
  3974. invokeOemRilRequestRaw(bArr2, message);
  3975. riljLog("[EXTDBG] validateMsl: " + IccUtils.bytesToHexString(bArr));
  3976. }
  3977.  
  3978. public void acceptCall(Message message) {
  3979. RILRequest obtain = RILRequest.obtain(40, message);
  3980. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  3981. send(obtain);
  3982. }
  3983.  
  3984. public void acknowledgeIncomingGsmSmsWithPdu(boolean z, String str, Message message) {
  3985. RILRequest obtain = RILRequest.obtain(106, message);
  3986. obtain.mParcel.writeInt(2);
  3987. obtain.mParcel.writeString(z ? "1" : "0");
  3988. obtain.mParcel.writeString(str);
  3989. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + ' ' + z + " [" + str + ']');
  3990. send(obtain);
  3991. }
  3992.  
  3993. public void acknowledgeLastIncomingCdmaSms(boolean z, int i, Message message) {
  3994. RILRequest obtain = RILRequest.obtain(88, message);
  3995. obtain.mParcel.writeInt(z ? 0 : 1);
  3996. obtain.mParcel.writeInt(i);
  3997. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + z + " " + i);
  3998. send(obtain);
  3999. }
  4000.  
  4001. public void acknowledgeLastIncomingGsmSms(boolean z, int i, Message message) {
  4002. RILRequest obtain = RILRequest.obtain(37, message);
  4003. obtain.mParcel.writeInt(2);
  4004. obtain.mParcel.writeInt(z ? 1 : 0);
  4005. obtain.mParcel.writeInt(i);
  4006. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + z + " " + i);
  4007. send(obtain);
  4008. }
  4009.  
  4010. public void cancelPendingUssd(Message message) {
  4011. RILRequest obtain = RILRequest.obtain(30, message);
  4012. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4013. send(obtain);
  4014. }
  4015.  
  4016. public void changeBarringPassword(String str, String str2, String str3, Message message) {
  4017. RILRequest obtain = RILRequest.obtain(44, message);
  4018. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4019. obtain.mParcel.writeInt(3);
  4020. obtain.mParcel.writeString(str);
  4021. obtain.mParcel.writeString(str2);
  4022. obtain.mParcel.writeString(str3);
  4023. send(obtain);
  4024. }
  4025.  
  4026. public void changeIccPin(String str, String str2, Message message) {
  4027. changeIccPinForApp(str, str2, null, message);
  4028. }
  4029.  
  4030. public void changeIccPin2(String str, String str2, Message message) {
  4031. changeIccPin2ForApp(str, str2, null, message);
  4032. }
  4033.  
  4034. public void changeIccPin2ForApp(String str, String str2, String str3, Message message) {
  4035. RILRequest obtain = RILRequest.obtain(7, message);
  4036. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4037. obtain.mParcel.writeInt(3);
  4038. obtain.mParcel.writeString(str);
  4039. obtain.mParcel.writeString(str2);
  4040. obtain.mParcel.writeString(str3);
  4041. send(obtain);
  4042. }
  4043.  
  4044. public void changeIccPinForApp(String str, String str2, String str3, Message message) {
  4045. RILRequest obtain = RILRequest.obtain(6, message);
  4046. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4047. obtain.mParcel.writeInt(3);
  4048. obtain.mParcel.writeString(str);
  4049. obtain.mParcel.writeString(str2);
  4050. obtain.mParcel.writeString(str3);
  4051. send(obtain);
  4052. }
  4053.  
  4054. public void conference(Message message) {
  4055. RILRequest obtain = RILRequest.obtain(16, message);
  4056. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4057. send(obtain);
  4058. }
  4059.  
  4060. public void deactivateDataCall(int i, int i2, Message message) {
  4061. RILRequest obtain = RILRequest.obtain(41, message);
  4062. obtain.mParcel.writeInt(2);
  4063. obtain.mParcel.writeString(Integer.toString(i));
  4064. obtain.mParcel.writeString(Integer.toString(i2));
  4065. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + i + " " + i2);
  4066. send(obtain);
  4067. }
  4068.  
  4069. public void deleteSmsOnRuim(int i, Message message) {
  4070. RILRequest obtain = RILRequest.obtain(97, message);
  4071. obtain.mParcel.writeInt(1);
  4072. obtain.mParcel.writeInt(i);
  4073. send(obtain);
  4074. }
  4075.  
  4076. public void deleteSmsOnSim(int i, Message message) {
  4077. RILRequest obtain = RILRequest.obtain(64, message);
  4078. obtain.mParcel.writeInt(1);
  4079. obtain.mParcel.writeInt(i);
  4080. send(obtain);
  4081. }
  4082.  
  4083. public void dial(String str, int i, Message message) {
  4084. dial(str, i, null, message);
  4085. }
  4086.  
  4087. public void dial(String str, int i, UUSInfo uUSInfo, Message message) {
  4088. RILRequest obtain = RILRequest.obtain(10, message);
  4089. obtain.mParcel.writeString(str);
  4090. obtain.mParcel.writeInt(i);
  4091. if (uUSInfo == null) {
  4092. obtain.mParcel.writeInt(0);
  4093. } else {
  4094. obtain.mParcel.writeInt(1);
  4095. obtain.mParcel.writeInt(uUSInfo.getType());
  4096. obtain.mParcel.writeInt(uUSInfo.getDcs());
  4097. obtain.mParcel.writeByteArray(uUSInfo.getUserData());
  4098. }
  4099. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4100. send(obtain);
  4101. }
  4102.  
  4103. public void dump(FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
  4104. printWriter.println("RIL: " + this);
  4105. printWriter.println(" mSocket=" + this.mSocket);
  4106. printWriter.println(" mSenderThread=" + this.mSenderThread);
  4107. printWriter.println(" mSender=" + this.mSender);
  4108. printWriter.println(" mReceiverThread=" + this.mReceiverThread);
  4109. printWriter.println(" mReceiver=" + this.mReceiver);
  4110. printWriter.println(" mWakeLock=" + this.mWakeLock);
  4111. printWriter.println(" mWakeLockTimeout=" + this.mWakeLockTimeout);
  4112. synchronized (this.mRequestList) {
  4113. synchronized (this.mWakeLock) {
  4114. printWriter.println(" mWakeLockCount=" + this.mWakeLockCount);
  4115. }
  4116. int size = this.mRequestList.size();
  4117. printWriter.println(" mRequestList count=" + size);
  4118. for (int i = 0; i < size; i++) {
  4119. RILRequest rILRequest = (RILRequest) this.mRequestList.valueAt(i);
  4120. printWriter.println(" [" + rILRequest.mSerial + "] " + requestToString(rILRequest.mRequest));
  4121. }
  4122. }
  4123. printWriter.println(" mLastNITZTimeInfo=" + this.mLastNITZTimeInfo);
  4124. printWriter.println(" mTestingEmergencyCall=" + this.mTestingEmergencyCall.get());
  4125. }
  4126.  
  4127. public void exitEmergencyCallbackMode(Message message) {
  4128. RILRequest obtain = RILRequest.obtain(99, message);
  4129. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4130. send(obtain);
  4131. }
  4132.  
  4133. public void explicitCallTransfer(Message message) {
  4134. RILRequest obtain = RILRequest.obtain(72, message);
  4135. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4136. send(obtain);
  4137. }
  4138.  
  4139. public void getAtr(Message message) {
  4140. RILRequest obtain = RILRequest.obtain(133, message);
  4141. obtain.mParcel.writeInt(1);
  4142. obtain.mParcel.writeInt(0);
  4143. riljLog(obtain.serialString() + "> iccGetAtr: " + requestToString(obtain.mRequest) + " " + 0);
  4144. send(obtain);
  4145. }
  4146.  
  4147. public void getAvailableNetworks(Message message) {
  4148. RILRequest obtain = RILRequest.obtain(48, message);
  4149. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4150. if (TelBrand.IS_DCM) {
  4151. this.mSender.sendMessageDelayed(this.mSender.obtainMessage(4, obtain), SEARCH_NETWORK_DELAY_TIME);
  4152. return;
  4153. }
  4154. send(obtain);
  4155. }
  4156.  
  4157. public void getBandPref(Message message) {
  4158. byte[] bArr = new byte[(this.mHeaderSize + 0)];
  4159. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  4160. wrap.order(ByteOrder.nativeOrder());
  4161. wrap.put(OEM_IDENTIFIER.getBytes());
  4162. wrap.putInt(591831);
  4163. wrap.putInt(0);
  4164. invokeOemRilRequestRaw(bArr, message);
  4165. riljLog("[EXTDBG] getBandPref is called.");
  4166. }
  4167.  
  4168. public void getBasebandVersion(Message message) {
  4169. RILRequest obtain = RILRequest.obtain(51, message);
  4170. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4171. send(obtain);
  4172. }
  4173.  
  4174. public void getCDMASubscription(Message message) {
  4175. RILRequest obtain = RILRequest.obtain(95, message);
  4176. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4177. send(obtain);
  4178. }
  4179.  
  4180. public void getCLIR(Message message) {
  4181. RILRequest obtain = RILRequest.obtain(31, message);
  4182. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4183. send(obtain);
  4184. }
  4185.  
  4186. public void getCdmaBroadcastConfig(Message message) {
  4187. send(RILRequest.obtain(92, message));
  4188. }
  4189.  
  4190. public void getCdmaSubscriptionSource(Message message) {
  4191. RILRequest obtain = RILRequest.obtain(104, message);
  4192. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4193. send(obtain);
  4194. }
  4195.  
  4196. public void getCellInfoList(Message message) {
  4197. RILRequest obtain = RILRequest.obtain(109, message);
  4198. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4199. send(obtain);
  4200. }
  4201.  
  4202. public void getCurrentCalls(Message message) {
  4203. RILRequest obtain = RILRequest.obtain(9, message);
  4204. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4205. send(obtain);
  4206. }
  4207.  
  4208. public void getDataCallList(Message message) {
  4209. RILRequest obtain = RILRequest.obtain(57, message);
  4210. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4211. send(obtain);
  4212. }
  4213.  
  4214. public void getDataCallProfile(int i, Message message) {
  4215. RILRequest obtain = RILRequest.obtain(132, message);
  4216. obtain.mParcel.writeInt(1);
  4217. obtain.mParcel.writeInt(i);
  4218. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " : " + i);
  4219. send(obtain);
  4220. }
  4221.  
  4222. public void getDataRegistrationState(Message message) {
  4223. RILRequest obtain = RILRequest.obtain(21, message);
  4224. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4225. send(obtain);
  4226. }
  4227.  
  4228. public void getDeviceIdentity(Message message) {
  4229. RILRequest obtain = RILRequest.obtain(98, message);
  4230. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4231. send(obtain);
  4232. }
  4233.  
  4234. public void getGsmBroadcastConfig(Message message) {
  4235. RILRequest obtain = RILRequest.obtain(89, message);
  4236. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4237. send(obtain);
  4238. }
  4239.  
  4240. public void getHardwareConfig(Message message) {
  4241. RILRequest obtain = RILRequest.obtain(124, message);
  4242. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4243. send(obtain);
  4244. }
  4245.  
  4246. public void getIMEI(Message message) {
  4247. RILRequest obtain = RILRequest.obtain(38, message);
  4248. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4249. send(obtain);
  4250. }
  4251.  
  4252. public void getIMEISV(Message message) {
  4253. RILRequest obtain = RILRequest.obtain(39, message);
  4254. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4255. send(obtain);
  4256. }
  4257.  
  4258. public void getIMSI(Message message) {
  4259. getIMSIForApp(null, message);
  4260. }
  4261.  
  4262. public void getIMSIForApp(String str, Message message) {
  4263. RILRequest obtain = RILRequest.obtain(11, message);
  4264. obtain.mParcel.writeInt(1);
  4265. obtain.mParcel.writeString(str);
  4266. riljLog(obtain.serialString() + "> getIMSI: " + requestToString(obtain.mRequest) + " aid: " + str);
  4267. send(obtain);
  4268. }
  4269.  
  4270. public void getIccCardStatus(Message message) {
  4271. RILRequest obtain = RILRequest.obtain(1, message);
  4272. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4273. send(obtain);
  4274. }
  4275.  
  4276. public void getImsRegistrationState(Message message) {
  4277. RILRequest obtain = RILRequest.obtain(112, message);
  4278. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4279. send(obtain);
  4280. }
  4281.  
  4282. public void getLastCallFailCause(Message message) {
  4283. RILRequest obtain = RILRequest.obtain(18, message);
  4284. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4285. send(obtain);
  4286. }
  4287.  
  4288. public void getLastDataCallFailCause(Message message) {
  4289. RILRequest obtain = RILRequest.obtain(56, message);
  4290. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4291. send(obtain);
  4292. }
  4293.  
  4294. @Deprecated
  4295. public void getLastPdpFailCause(Message message) {
  4296. getLastDataCallFailCause(message);
  4297. }
  4298.  
  4299. public void getModemCapability(Message message) {
  4300. Rlog.d(RILJ_LOG_TAG, "GetModemCapability");
  4301. sendOemRilRequestRaw(OEMHOOK_EVT_HOOK_GET_MODEM_CAPABILITY, 0, null, message);
  4302. }
  4303.  
  4304. public void getMute(Message message) {
  4305. RILRequest obtain = RILRequest.obtain(54, message);
  4306. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4307. send(obtain);
  4308. }
  4309.  
  4310. public void getNeighboringCids(Message message) {
  4311. RILRequest obtain = RILRequest.obtain(75, message);
  4312. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4313. send(obtain);
  4314. }
  4315.  
  4316. public void getNetworkSelectionMode(Message message) {
  4317. RILRequest obtain = RILRequest.obtain(45, message);
  4318. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4319. send(obtain);
  4320. }
  4321.  
  4322. public void getOperator(Message message) {
  4323. RILRequest obtain = RILRequest.obtain(22, message);
  4324. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4325. send(obtain);
  4326. }
  4327.  
  4328. @Deprecated
  4329. public void getPDPContextList(Message message) {
  4330. getDataCallList(message);
  4331. }
  4332.  
  4333. public void getPreferredNetworkType(Message message) {
  4334. RILRequest obtain = RILRequest.obtain(74, message);
  4335. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4336. send(obtain);
  4337. }
  4338.  
  4339. public void getPreferredNetworkTypeWithOptimizeSetting(Message message) {
  4340. byte[] bArr = new byte[(this.mHeaderSize + 0)];
  4341. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  4342. wrap.order(ByteOrder.nativeOrder());
  4343. wrap.put(OEM_IDENTIFIER.getBytes());
  4344. wrap.putInt(591826);
  4345. wrap.putInt(0);
  4346. invokeOemRilRequestRaw(bArr, message);
  4347. riljLog("[EXTDBG] getPreferredNetworkTypeWithOptimizeSetting is called.");
  4348. }
  4349.  
  4350. public void getPreferredVoicePrivacy(Message message) {
  4351. send(RILRequest.obtain(83, message));
  4352. }
  4353.  
  4354. public void getSignalStrength(Message message) {
  4355. RILRequest obtain = RILRequest.obtain(19, message);
  4356. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4357. send(obtain);
  4358. }
  4359.  
  4360. public void getSimLock(Message message) {
  4361. byte[] bArr = new byte[(this.mHeaderSize + 0)];
  4362. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  4363. wrap.order(ByteOrder.nativeOrder());
  4364. wrap.put(OEM_IDENTIFIER.getBytes());
  4365. wrap.putInt(592030);
  4366. wrap.putInt(0);
  4367. invokeOemRilRequestRaw(bArr, message);
  4368. riljLog("[EXTDBG] getSimLock");
  4369. }
  4370.  
  4371. public void getSmscAddress(Message message) {
  4372. RILRequest obtain = RILRequest.obtain(100, message);
  4373. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4374. send(obtain);
  4375. }
  4376.  
  4377. public void getVoiceRadioTechnology(Message message) {
  4378. RILRequest obtain = RILRequest.obtain(OEM_RIL_RDE_Data.RDE_NV_ROAMING_LIST_683_I, message);
  4379. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4380. send(obtain);
  4381. }
  4382.  
  4383. public void getVoiceRegistrationState(Message message) {
  4384. RILRequest obtain = RILRequest.obtain(20, message);
  4385. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4386. send(obtain);
  4387. }
  4388.  
  4389. public void handleCallSetupRequestFromSim(boolean z, Message message) {
  4390. RILRequest obtain = RILRequest.obtain(71, message);
  4391. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4392. int i = z ? 1 : 0;
  4393. obtain.mParcel.writeIntArray(new int[]{i});
  4394. send(obtain);
  4395. }
  4396.  
  4397. public void hangupConnection(int i, Message message) {
  4398. riljLog("hangupConnection: gsmIndex=" + i);
  4399. RILRequest obtain = RILRequest.obtain(12, message);
  4400. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + i);
  4401. obtain.mParcel.writeInt(1);
  4402. obtain.mParcel.writeInt(i);
  4403. send(obtain);
  4404. }
  4405.  
  4406. public void hangupForegroundResumeBackground(Message message) {
  4407. RILRequest obtain = RILRequest.obtain(14, message);
  4408. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4409. send(obtain);
  4410. }
  4411.  
  4412. public void hangupWaitingOrBackground(Message message) {
  4413. RILRequest obtain = RILRequest.obtain(13, message);
  4414. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4415. send(obtain);
  4416. }
  4417.  
  4418. public void iccCloseChannel(int i, Message message) {
  4419. RILRequest obtain = RILRequest.obtain(136, message);
  4420. obtain.mParcel.writeInt(1);
  4421. obtain.mParcel.writeInt(i);
  4422. send(obtain);
  4423. }
  4424.  
  4425. public void iccCloseLogicalChannel(int i, Message message) {
  4426. RILRequest obtain = RILRequest.obtain(116, message);
  4427. obtain.mParcel.writeInt(1);
  4428. obtain.mParcel.writeInt(i);
  4429. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4430. send(obtain);
  4431. }
  4432.  
  4433. public void iccExchangeAPDU(int i, int i2, int i3, int i4, int i5, int i6, String str, Message message) {
  4434. if (i3 < 0) {
  4435. throw new RuntimeException("Invalid channel in iccTransmitApduLogicalChannel: " + i3);
  4436. }
  4437. RILRequest obtain = i3 == 0 ? RILRequest.obtain(134, message) : RILRequest.obtain(137, message);
  4438. obtain.mParcel.writeInt(i3);
  4439. obtain.mParcel.writeInt(i);
  4440. obtain.mParcel.writeInt(i2);
  4441. obtain.mParcel.writeInt(i4);
  4442. obtain.mParcel.writeInt(i5);
  4443. obtain.mParcel.writeInt(i6);
  4444. obtain.mParcel.writeString(str);
  4445. send(obtain);
  4446. }
  4447.  
  4448. public void iccIO(int i, int i2, String str, int i3, int i4, int i5, String str2, String str3, Message message) {
  4449. iccIOForApp(i, i2, str, i3, i4, i5, str2, str3, null, message);
  4450. }
  4451.  
  4452. public void iccIOForApp(int i, int i2, String str, int i3, int i4, int i5, String str2, String str3, String str4, Message message) {
  4453. RILRequest obtain = RILRequest.obtain(28, message);
  4454. obtain.mParcel.writeInt(i);
  4455. obtain.mParcel.writeInt(i2);
  4456. obtain.mParcel.writeString(str);
  4457. obtain.mParcel.writeInt(i3);
  4458. obtain.mParcel.writeInt(i4);
  4459. obtain.mParcel.writeInt(i5);
  4460. obtain.mParcel.writeString(str2);
  4461. obtain.mParcel.writeString(str3);
  4462. obtain.mParcel.writeString(str4);
  4463. riljLog(obtain.serialString() + "> iccIO: " + requestToString(obtain.mRequest) + " 0x" + Integer.toHexString(i) + " 0x" + Integer.toHexString(i2) + " " + " path: " + str + "," + i3 + "," + i4 + "," + i5 + " aid: " + str4);
  4464. send(obtain);
  4465. }
  4466.  
  4467. public void iccOpenChannel(String str, Message message) {
  4468. RILRequest obtain = RILRequest.obtain(135, message);
  4469. obtain.mParcel.writeString(str);
  4470. send(obtain);
  4471. }
  4472.  
  4473. public void iccOpenLogicalChannel(String str, Message message) {
  4474. RILRequest obtain = RILRequest.obtain(115, message);
  4475. obtain.mParcel.writeString(str);
  4476. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4477. send(obtain);
  4478. }
  4479.  
  4480. public void iccTransmitApduBasicChannel(int i, int i2, int i3, int i4, int i5, String str, Message message) {
  4481. iccTransmitApduHelper(114, 0, i, i2, i3, i4, i5, str, message);
  4482. }
  4483.  
  4484. public void iccTransmitApduLogicalChannel(int i, int i2, int i3, int i4, int i5, int i6, String str, Message message) {
  4485. if (i <= 0) {
  4486. throw new RuntimeException("Invalid channel in iccTransmitApduLogicalChannel: " + i);
  4487. }
  4488. iccTransmitApduHelper(117, i, i2, i3, i4, i5, i6, str, message);
  4489. }
  4490.  
  4491. public void invokeOemRilRequestRaw(byte[] bArr, Message message) {
  4492. if (!TelBrand.IS_SBM || !replaceInvokeOemRilRequestRaw(bArr, message)) {
  4493. RILRequest obtain = RILRequest.obtain(59, message);
  4494. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + "[" + IccUtils.bytesToHexString(bArr) + "]");
  4495. obtain.mParcel.writeByteArray(bArr);
  4496. send(obtain);
  4497. }
  4498. }
  4499.  
  4500. public void invokeOemRilRequestStrings(String[] strArr, Message message) {
  4501. RILRequest obtain = RILRequest.obtain(60, message);
  4502. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4503. obtain.mParcel.writeStringArray(strArr);
  4504. send(obtain);
  4505. }
  4506.  
  4507. public boolean isRunning() {
  4508. boolean z = this.mSenderThread != null && this.mSenderThread.isAlive();
  4509. boolean z2 = this.mReceiverThread != null && this.mReceiverThread.isAlive();
  4510. return z && z2;
  4511. }
  4512.  
  4513. /* Access modifiers changed, original: protected */
  4514. public void notifyLteBandInfo(byte[] bArr) {
  4515. if (this.mLteBandInfoRegistrant != null) {
  4516. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  4517. wrap.order(ByteOrder.nativeOrder());
  4518. this.mLteBandInfoRegistrant.notifyRegistrant(new AsyncResult(null, new Integer(wrap.getInt()), null));
  4519. }
  4520. }
  4521.  
  4522. /* Access modifiers changed, original: protected */
  4523. public void notifyModemCap(byte[] bArr, Integer num) {
  4524. this.mModemCapRegistrants.notifyRegistrants(new AsyncResult(null, new UnsolOemHookBuffer(num.intValue(), bArr), null));
  4525. Rlog.d(RILJ_LOG_TAG, "MODEM_CAPABILITY on phone=" + num + " notified to registrants");
  4526. }
  4527.  
  4528. /* Access modifiers changed, original: protected */
  4529. public void notifyOemSignalStrength(byte[] bArr) {
  4530. if (this.mOemSignalStrengthRegistrant != null) {
  4531. this.mOemSignalStrengthRegistrant.notifyRegistrant(new AsyncResult(null, toIntArrayFromByteArray(bArr), null));
  4532. }
  4533. }
  4534.  
  4535. /* Access modifiers changed, original: protected */
  4536. public void notifySimRefresh(byte[] bArr) {
  4537. byte b = (byte) 0;
  4538. int length = bArr.length;
  4539. byte[] bArr2 = new byte[(length + 1)];
  4540. System.arraycopy(bArr, 0, bArr2, 0, length);
  4541. if (this.mInstanceId != null) {
  4542. b = (byte) (this.mInstanceId.intValue() & 255);
  4543. }
  4544. bArr2[length] = b;
  4545. this.mSimRefreshRegistrants.notifyRegistrants(new AsyncResult(null, bArr2, null));
  4546. Rlog.d(RILJ_LOG_TAG, "SIM_REFRESH notified to registrants");
  4547. }
  4548.  
  4549. /* Access modifiers changed, original: protected */
  4550. public void notifySpeechCodec(byte[] bArr) {
  4551. if (TelBrand.IS_SBM && this.mSpeechCodecRegistrant != null) {
  4552. this.mSpeechCodecRegistrant.notifyRegistrant(new AsyncResult(null, toIntArrayFromByteArray(bArr), null));
  4553. }
  4554. }
  4555.  
  4556. /* Access modifiers changed, original: protected */
  4557. public void notifyWwanIwlanCoexist(byte[] bArr) {
  4558. this.mWwanIwlanCoexistenceRegistrants.notifyRegistrants(new AsyncResult(null, bArr, null));
  4559. Rlog.d(RILJ_LOG_TAG, "WWAN, IWLAN coexistence notified to registrants");
  4560. }
  4561.  
  4562. public void nvReadItem(int i, Message message) {
  4563. RILRequest obtain = RILRequest.obtain(118, message);
  4564. obtain.mParcel.writeInt(i);
  4565. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + ' ' + i);
  4566. send(obtain);
  4567. }
  4568.  
  4569. public void nvResetConfig(int i, Message message) {
  4570. RILRequest obtain = RILRequest.obtain(121, message);
  4571. obtain.mParcel.writeInt(1);
  4572. obtain.mParcel.writeInt(i);
  4573. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + ' ' + i);
  4574. send(obtain);
  4575. }
  4576.  
  4577. public void nvWriteCdmaPrl(byte[] bArr, Message message) {
  4578. RILRequest obtain = RILRequest.obtain(120, message);
  4579. obtain.mParcel.writeByteArray(bArr);
  4580. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " (" + bArr.length + " bytes)");
  4581. send(obtain);
  4582. }
  4583.  
  4584. public void nvWriteItem(int i, String str, Message message) {
  4585. RILRequest obtain = RILRequest.obtain(119, message);
  4586. obtain.mParcel.writeInt(i);
  4587. obtain.mParcel.writeString(str);
  4588. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + ' ' + i + ": " + str);
  4589. send(obtain);
  4590. }
  4591.  
  4592. /* Access modifiers changed, original: protected */
  4593. public void onRadioAvailable() {
  4594. updateScreenState();
  4595. }
  4596.  
  4597. public void queryAvailableBandMode(Message message) {
  4598. RILRequest obtain = RILRequest.obtain(66, message);
  4599. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4600. send(obtain);
  4601. }
  4602.  
  4603. public void queryCLIP(Message message) {
  4604. RILRequest obtain = RILRequest.obtain(55, message);
  4605. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4606. send(obtain);
  4607. }
  4608.  
  4609. public void queryCallForwardStatus(int i, int i2, String str, Message message) {
  4610. RILRequest obtain = RILRequest.obtain(33, message);
  4611. obtain.mParcel.writeInt(2);
  4612. obtain.mParcel.writeInt(i);
  4613. obtain.mParcel.writeInt(i2);
  4614. obtain.mParcel.writeInt(PhoneNumberUtils.toaFromString(str));
  4615. obtain.mParcel.writeString(str);
  4616. obtain.mParcel.writeInt(0);
  4617. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + i + " " + i2);
  4618. send(obtain);
  4619. }
  4620.  
  4621. public void queryCallWaiting(int i, Message message) {
  4622. RILRequest obtain = RILRequest.obtain(35, message);
  4623. obtain.mParcel.writeInt(1);
  4624. obtain.mParcel.writeInt(i);
  4625. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + i);
  4626. send(obtain);
  4627. }
  4628.  
  4629. public void queryCdmaRoamingPreference(Message message) {
  4630. RILRequest obtain = RILRequest.obtain(79, message);
  4631. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4632. send(obtain);
  4633. }
  4634.  
  4635. public void queryFacilityLock(String str, String str2, int i, Message message) {
  4636. queryFacilityLockForApp(str, str2, i, null, message);
  4637. }
  4638.  
  4639. public void queryFacilityLockForApp(String str, String str2, int i, String str3, Message message) {
  4640. RILRequest obtain = RILRequest.obtain(42, message);
  4641. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " [" + str + " " + i + " " + str3 + "]");
  4642. obtain.mParcel.writeInt(4);
  4643. obtain.mParcel.writeString(str);
  4644. obtain.mParcel.writeString(str2);
  4645. obtain.mParcel.writeString(Integer.toString(i));
  4646. obtain.mParcel.writeString(str3);
  4647. send(obtain);
  4648. }
  4649.  
  4650. public void queryTTYMode(Message message) {
  4651. RILRequest obtain = RILRequest.obtain(81, message);
  4652. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4653. send(obtain);
  4654. }
  4655.  
  4656. public void rejectCall(Message message) {
  4657. RILRequest obtain = RILRequest.obtain(17, message);
  4658. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4659. send(obtain);
  4660. }
  4661.  
  4662. public boolean replaceInvokeOemRilRequestRaw(byte[] bArr, Message message) {
  4663. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  4664. wrap.order(ByteOrder.nativeOrder());
  4665. byte[] bArr2 = new byte[OEM_IDENTIFIER.length()];
  4666. wrap.get(bArr2);
  4667. if (new String(bArr2).equals(OEM_IDENTIFIER)) {
  4668. return false;
  4669. }
  4670. switch (wrap.getInt(0)) {
  4671. case OemCdmaTelephonyManager.OEM_RIL_REQUEST_CDMA_CHECK_SUBSIDY_LOCK_PASSWD /*33554442*/:
  4672. validateMsl(Arrays.copyOfRange(bArr, 18, 24), message);
  4673. return true;
  4674. default:
  4675. return false;
  4676. }
  4677. }
  4678.  
  4679. public void reportDecryptStatus(boolean z, Message message) {
  4680. if (TelBrand.IS_DCM) {
  4681. RILRequest obtain = RILRequest.obtain(102, message);
  4682. obtain.mParcel.writeInt(1);
  4683. obtain.mParcel.writeInt(z ? 3 : 2);
  4684. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + ": " + z);
  4685. send(obtain);
  4686. }
  4687. }
  4688.  
  4689. public void reportSmsMemoryStatus(boolean z, Message message) {
  4690. int i = 1;
  4691. RILRequest obtain = RILRequest.obtain(102, message);
  4692. obtain.mParcel.writeInt(1);
  4693. Parcel parcel = obtain.mParcel;
  4694. if (!z) {
  4695. i = 0;
  4696. }
  4697. parcel.writeInt(i);
  4698. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + ": " + z);
  4699. send(obtain);
  4700. }
  4701.  
  4702. public void reportStkServiceIsRunning(Message message) {
  4703. RILRequest obtain = RILRequest.obtain(103, message);
  4704. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4705. send(obtain);
  4706. }
  4707.  
  4708. public void requestIccSimAuthentication(int i, String str, String str2, Message message) {
  4709. RILRequest obtain = RILRequest.obtain(125, message);
  4710. obtain.mParcel.writeInt(i);
  4711. obtain.mParcel.writeString(str);
  4712. obtain.mParcel.writeString(str2);
  4713. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4714. send(obtain);
  4715. }
  4716.  
  4717. public void requestIsimAuthentication(String str, Message message) {
  4718. RILRequest obtain = RILRequest.obtain(105, message);
  4719. obtain.mParcel.writeString(str);
  4720. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4721. send(obtain);
  4722. }
  4723.  
  4724. public void requestShutdown(Message message) {
  4725. RILRequest obtain = RILRequest.obtain(129, message);
  4726. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4727. send(obtain);
  4728. }
  4729.  
  4730. public void resetRadio(Message message) {
  4731. RILRequest obtain = RILRequest.obtain(58, message);
  4732. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4733. send(obtain);
  4734. }
  4735.  
  4736. public void sendBurstDtmf(String str, int i, int i2, Message message) {
  4737. RILRequest obtain = RILRequest.obtain(85, message);
  4738. obtain.mParcel.writeInt(3);
  4739. obtain.mParcel.writeString(str);
  4740. obtain.mParcel.writeString(Integer.toString(i));
  4741. obtain.mParcel.writeString(Integer.toString(i2));
  4742. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " : " + str);
  4743. send(obtain);
  4744. }
  4745.  
  4746. public void sendCDMAFeatureCode(String str, Message message) {
  4747. RILRequest obtain = RILRequest.obtain(84, message);
  4748. obtain.mParcel.writeString(str);
  4749. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " : " + str);
  4750. send(obtain);
  4751. }
  4752.  
  4753. public void sendCdmaSms(byte[] bArr, Message message) {
  4754. RILRequest obtain = RILRequest.obtain(87, message);
  4755. constructCdmaSendSmsRilRequest(obtain, bArr);
  4756. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4757. send(obtain);
  4758. }
  4759.  
  4760. public void sendDtmf(char c, Message message) {
  4761. RILRequest obtain = RILRequest.obtain(24, message);
  4762. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4763. obtain.mParcel.writeString(Character.toString(c));
  4764. send(obtain);
  4765. }
  4766.  
  4767. public void sendEnvelope(String str, Message message) {
  4768. RILRequest obtain = RILRequest.obtain(69, message);
  4769. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4770. obtain.mParcel.writeString(str);
  4771. send(obtain);
  4772. }
  4773.  
  4774. public void sendEnvelopeWithStatus(String str, Message message) {
  4775. RILRequest obtain = RILRequest.obtain(107, message);
  4776. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + '[' + str + ']');
  4777. obtain.mParcel.writeString(str);
  4778. send(obtain);
  4779. }
  4780.  
  4781. public void sendImsCdmaSms(byte[] bArr, int i, int i2, Message message) {
  4782. RILRequest obtain = RILRequest.obtain(113, message);
  4783. obtain.mParcel.writeInt(2);
  4784. obtain.mParcel.writeByte((byte) i);
  4785. obtain.mParcel.writeInt(i2);
  4786. constructCdmaSendSmsRilRequest(obtain, bArr);
  4787. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4788. send(obtain);
  4789. }
  4790.  
  4791. public void sendImsGsmSms(String str, String str2, int i, int i2, Message message) {
  4792. RILRequest obtain = RILRequest.obtain(113, message);
  4793. obtain.mParcel.writeInt(1);
  4794. obtain.mParcel.writeByte((byte) i);
  4795. obtain.mParcel.writeInt(i2);
  4796. constructGsmSendSmsRilRequest(obtain, str, str2);
  4797. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4798. send(obtain);
  4799. }
  4800.  
  4801. public void sendSMS(String str, String str2, Message message) {
  4802. RILRequest obtain = RILRequest.obtain(25, message);
  4803. constructGsmSendSmsRilRequest(obtain, str, str2);
  4804. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4805. send(obtain);
  4806. }
  4807.  
  4808. public void sendSMSExpectMore(String str, String str2, Message message) {
  4809. RILRequest obtain = RILRequest.obtain(26, message);
  4810. constructGsmSendSmsRilRequest(obtain, str, str2);
  4811. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4812. send(obtain);
  4813. }
  4814.  
  4815. public void sendTerminalResponse(String str, Message message) {
  4816. RILRequest obtain = RILRequest.obtain(70, message);
  4817. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4818. obtain.mParcel.writeString(str);
  4819. send(obtain);
  4820. }
  4821.  
  4822. public void sendUSSD(String str, Message message) {
  4823. RILRequest obtain = RILRequest.obtain(29, message);
  4824. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + "*******");
  4825. obtain.mParcel.writeString(str);
  4826. send(obtain);
  4827. }
  4828.  
  4829. public void separateConnection(int i, Message message) {
  4830. RILRequest obtain = RILRequest.obtain(52, message);
  4831. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + i);
  4832. obtain.mParcel.writeInt(1);
  4833. obtain.mParcel.writeInt(i);
  4834. send(obtain);
  4835. }
  4836.  
  4837. public void setBandMode(int i, Message message) {
  4838. RILRequest obtain = RILRequest.obtain(65, message);
  4839. obtain.mParcel.writeInt(1);
  4840. obtain.mParcel.writeInt(i);
  4841. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + i);
  4842. send(obtain);
  4843. }
  4844.  
  4845. public void setBandPref(long j, int i, Message message) {
  4846. byte[] bArr = new byte[(this.mHeaderSize + 12)];
  4847. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  4848. wrap.order(ByteOrder.nativeOrder());
  4849. wrap.put(OEM_IDENTIFIER.getBytes());
  4850. wrap.putInt(591830);
  4851. wrap.putInt(12);
  4852. wrap.putLong(j);
  4853. wrap.putInt(i);
  4854. invokeOemRilRequestRaw(bArr, message);
  4855. riljLog("[EXTDBG] setBandPref lteBand: " + j + " wcdmaBand: " + i);
  4856. }
  4857.  
  4858. public void setCLIR(int i, Message message) {
  4859. RILRequest obtain = RILRequest.obtain(32, message);
  4860. obtain.mParcel.writeInt(1);
  4861. obtain.mParcel.writeInt(i);
  4862. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + i);
  4863. send(obtain);
  4864. }
  4865.  
  4866. public void setCallForward(int i, int i2, int i3, String str, int i4, Message message) {
  4867. RILRequest obtain = RILRequest.obtain(34, message);
  4868. obtain.mParcel.writeInt(i);
  4869. obtain.mParcel.writeInt(i2);
  4870. obtain.mParcel.writeInt(i3);
  4871. obtain.mParcel.writeInt(PhoneNumberUtils.toaFromString(str));
  4872. obtain.mParcel.writeString(str);
  4873. obtain.mParcel.writeInt(i4);
  4874. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + i + " " + i2 + " " + i3 + i4);
  4875. send(obtain);
  4876. }
  4877.  
  4878. public void setCallWaiting(boolean z, int i, Message message) {
  4879. RILRequest obtain = RILRequest.obtain(36, message);
  4880. obtain.mParcel.writeInt(2);
  4881. obtain.mParcel.writeInt(z ? 1 : 0);
  4882. obtain.mParcel.writeInt(i);
  4883. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + z + ", " + i);
  4884. send(obtain);
  4885. }
  4886.  
  4887. public void setCdmaBroadcastActivation(boolean z, Message message) {
  4888. int i = 1;
  4889. RILRequest obtain = RILRequest.obtain(94, message);
  4890. obtain.mParcel.writeInt(1);
  4891. Parcel parcel = obtain.mParcel;
  4892. if (z) {
  4893. i = 0;
  4894. }
  4895. parcel.writeInt(i);
  4896. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4897. send(obtain);
  4898. }
  4899.  
  4900. public void setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] cdmaSmsBroadcastConfigInfoArr, Message message) {
  4901. int i = 0;
  4902. RILRequest obtain = RILRequest.obtain(93, message);
  4903. ArrayList arrayList = new ArrayList();
  4904. for (CdmaSmsBroadcastConfigInfo cdmaSmsBroadcastConfigInfo : cdmaSmsBroadcastConfigInfoArr) {
  4905. for (int fromServiceCategory = cdmaSmsBroadcastConfigInfo.getFromServiceCategory(); fromServiceCategory <= cdmaSmsBroadcastConfigInfo.getToServiceCategory(); fromServiceCategory++) {
  4906. arrayList.add(new CdmaSmsBroadcastConfigInfo(fromServiceCategory, fromServiceCategory, cdmaSmsBroadcastConfigInfo.getLanguage(), cdmaSmsBroadcastConfigInfo.isSelected()));
  4907. }
  4908. }
  4909. CdmaSmsBroadcastConfigInfo[] cdmaSmsBroadcastConfigInfoArr2 = (CdmaSmsBroadcastConfigInfo[]) arrayList.toArray(cdmaSmsBroadcastConfigInfoArr);
  4910. obtain.mParcel.writeInt(cdmaSmsBroadcastConfigInfoArr2.length);
  4911. for (int i2 = 0; i2 < cdmaSmsBroadcastConfigInfoArr2.length; i2++) {
  4912. obtain.mParcel.writeInt(cdmaSmsBroadcastConfigInfoArr2[i2].getFromServiceCategory());
  4913. obtain.mParcel.writeInt(cdmaSmsBroadcastConfigInfoArr2[i2].getLanguage());
  4914. obtain.mParcel.writeInt(cdmaSmsBroadcastConfigInfoArr2[i2].isSelected() ? 1 : 0);
  4915. }
  4916. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " with " + cdmaSmsBroadcastConfigInfoArr2.length + " configs : ");
  4917. while (i < cdmaSmsBroadcastConfigInfoArr2.length) {
  4918. riljLog(cdmaSmsBroadcastConfigInfoArr2[i].toString());
  4919. i++;
  4920. }
  4921. send(obtain);
  4922. }
  4923.  
  4924. public void setCdmaRoamingPreference(int i, Message message) {
  4925. RILRequest obtain = RILRequest.obtain(78, message);
  4926. obtain.mParcel.writeInt(1);
  4927. obtain.mParcel.writeInt(i);
  4928. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " : " + i);
  4929. send(obtain);
  4930. }
  4931.  
  4932. public void setCdmaSubscriptionSource(int i, Message message) {
  4933. RILRequest obtain = RILRequest.obtain(77, message);
  4934. obtain.mParcel.writeInt(1);
  4935. obtain.mParcel.writeInt(i);
  4936. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " : " + i);
  4937. send(obtain);
  4938. }
  4939.  
  4940. public void setCellInfoListRate(int i, Message message) {
  4941. riljLog("setCellInfoListRate: " + i);
  4942. RILRequest obtain = RILRequest.obtain(110, message);
  4943. obtain.mParcel.writeInt(1);
  4944. obtain.mParcel.writeInt(i);
  4945. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4946. send(obtain);
  4947. }
  4948.  
  4949. public void setDataAllowed(boolean z, Message message) {
  4950. int i = 1;
  4951. RILRequest obtain = RILRequest.obtain(123, message);
  4952. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + z);
  4953. obtain.mParcel.writeInt(1);
  4954. Parcel parcel = obtain.mParcel;
  4955. if (!z) {
  4956. i = 0;
  4957. }
  4958. parcel.writeInt(i);
  4959. send(obtain);
  4960. }
  4961.  
  4962. public void setDataProfile(DataProfile[] dataProfileArr, Message message) {
  4963. riljLog("Set RIL_REQUEST_SET_DATA_PROFILE");
  4964. RILRequest obtain = RILRequest.obtain(128, null);
  4965. DataProfile.toParcel(obtain.mParcel, dataProfileArr);
  4966. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " with " + dataProfileArr + " Data Profiles : ");
  4967. for (DataProfile dataProfile : dataProfileArr) {
  4968. riljLog(dataProfile.toString());
  4969. }
  4970. send(obtain);
  4971. }
  4972.  
  4973. public void setFacilityLock(String str, boolean z, String str2, int i, Message message) {
  4974. setFacilityLockForApp(str, z, str2, i, null, message);
  4975. }
  4976.  
  4977. public void setFacilityLockForApp(String str, boolean z, String str2, int i, String str3, Message message) {
  4978. RILRequest obtain = RILRequest.obtain(43, message);
  4979. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " [" + str + " " + z + " " + i + " " + str3 + "]");
  4980. obtain.mParcel.writeInt(5);
  4981. obtain.mParcel.writeString(str);
  4982. obtain.mParcel.writeString(z ? "1" : "0");
  4983. obtain.mParcel.writeString(str2);
  4984. obtain.mParcel.writeString(Integer.toString(i));
  4985. obtain.mParcel.writeString(str3);
  4986. send(obtain);
  4987. }
  4988.  
  4989. public void setGsmBroadcastActivation(boolean z, Message message) {
  4990. int i = 1;
  4991. RILRequest obtain = RILRequest.obtain(91, message);
  4992. obtain.mParcel.writeInt(1);
  4993. Parcel parcel = obtain.mParcel;
  4994. if (z) {
  4995. i = 0;
  4996. }
  4997. parcel.writeInt(i);
  4998. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  4999. send(obtain);
  5000. }
  5001.  
  5002. public void setGsmBroadcastConfig(SmsBroadcastConfigInfo[] smsBroadcastConfigInfoArr, Message message) {
  5003. int i = 0;
  5004. RILRequest obtain = RILRequest.obtain(90, message);
  5005. int length = smsBroadcastConfigInfoArr.length;
  5006. obtain.mParcel.writeInt(length);
  5007. for (int i2 = 0; i2 < length; i2++) {
  5008. obtain.mParcel.writeInt(smsBroadcastConfigInfoArr[i2].getFromServiceId());
  5009. obtain.mParcel.writeInt(smsBroadcastConfigInfoArr[i2].getToServiceId());
  5010. obtain.mParcel.writeInt(smsBroadcastConfigInfoArr[i2].getFromCodeScheme());
  5011. obtain.mParcel.writeInt(smsBroadcastConfigInfoArr[i2].getToCodeScheme());
  5012. obtain.mParcel.writeInt(smsBroadcastConfigInfoArr[i2].isSelected() ? 1 : 0);
  5013. }
  5014. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " with " + length + " configs : ");
  5015. while (i < length) {
  5016. riljLog(smsBroadcastConfigInfoArr[i].toString());
  5017. i++;
  5018. }
  5019. send(obtain);
  5020. }
  5021.  
  5022. public void setInitialAttachApn(String str, String str2, int i, String str3, String str4, Message message) {
  5023. RILRequest obtain = RILRequest.obtain(111, message);
  5024. riljLog("Set RIL_REQUEST_SET_INITIAL_ATTACH_APN");
  5025. if (i == -1) {
  5026. i = TextUtils.isEmpty(str3) ? 0 : 3;
  5027. }
  5028. this.mSetInitialAttachApn_Apn = str;
  5029. this.mSetInitialAttachApn_Protocol = str2;
  5030. this.mSetInitialAttachApn_AuthType = i;
  5031. this.mSetInitialAttachApn_Username = str3;
  5032. this.mSetInitialAttachApn_Password = str4;
  5033. this.mRILConnected_SetInitialAttachApn_OnceSkip = false;
  5034. obtain.mParcel.writeString(str);
  5035. obtain.mParcel.writeString(str2);
  5036. obtain.mParcel.writeInt(i);
  5037. obtain.mParcel.writeString(str3);
  5038. obtain.mParcel.writeString(str4);
  5039. if (!"eng".equals(Build.TYPE)) {
  5040. if (str != null) {
  5041. str = "*****";
  5042. }
  5043. if (str3 != null) {
  5044. str3 = "*****";
  5045. }
  5046. if (str4 != null) {
  5047. str4 = "*****";
  5048. }
  5049. }
  5050. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + ", apn:" + str + ", protocol:" + str2 + ", authType:" + i + ", username:" + str3 + ", password:" + str4);
  5051. send(obtain);
  5052. }
  5053.  
  5054. public void setLimitationByChameleon(boolean z, Message message) {
  5055. this.mSetLimitationByChameleon = true;
  5056. this.mLimitationByChameleon = z;
  5057. this.mLimitedService = this.mLimitationByChameleon;
  5058. setLimitedService(message);
  5059. riljLog("[EXTDBG] setLimitationByChameleon: " + this.mLimitationByChameleon);
  5060. }
  5061.  
  5062. public void setLocalCallHold(int i) {
  5063. byte b = (byte) (i & 127);
  5064. Rlog.d(RILJ_LOG_TAG, "setLocalCallHold: lchStatus is " + i);
  5065. sendOemRilRequestRaw(OEMHOOK_EVT_HOOK_SET_LOCAL_CALL_HOLD, 1, new byte[]{b}, null);
  5066. }
  5067.  
  5068. public void setLocationUpdates(boolean z, Message message) {
  5069. int i = 1;
  5070. RILRequest obtain = RILRequest.obtain(76, message);
  5071. obtain.mParcel.writeInt(1);
  5072. Parcel parcel = obtain.mParcel;
  5073. if (!z) {
  5074. i = 0;
  5075. }
  5076. parcel.writeInt(i);
  5077. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + ": " + z);
  5078. send(obtain);
  5079. }
  5080.  
  5081. public void setModemSettingsByChameleon(int i, Message message) {
  5082. byte[] bArr = new byte[(this.mHeaderSize + 4)];
  5083. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  5084. wrap.order(ByteOrder.nativeOrder());
  5085. wrap.put(OEM_IDENTIFIER.getBytes());
  5086. wrap.putInt(591838);
  5087. wrap.putInt(4);
  5088. wrap.putInt(i);
  5089. invokeOemRilRequestRaw(bArr, message);
  5090. riljLog("[EXTDBG] pattern: " + i);
  5091. }
  5092.  
  5093. public void setMute(boolean z, Message message) {
  5094. int i = 1;
  5095. RILRequest obtain = RILRequest.obtain(53, message);
  5096. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + z);
  5097. obtain.mParcel.writeInt(1);
  5098. Parcel parcel = obtain.mParcel;
  5099. if (!z) {
  5100. i = 0;
  5101. }
  5102. parcel.writeInt(i);
  5103. send(obtain);
  5104. }
  5105.  
  5106. public void setNetworkSelectionModeAutomatic(Message message) {
  5107. RILRequest obtain = RILRequest.obtain(46, message);
  5108. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  5109. if (TelBrand.IS_DCM && LOG_NS) {
  5110. RILRadioLogWriter rILRadioLogWriter = new RILRadioLogWriter(2, 0);
  5111. rILRadioLogWriter.setStackTrace();
  5112. Thread thread = new Thread(rILRadioLogWriter);
  5113. if (thread != null) {
  5114. thread.start();
  5115. }
  5116. rILRadioLogWriter = new RILRadioLogWriter(2, 2);
  5117. rILRadioLogWriter.setLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  5118. thread = new Thread(rILRadioLogWriter);
  5119. if (thread != null) {
  5120. thread.start();
  5121. }
  5122. }
  5123. send(obtain);
  5124. }
  5125.  
  5126. public void setNetworkSelectionModeManual(String str, Message message) {
  5127. RILRequest obtain = RILRequest.obtain(47, message);
  5128. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + str);
  5129. obtain.mParcel.writeString(str);
  5130. if (TelBrand.IS_DCM && LOG_NS) {
  5131. RILRadioLogWriter rILRadioLogWriter = new RILRadioLogWriter(2, 0);
  5132. rILRadioLogWriter.setStackTrace();
  5133. Thread thread = new Thread(rILRadioLogWriter);
  5134. if (thread != null) {
  5135. thread.start();
  5136. }
  5137. rILRadioLogWriter = new RILRadioLogWriter(2, 2);
  5138. rILRadioLogWriter.setLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + str);
  5139. thread = new Thread(rILRadioLogWriter);
  5140. if (thread != null) {
  5141. thread.start();
  5142. }
  5143. }
  5144. send(obtain);
  5145. }
  5146.  
  5147. public void setOnNITZTime(Handler handler, int i, Object obj) {
  5148. super.setOnNITZTime(handler, i, obj);
  5149. if (this.mLastNITZTimeInfo != null) {
  5150. this.mNITZTimeRegistrant.notifyRegistrant(new AsyncResult(null, this.mLastNITZTimeInfo, null));
  5151. }
  5152. }
  5153.  
  5154. public void setPhoneType(int i) {
  5155. riljLog("setPhoneType=" + i + " old value=" + this.mPhoneType);
  5156. this.mPhoneType = i;
  5157. }
  5158.  
  5159. public void setPreferredNetworkType(int i, Message message) {
  5160. RILRequest obtain = RILRequest.obtain(73, message);
  5161. obtain.mParcel.writeInt(1);
  5162. obtain.mParcel.writeInt(i);
  5163. this.mPreferredNetworkType = i;
  5164. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " : " + i);
  5165. if (TelBrand.IS_DCM && LOG_NW) {
  5166. RILRadioLogWriter rILRadioLogWriter = new RILRadioLogWriter(0, 0);
  5167. rILRadioLogWriter.setStackTrace();
  5168. Thread thread = new Thread(rILRadioLogWriter);
  5169. if (thread != null) {
  5170. thread.start();
  5171. }
  5172. }
  5173. send(obtain);
  5174. }
  5175.  
  5176. public void setPreferredVoicePrivacy(boolean z, Message message) {
  5177. int i = 1;
  5178. RILRequest obtain = RILRequest.obtain(82, message);
  5179. obtain.mParcel.writeInt(1);
  5180. Parcel parcel = obtain.mParcel;
  5181. if (!z) {
  5182. i = 0;
  5183. }
  5184. parcel.writeInt(i);
  5185. send(obtain);
  5186. }
  5187.  
  5188. public void setRadioPower(boolean z, Message message) {
  5189. int i = 1;
  5190. RILRequest obtain = RILRequest.obtain(23, message);
  5191. obtain.mParcel.writeInt(1);
  5192. Parcel parcel = obtain.mParcel;
  5193. if (!z) {
  5194. i = 0;
  5195. }
  5196. parcel.writeInt(i);
  5197. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + (z ? " on" : " off"));
  5198. send(obtain);
  5199. }
  5200.  
  5201. public void setRatModeOptimizeSetting(boolean z, Message message) {
  5202. byte[] bArr = new byte[(this.mHeaderSize + 4)];
  5203. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  5204. wrap.order(ByteOrder.nativeOrder());
  5205. wrap.put(OEM_IDENTIFIER.getBytes());
  5206. wrap.putInt(591827);
  5207. wrap.putInt(4);
  5208. wrap.putInt(z ? 1 : 0);
  5209. invokeOemRilRequestRaw(bArr, message);
  5210. riljLog("[EXTDBG] setRatModeOptimizeSetting: " + z);
  5211. }
  5212.  
  5213. public void setSmscAddress(String str, Message message) {
  5214. RILRequest obtain = RILRequest.obtain(101, message);
  5215. obtain.mParcel.writeString(str);
  5216. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " : " + str);
  5217. send(obtain);
  5218. }
  5219.  
  5220. public void setSuppServiceNotifications(boolean z, Message message) {
  5221. int i = 1;
  5222. RILRequest obtain = RILRequest.obtain(62, message);
  5223. obtain.mParcel.writeInt(1);
  5224. Parcel parcel = obtain.mParcel;
  5225. if (!z) {
  5226. i = 0;
  5227. }
  5228. parcel.writeInt(i);
  5229. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  5230. send(obtain);
  5231. }
  5232.  
  5233. public void setTTYMode(int i, Message message) {
  5234. RILRequest obtain = RILRequest.obtain(80, message);
  5235. obtain.mParcel.writeInt(1);
  5236. obtain.mParcel.writeInt(i);
  5237. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " : " + i);
  5238. send(obtain);
  5239. }
  5240.  
  5241. public void setUiccSubscription(int i, int i2, int i3, int i4, Message message) {
  5242. RILRequest obtain = RILRequest.obtain(122, message);
  5243. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " slot: " + i + " appIndex: " + i2 + " subId: " + i3 + " subStatus: " + i4);
  5244. obtain.mParcel.writeInt(i);
  5245. obtain.mParcel.writeInt(i2);
  5246. obtain.mParcel.writeInt(i3);
  5247. obtain.mParcel.writeInt(i4);
  5248. send(obtain);
  5249. }
  5250.  
  5251. public void setupDataCall(String str, String str2, String str3, String str4, String str5, String str6, String str7, Message message) {
  5252. RILRequest obtain = RILRequest.obtain(27, message);
  5253. obtain.mParcel.writeInt(7);
  5254. obtain.mParcel.writeString(str);
  5255. obtain.mParcel.writeString(str2);
  5256. obtain.mParcel.writeString(str3);
  5257. obtain.mParcel.writeString(str4);
  5258. obtain.mParcel.writeString(str5);
  5259. obtain.mParcel.writeString(str6);
  5260. obtain.mParcel.writeString(str7);
  5261. if (!"eng".equals(Build.TYPE)) {
  5262. if (str3 != null) {
  5263. str3 = "*****";
  5264. }
  5265. if (str4 != null) {
  5266. str4 = "*****";
  5267. }
  5268. if (str5 != null) {
  5269. str5 = "*****";
  5270. }
  5271. }
  5272. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " " + str + " " + str2 + " " + str3 + " " + str4 + " " + str5 + " " + str6 + " " + str7);
  5273. send(obtain);
  5274. }
  5275.  
  5276. public void startDtmf(char c, Message message) {
  5277. RILRequest obtain = RILRequest.obtain(49, message);
  5278. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  5279. obtain.mParcel.writeString(Character.toString(c));
  5280. send(obtain);
  5281. }
  5282.  
  5283. public void stopDtmf(Message message) {
  5284. RILRequest obtain = RILRequest.obtain(50, message);
  5285. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  5286. send(obtain);
  5287. }
  5288.  
  5289. public void supplyDepersonalization(String str, String str2, Message message) {
  5290. RILRequest obtain = RILRequest.obtain(8, message);
  5291. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest) + " Type:" + str2);
  5292. obtain.mParcel.writeInt(2);
  5293. obtain.mParcel.writeString(str2);
  5294. obtain.mParcel.writeString(str);
  5295. send(obtain);
  5296. }
  5297.  
  5298. public void supplyIccPin(String str, Message message) {
  5299. supplyIccPinForApp(str, null, message);
  5300. }
  5301.  
  5302. public void supplyIccPin2(String str, Message message) {
  5303. supplyIccPin2ForApp(str, null, message);
  5304. }
  5305.  
  5306. public void supplyIccPin2ForApp(String str, String str2, Message message) {
  5307. RILRequest obtain = RILRequest.obtain(4, message);
  5308. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  5309. obtain.mParcel.writeInt(2);
  5310. obtain.mParcel.writeString(str);
  5311. obtain.mParcel.writeString(str2);
  5312. send(obtain);
  5313. }
  5314.  
  5315. public void supplyIccPinForApp(String str, String str2, Message message) {
  5316. RILRequest obtain = RILRequest.obtain(2, message);
  5317. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  5318. obtain.mParcel.writeInt(2);
  5319. obtain.mParcel.writeString(str);
  5320. obtain.mParcel.writeString(str2);
  5321. send(obtain);
  5322. }
  5323.  
  5324. public void supplyIccPuk(String str, String str2, Message message) {
  5325. supplyIccPukForApp(str, str2, null, message);
  5326. }
  5327.  
  5328. public void supplyIccPuk2(String str, String str2, Message message) {
  5329. supplyIccPuk2ForApp(str, str2, null, message);
  5330. }
  5331.  
  5332. public void supplyIccPuk2ForApp(String str, String str2, String str3, Message message) {
  5333. RILRequest obtain = RILRequest.obtain(5, message);
  5334. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  5335. obtain.mParcel.writeInt(3);
  5336. obtain.mParcel.writeString(str);
  5337. obtain.mParcel.writeString(str2);
  5338. obtain.mParcel.writeString(str3);
  5339. send(obtain);
  5340. }
  5341.  
  5342. public void supplyIccPukForApp(String str, String str2, String str3, Message message) {
  5343. RILRequest obtain = RILRequest.obtain(3, message);
  5344. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  5345. obtain.mParcel.writeInt(3);
  5346. obtain.mParcel.writeString(str);
  5347. obtain.mParcel.writeString(str2);
  5348. obtain.mParcel.writeString(str3);
  5349. send(obtain);
  5350. }
  5351.  
  5352. public void switchWaitingOrHoldingAndActive(Message message) {
  5353. RILRequest obtain = RILRequest.obtain(15, message);
  5354. riljLog(obtain.serialString() + "> " + requestToString(obtain.mRequest));
  5355. send(obtain);
  5356. }
  5357.  
  5358. public void testingEmergencyCall() {
  5359. riljLog("testingEmergencyCall");
  5360. this.mTestingEmergencyCall.set(true);
  5361. }
  5362.  
  5363. public void updateOemDataSettings(boolean z, boolean z2, boolean z3, Message message) {
  5364. riljLog("[EXTDBG] RIL_REQUEST_OEM_HOOK_RAW_UPDATE_LTE_APN > " + z + " " + z2);
  5365. this.mRILConnected_UpdateOemDataSettings_OnceSkip = false;
  5366. this.mUpdateOemDataSettings_MobileData = z;
  5367. this.mUpdateOemDataSettings_DataRoaming = z2;
  5368. byte[] bArr = new byte[(this.mHeaderSize + 3)];
  5369. ByteBuffer wrap = ByteBuffer.wrap(bArr);
  5370. wrap.order(ByteOrder.nativeOrder());
  5371. wrap.put(OEM_IDENTIFIER.getBytes());
  5372. wrap.putInt(591828);
  5373. wrap.putInt(3);
  5374. if (z) {
  5375. wrap.put((byte) 1);
  5376. } else {
  5377. wrap.put((byte) 0);
  5378. }
  5379. if (z2) {
  5380. wrap.put((byte) 1);
  5381. } else {
  5382. wrap.put((byte) 0);
  5383. }
  5384. if (z3) {
  5385. wrap.put((byte) 1);
  5386. } else {
  5387. wrap.put((byte) 0);
  5388. }
  5389. invokeOemRilRequestRaw(bArr, message);
  5390. riljLog("[EXTDBG] updateOemDataSettings is called.");
  5391. }
  5392.  
  5393. public void updateStackBinding(int i, int i2, Message message) {
  5394. byte b = (byte) i;
  5395. byte b2 = (byte) i2;
  5396. Rlog.d(RILJ_LOG_TAG, "UpdateStackBinding: on Stack: " + i + ", enable/disable: " + i2);
  5397. sendOemRilRequestRaw(OEMHOOK_EVT_HOOK_UPDATE_SUB_BINDING, 2, new byte[]{b, b2}, message);
  5398. }
  5399.  
  5400. public void writeSmsToRuim(int i, String str, Message message) {
  5401. int translateStatus = translateStatus(i);
  5402. RILRequest obtain = RILRequest.obtain(96, message);
  5403. obtain.mParcel.writeInt(translateStatus);
  5404. constructCdmaWriteSmsRilRequest(obtain, IccUtils.hexStringToBytes(str));
  5405. send(obtain);
  5406. }
  5407.  
  5408. public void writeSmsToSim(int i, String str, String str2, Message message) {
  5409. int translateStatus = translateStatus(i);
  5410. RILRequest obtain = RILRequest.obtain(63, message);
  5411. obtain.mParcel.writeInt(translateStatus);
  5412. obtain.mParcel.writeString(str2);
  5413. obtain.mParcel.writeString(str);
  5414. send(obtain);
  5415. }
  5416. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement