RadioIndication.java revision 8fef426fd45393631987dbf54ad5233fd7b9dfde
1/* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package com.android.internal.telephony; 18 19import android.hardware.radio.V1_0.CdmaCallWaiting; 20import android.hardware.radio.V1_0.CdmaInformationRecord; 21import android.hardware.radio.V1_0.CdmaLineControlInfoRecord; 22import android.hardware.radio.V1_0.CdmaNumberInfoRecord; 23import android.hardware.radio.V1_0.CdmaRedirectingNumberInfoRecord; 24import android.hardware.radio.V1_0.CdmaSignalInfoRecord; 25import android.hardware.radio.V1_0.CdmaSmsMessage; 26import android.hardware.radio.V1_0.CdmaT53AudioControlInfoRecord; 27import android.hardware.radio.V1_0.IRadioIndication; 28import android.hardware.radio.V1_0.LceDataInfo; 29import android.hardware.radio.V1_0.PcoDataInfo; 30import android.hardware.radio.V1_0.SetupDataCallResult; 31import android.hardware.radio.V1_0.SimRefreshResult; 32import android.hardware.radio.V1_0.StkCcUnsolSsResult; 33import android.hardware.radio.V1_0.SuppSvcNotification; 34import android.os.AsyncResult; 35import android.os.SystemProperties; 36import android.telephony.SignalStrength; 37import android.telephony.SmsMessage; 38import android.text.TextUtils; 39 40import com.android.internal.telephony.cdma.CdmaCallWaitingNotification; 41import com.android.internal.telephony.cdma.CdmaInformationRecords; 42import com.android.internal.telephony.dataconnection.DataCallResponse; 43import com.android.internal.telephony.dataconnection.DcFailCause; 44import com.android.internal.telephony.gsm.SuppServiceNotification; 45import com.android.internal.telephony.nano.TelephonyProto.SmsSession; 46import com.android.internal.telephony.uicc.IccRefreshResponse; 47import com.android.internal.telephony.uicc.IccUtils; 48 49import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CALL_RING; 50import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_CALL_WAITING; 51import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_INFO_REC; 52import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_OTA_PROVISION_STATUS; 53import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL; 54import static com.android.internal.telephony.RILConstants.RIL_UNSOL_DATA_CALL_LIST_CHANGED; 55import static com.android.internal.telephony.RILConstants.RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE; 56import static com.android.internal.telephony.RILConstants.RIL_UNSOL_NITZ_TIME_RECEIVED; 57import static com.android.internal.telephony.RILConstants.RIL_UNSOL_ON_USSD; 58import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED; 59import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_CDMA_NEW_SMS; 60import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS; 61import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_SMS; 62import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM; 63import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT; 64import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED; 65import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED; 66import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED; 67import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESTRICTED_STATE_CHANGED; 68import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SIGNAL_STRENGTH; 69import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SIM_REFRESH; 70import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SIM_SMS_STORAGE_FULL; 71import static com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_CALL_SETUP; 72import static com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_EVENT_NOTIFY; 73import static com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_PROACTIVE_COMMAND; 74import static com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_SESSION_END; 75import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SUPP_SVC_NOTIFICATION; 76 77import java.util.ArrayList; 78 79public class RadioIndication extends IRadioIndication.Stub { 80 RIL mRil; 81 82 RadioIndication(RIL ril) { 83 mRil = ril; 84 } 85 86 /** 87 * Indicates when radio state changes. 88 * @param indicationType RadioIndicationType 89 * @param radioState android.hardware.radio.V1_0.RadioState 90 */ 91 public void radioStateChanged(int indicationType, int radioState) { 92 mRil.processIndication(indicationType); 93 94 CommandsInterface.RadioState newState = getRadioStateFromInt(radioState); 95 if (RIL.RILJ_LOGD) { 96 mRil.unsljLogMore(RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, "radioStateChanged: " + 97 newState); 98 } 99 100 mRil.setRadioState(newState); 101 } 102 103 public void callStateChanged(int indicationType) { 104 mRil.processIndication(indicationType); 105 106 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED); 107 108 mRil.mCallStateRegistrants.notifyRegistrants(); 109 } 110 111 public void voiceNetworkStateChanged(int indicationType) { 112 mRil.processIndication(indicationType); 113 114 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED); 115 116 mRil.mVoiceNetworkStateRegistrants.notifyRegistrants(); 117 } 118 119 public void newSms(int indicationType, ArrayList<Byte> pdu) { 120 mRil.processIndication(indicationType); 121 122 byte[] pduArray = RIL.arrayListToPrimitiveArray(pdu); 123 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_RESPONSE_NEW_SMS); 124 125 mRil.writeMetricsNewSms(SmsSession.Event.Tech.SMS_GSM, 126 SmsSession.Event.Format.SMS_FORMAT_3GPP); 127 128 SmsMessage sms = SmsMessage.newFromCMT(pduArray); 129 if (mRil.mGsmSmsRegistrant != null) { 130 mRil.mGsmSmsRegistrant.notifyRegistrant(new AsyncResult(null, sms, null)); 131 } 132 } 133 134 public void newSmsStatusReport(int indicationType, ArrayList<Byte> pdu) { 135 mRil.processIndication(indicationType); 136 137 byte[] pduArray = RIL.arrayListToPrimitiveArray(pdu); 138 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT); 139 140 if (mRil.mSmsStatusRegistrant != null) { 141 mRil.mSmsStatusRegistrant.notifyRegistrant(new AsyncResult(null, pduArray, null)); 142 } 143 } 144 145 public void newSmsOnSim(int indicationType, int recordNumber) { 146 mRil.processIndication(indicationType); 147 148 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM); 149 150 if (mRil.mSmsOnSimRegistrant != null) { 151 mRil.mSmsOnSimRegistrant.notifyRegistrant(new AsyncResult(null, recordNumber, null)); 152 } 153 } 154 155 public void onUssd(int indicationType, int ussdModeType, String msg) { 156 mRil.processIndication(indicationType); 157 158 if (RIL.RILJ_LOGD) mRil.unsljLogMore(RIL_UNSOL_ON_USSD, "" + ussdModeType); 159 160 // todo: Clean this up with a parcelable class for better self-documentation 161 String[] resp = new String[2]; 162 resp[0] = "" + ussdModeType; 163 resp[1] = msg; 164 if (mRil.mUSSDRegistrant != null) { 165 mRil.mUSSDRegistrant.notifyRegistrant(new AsyncResult (null, resp, null)); 166 } 167 } 168 169 public void nitzTimeReceived(int indicationType, String nitzTime, long receivedTime) { 170 mRil.processIndication(indicationType); 171 172 if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_NITZ_TIME_RECEIVED, nitzTime); 173 174 // todo: Clean this up with a parcelable class for better self-documentation 175 Object[] result = new Object[2]; 176 result[0] = nitzTime; 177 result[1] = receivedTime; 178 179 boolean ignoreNitz = SystemProperties.getBoolean( 180 TelephonyProperties.PROPERTY_IGNORE_NITZ, false); 181 182 if (ignoreNitz) { 183 if (RIL.RILJ_LOGD) mRil.riljLog("ignoring UNSOL_NITZ_TIME_RECEIVED"); 184 } else { 185 if (mRil.mNITZTimeRegistrant != null) { 186 mRil.mNITZTimeRegistrant.notifyRegistrant(new AsyncResult (null, result, null)); 187 } 188 // in case NITZ time registrant isn't registered yet, or a new registrant 189 // registers later 190 mRil.mLastNITZTimeInfo = result; 191 } 192 } 193 194 public void currentSignalStrength(int indicationType, 195 android.hardware.radio.V1_0.SignalStrength signalStrength) { 196 mRil.processIndication(indicationType); 197 198 /* 199 SignalStrength ss = SignalStrength.makeSignalStrengthFromHalObject(signalStrength); 200 // Note this is set to "verbose" because it happens frequently 201 if (RIL.RILJ_LOGV) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss); 202 203 if (mRil.mSignalStrengthRegistrant != null) { 204 mRil.mSignalStrengthRegistrant.notifyRegistrant(new AsyncResult (null, ss, null)); 205 } */ 206 } 207 208 public void dataCallListChanged(int indicationType, ArrayList<SetupDataCallResult> dcList) { 209 mRil.processIndication(indicationType); 210 211 ArrayList<DataCallResponse> response = RIL.convertHalDcList(dcList); 212 if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_DATA_CALL_LIST_CHANGED, response); 213 214 mRil.mDataNetworkStateRegistrants.notifyRegistrants(new AsyncResult(null, response, null)); 215 } 216 217 public void suppSvcNotify(int indicationType, SuppSvcNotification suppSvcNotification) { 218 mRil.processIndication(indicationType); 219 220 SuppServiceNotification notification = new SuppServiceNotification(); 221 notification.notificationType = suppSvcNotification.isMT ? 1 : 0; 222 notification.code = suppSvcNotification.code; 223 notification.index = suppSvcNotification.index; 224 notification.type = suppSvcNotification.type; 225 notification.number = suppSvcNotification.number; 226 227 if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_SUPP_SVC_NOTIFICATION, notification); 228 229 if (mRil.mSsnRegistrant != null) { 230 mRil.mSsnRegistrant.notifyRegistrant(new AsyncResult (null, notification, null)); 231 } 232 } 233 234 public void stkSessionEnd(int indicationType) { 235 mRil.processIndication(indicationType); 236 237 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_STK_SESSION_END); 238 239 if (mRil.mCatSessionEndRegistrant != null) { 240 mRil.mCatSessionEndRegistrant.notifyRegistrant(new AsyncResult (null, null, null)); 241 } 242 } 243 244 public void stkProactiveCommand(int indicationType, String cmd) { 245 mRil.processIndication(indicationType); 246 247 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_STK_PROACTIVE_COMMAND); 248 249 if (mRil.mCatProCmdRegistrant != null) { 250 mRil.mCatProCmdRegistrant.notifyRegistrant(new AsyncResult (null, cmd, null)); 251 } 252 } 253 254 public void stkEventNotify(int indicationType, String cmd) { 255 mRil.processIndication(indicationType); 256 257 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_STK_EVENT_NOTIFY); 258 259 if (mRil.mCatEventRegistrant != null) { 260 mRil.mCatEventRegistrant.notifyRegistrant(new AsyncResult (null, cmd, null)); 261 } 262 } 263 264 public void stkCallSetup(int indicationType, long timeout) { 265 mRil.processIndication(indicationType); 266 267 if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_STK_CALL_SETUP, timeout); 268 269 if (mRil.mCatCallSetUpRegistrant != null) { 270 mRil.mCatCallSetUpRegistrant.notifyRegistrant(new AsyncResult (null, timeout, null)); 271 } 272 } 273 274 public void simSmsStorageFull(int indicationType) { 275 mRil.processIndication(indicationType); 276 277 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_SIM_SMS_STORAGE_FULL); 278 279 if (mRil.mIccSmsFullRegistrant != null) { 280 mRil.mIccSmsFullRegistrant.notifyRegistrant(); 281 } 282 } 283 284 public void simRefresh(int indicationType, SimRefreshResult refreshResult) { 285 mRil.processIndication(indicationType); 286 287 IccRefreshResponse response = new IccRefreshResponse(); 288 response.refreshResult = refreshResult.type; 289 response.efId = refreshResult.efId; 290 response.aid = refreshResult.aid; 291 292 if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_SIM_REFRESH, response); 293 294 mRil.mIccRefreshRegistrants.notifyRegistrants(new AsyncResult (null, response, null)); 295 } 296 297 public void callRing(int indicationType, boolean isGsm, CdmaSignalInfoRecord record) { 298 mRil.processIndication(indicationType); 299 300 char response[] = null; 301 302 // Ignore record for gsm 303 if (!isGsm) { 304 // todo: Clean this up with a parcelable class for better self-documentation 305 response = new char[4]; 306 response[0] = (char) (record.isPresent ? 1 : 0); 307 response[1] = (char) record.signalType; 308 response[2] = (char) record.alertPitch; 309 response[3] = (char) record.signal; 310 mRil.writeMetricsCallRing(response); 311 } 312 313 if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_CALL_RING, response); 314 315 if (mRil.mRingRegistrant != null) { 316 mRil.mRingRegistrant.notifyRegistrant(new AsyncResult (null, response, null)); 317 } 318 } 319 320 public void simStatusChanged(int indicationType) { 321 mRil.processIndication(indicationType); 322 323 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED); 324 325 mRil.mIccStatusChangedRegistrants.notifyRegistrants(); 326 } 327 328 public void cdmaNewSms(int indicationType, CdmaSmsMessage msg) { 329 mRil.processIndication(indicationType); 330 331 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_RESPONSE_CDMA_NEW_SMS); 332 333 mRil.writeMetricsNewSms(SmsSession.Event.Tech.SMS_CDMA, 334 SmsSession.Event.Format.SMS_FORMAT_3GPP2); 335 336 // todo: conversion from CdmaSmsMessage to SmsMessage should be contained in this class so 337 // that usage of auto-generated HAL classes is limited to this file 338 SmsMessage sms = SmsMessage.newCdmaSmsFromRil(msg); 339 if (mRil.mCdmaSmsRegistrant != null) { 340 mRil.mCdmaSmsRegistrant.notifyRegistrant(new AsyncResult(null, sms, null)); 341 } 342 } 343 344 public void newBroadcastSms(int indicationType, ArrayList<Byte> data) { 345 mRil.processIndication(indicationType); 346 347 byte response[] = RIL.arrayListToPrimitiveArray(data); 348 if (RIL.RILJ_LOGD) { 349 mRil.unsljLogvRet(RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS, 350 IccUtils.bytesToHexString(response)); 351 } 352 353 if (mRil.mGsmBroadcastSmsRegistrant != null) { 354 mRil.mGsmBroadcastSmsRegistrant.notifyRegistrant(new AsyncResult(null, response, null)); 355 } 356 } 357 358 public void cdmaRuimSmsStorageFull(int indicationType) { 359 mRil.processIndication(indicationType); 360 361 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL); 362 363 if (mRil.mIccSmsFullRegistrant != null) { 364 mRil.mIccSmsFullRegistrant.notifyRegistrant(); 365 } 366 } 367 368 public void restrictedStateChanged(int indicationType, int state) { 369 mRil.processIndication(indicationType); 370 371 if (RIL.RILJ_LOGD) mRil.unsljLogvRet(RIL_UNSOL_RESTRICTED_STATE_CHANGED, state); 372 373 if (mRil.mRestrictedStateRegistrant != null) { 374 mRil.mRestrictedStateRegistrant.notifyRegistrant(new AsyncResult (null, state, null)); 375 } 376 } 377 378 public void enterEmergencyCallbackMode(int indicationType) { 379 mRil.processIndication(indicationType); 380 381 if (RIL.RILJ_LOGD) mRil.unsljLog(RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE); 382 383 if (mRil.mEmergencyCallbackModeRegistrant != null) { 384 mRil.mEmergencyCallbackModeRegistrant.notifyRegistrant(); 385 } 386 } 387 388 public void cdmaCallWaiting(int indicationType, CdmaCallWaiting callWaitingRecord) { 389 mRil.processIndication(indicationType); 390 391 // todo: create a CdmaCallWaitingNotification constructor that takes in these fields to make 392 // sure no fields are missing 393 CdmaCallWaitingNotification notification = new CdmaCallWaitingNotification(); 394 notification.number = callWaitingRecord.number; 395 notification.numberPresentation = CdmaCallWaitingNotification.presentationFromCLIP( 396 callWaitingRecord.numberPresentation); 397 notification.name = callWaitingRecord.name; 398 notification.namePresentation = notification.numberPresentation; 399 notification.isPresent = callWaitingRecord.signalInfoRecord.isPresent ? 1 : 0; 400 notification.signalType = callWaitingRecord.signalInfoRecord.signalType; 401 notification.alertPitch = callWaitingRecord.signalInfoRecord.alertPitch; 402 notification.signal = callWaitingRecord.signalInfoRecord.signal; 403 notification.numberType = callWaitingRecord.numbertype; 404 notification.numberPlan = callWaitingRecord.numberPlan; 405 406 if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_CDMA_CALL_WAITING, notification); 407 408 mRil.mCallWaitingInfoRegistrants.notifyRegistrants( 409 new AsyncResult (null, notification, null)); 410 } 411 412 public void cdmaOtaProvisionStatus(int indicationType, int status) { 413 mRil.processIndication(indicationType); 414 415 int response[] = new int[1]; 416 response[0] = status; 417 418 if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_CDMA_OTA_PROVISION_STATUS, response); 419 420 mRil.mOtaProvisionRegistrants.notifyRegistrants(new AsyncResult (null, response, null)); 421 } 422 423 public void cdmaInfoRec(int indicationType, 424 android.hardware.radio.V1_0.CdmaInformationRecords records) { 425 mRil.processIndication(indicationType); 426 427 int numberOfInfoRecs = records.infoRec.size(); 428 for (int i = 0; i < numberOfInfoRecs; i++) { 429 CdmaInformationRecord record = records.infoRec.get(i); 430 int id = record.name; 431 CdmaInformationRecords cdmaInformationRecords; 432 switch (id) { 433 case CdmaInformationRecords.RIL_CDMA_DISPLAY_INFO_REC: 434 case CdmaInformationRecords.RIL_CDMA_EXTENDED_DISPLAY_INFO_REC: 435 CdmaInformationRecords.CdmaDisplayInfoRec cdmaDisplayInfoRec = 436 new CdmaInformationRecords.CdmaDisplayInfoRec(id, 437 record.display.get(0).alphaBuf); 438 cdmaInformationRecords = new CdmaInformationRecords(cdmaDisplayInfoRec); 439 break; 440 441 case CdmaInformationRecords.RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC: 442 case CdmaInformationRecords.RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC: 443 case CdmaInformationRecords.RIL_CDMA_CONNECTED_NUMBER_INFO_REC: 444 CdmaNumberInfoRecord numInfoRecord = record.number.get(0); 445 CdmaInformationRecords.CdmaNumberInfoRec cdmaNumberInfoRec = 446 new CdmaInformationRecords.CdmaNumberInfoRec(id, 447 numInfoRecord.number, 448 numInfoRecord.numberType, 449 numInfoRecord.numberPlan, 450 numInfoRecord.pi, 451 numInfoRecord.si); 452 cdmaInformationRecords = new CdmaInformationRecords(cdmaNumberInfoRec); 453 break; 454 455 case CdmaInformationRecords.RIL_CDMA_SIGNAL_INFO_REC: 456 CdmaSignalInfoRecord signalInfoRecord = record.signal.get(0); 457 CdmaInformationRecords.CdmaSignalInfoRec cdmaSignalInfoRec = 458 new CdmaInformationRecords.CdmaSignalInfoRec( 459 signalInfoRecord.isPresent ? 1 : 0, 460 signalInfoRecord.signalType, 461 signalInfoRecord.alertPitch, 462 signalInfoRecord.signal); 463 cdmaInformationRecords = new CdmaInformationRecords(cdmaSignalInfoRec); 464 break; 465 466 case CdmaInformationRecords.RIL_CDMA_REDIRECTING_NUMBER_INFO_REC: 467 CdmaRedirectingNumberInfoRecord redirectingNumberInfoRecord = 468 record.redir.get(0); 469 CdmaInformationRecords.CdmaRedirectingNumberInfoRec 470 cdmaRedirectingNumberInfoRec = 471 new CdmaInformationRecords.CdmaRedirectingNumberInfoRec( 472 redirectingNumberInfoRecord.redirectingNumber.number, 473 redirectingNumberInfoRecord.redirectingNumber.numberType, 474 redirectingNumberInfoRecord.redirectingNumber.numberPlan, 475 redirectingNumberInfoRecord.redirectingNumber.pi, 476 redirectingNumberInfoRecord.redirectingNumber.si, 477 redirectingNumberInfoRecord.redirectingReason); 478 cdmaInformationRecords = new CdmaInformationRecords( 479 cdmaRedirectingNumberInfoRec); 480 break; 481 482 case CdmaInformationRecords.RIL_CDMA_LINE_CONTROL_INFO_REC: 483 CdmaLineControlInfoRecord lineControlInfoRecord = record.lineCtrl.get(0); 484 CdmaInformationRecords.CdmaLineControlInfoRec cdmaLineControlInfoRec = 485 new CdmaInformationRecords.CdmaLineControlInfoRec( 486 lineControlInfoRecord.lineCtrlPolarityIncluded, 487 lineControlInfoRecord.lineCtrlToggle, 488 lineControlInfoRecord.lineCtrlReverse, 489 lineControlInfoRecord.lineCtrlPowerDenial); 490 cdmaInformationRecords = new CdmaInformationRecords(cdmaLineControlInfoRec); 491 break; 492 493 case CdmaInformationRecords.RIL_CDMA_T53_CLIR_INFO_REC: 494 CdmaInformationRecords.CdmaT53ClirInfoRec cdmaT53ClirInfoRec = 495 new CdmaInformationRecords.CdmaT53ClirInfoRec(record.clir.get(0).cause); 496 cdmaInformationRecords = new CdmaInformationRecords(cdmaT53ClirInfoRec); 497 break; 498 499 case CdmaInformationRecords.RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC: 500 CdmaT53AudioControlInfoRecord audioControlInfoRecord = record.audioCtrl.get(0); 501 CdmaInformationRecords.CdmaT53AudioControlInfoRec cdmaT53AudioControlInfoRec = 502 new CdmaInformationRecords.CdmaT53AudioControlInfoRec( 503 audioControlInfoRecord.upLink, 504 audioControlInfoRecord.downLink); 505 cdmaInformationRecords = new CdmaInformationRecords(cdmaT53AudioControlInfoRec); 506 break; 507 508 default: 509 throw new RuntimeException("RIL_UNSOL_CDMA_INFO_REC: unsupported record. Got " 510 + CdmaInformationRecords.idToString(id) + " "); 511 } 512 513 if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_CDMA_INFO_REC, cdmaInformationRecords); 514 mRil.notifyRegistrantsCdmaInfoRec(cdmaInformationRecords); 515 } 516 } 517 518 public void oemHookRaw(int indicationType, ArrayList<Byte> var2) {} 519 520 public void indicateRingbackTone(int indicationType, boolean var2) {} 521 522 public void resendIncallMute(int indicationType) {} 523 524 public void cdmaSubscriptionSourceChanged(int indicationType, int var2) {} 525 526 public void cdmaPrlChanged(int indicationType, int var2) {} 527 528 public void exitEmergencyCallbackMode(int indicationType) {} 529 530 public void rilConnected(int indicationType) {} 531 532 public void voiceRadioTechChanged(int indicationType, int var2) {} 533 534 public void cellInfoList(int indicationType, ArrayList<android.hardware.radio.V1_0.CellInfo> var2) {} 535 536 public void imsNetworkStateChanged(int indicationType) {} 537 538 public void subscriptionStatusChanged(int indicationType, boolean var2) {} 539 540 public void srvccStateNotify(int indicationType, int var2) {} 541 542 public void hardwareConfigChanged( 543 int indicationType, 544 ArrayList<android.hardware.radio.V1_0.HardwareConfig> var2) {} 545 546 public void radioCapabilityIndication(int indicationType, 547 android.hardware.radio.V1_0.RadioCapability var2) {} 548 549 public void onSupplementaryServiceIndication(int indicationType, StkCcUnsolSsResult var2) {} 550 551 public void stkCallControlAlphaNotify(int indicationType, String var2) {} 552 553 public void lceData(int indicationType, LceDataInfo var2) {} 554 555 public void pcoData(int indicationType, PcoDataInfo var2) {} 556 557 public void modemReset(int indicationType, String var2) {} 558 559 private CommandsInterface.RadioState getRadioStateFromInt(int stateInt) { 560 CommandsInterface.RadioState state; 561 562 switch(stateInt) { 563 case android.hardware.radio.V1_0.RadioState.OFF: 564 state = CommandsInterface.RadioState.RADIO_OFF; 565 break; 566 case android.hardware.radio.V1_0.RadioState.UNAVAILABLE: 567 state = CommandsInterface.RadioState.RADIO_UNAVAILABLE; 568 break; 569 case android.hardware.radio.V1_0.RadioState.ON: 570 state = CommandsInterface.RadioState.RADIO_ON; 571 break; 572 default: 573 throw new RuntimeException("Unrecognized RadioState: " + stateInt); 574 } 575 return state; 576 } 577} 578