• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 package com.android.internal.telephony;
18 
19 import static android.telephony.TelephonyManager.HAL_SERVICE_RADIO;
20 
21 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CALL_RING;
22 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION;
23 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_CALL_WAITING;
24 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_INFO_REC;
25 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_OTA_PROVISION_STATUS;
26 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_PRL_CHANGED;
27 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL;
28 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED;
29 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CELL_INFO_LIST;
30 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_DATA_CALL_LIST_CHANGED;
31 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_EMERGENCY_NUMBER_LIST;
32 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE;
33 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE;
34 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_HARDWARE_CONFIG_CHANGED;
35 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_KEEPALIVE_STATUS;
36 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_LCEDATA_RECV;
37 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_MODEM_RESTART;
38 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_NETWORK_SCAN_RESULT;
39 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_NITZ_TIME_RECEIVED;
40 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_ON_SS;
41 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_ON_USSD;
42 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_PCO_DATA;
43 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG;
44 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RADIO_CAPABILITY;
45 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESEND_INCALL_MUTE;
46 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED;
47 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_CDMA_NEW_SMS;
48 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED;
49 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED;
50 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS;
51 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_SMS;
52 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM;
53 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT;
54 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED;
55 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_SIM_PHONEBOOK_CHANGED;
56 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_SIM_PHONEBOOK_RECORDS_RECEIVED;
57 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED;
58 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RESTRICTED_STATE_CHANGED;
59 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RIL_CONNECTED;
60 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_RINGBACK_TONE;
61 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SIGNAL_STRENGTH;
62 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SIM_REFRESH;
63 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SIM_SMS_STORAGE_FULL;
64 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SRVCC_STATE_NOTIFY;
65 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_CALL_SETUP;
66 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_CC_ALPHA_NOTIFY;
67 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_EVENT_NOTIFY;
68 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_PROACTIVE_COMMAND;
69 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_SESSION_END;
70 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SUPP_SVC_NOTIFICATION;
71 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_UICC_APPLICATIONS_ENABLEMENT_CHANGED;
72 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED;
73 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_UNTHROTTLE_APN;
74 import static com.android.internal.telephony.RILConstants.RIL_UNSOL_VOICE_RADIO_TECH_CHANGED;
75 
76 import android.hardware.radio.V1_0.CdmaCallWaiting;
77 import android.hardware.radio.V1_0.CdmaInformationRecord;
78 import android.hardware.radio.V1_0.CdmaLineControlInfoRecord;
79 import android.hardware.radio.V1_0.CdmaNumberInfoRecord;
80 import android.hardware.radio.V1_0.CdmaRedirectingNumberInfoRecord;
81 import android.hardware.radio.V1_0.CdmaSignalInfoRecord;
82 import android.hardware.radio.V1_0.CdmaSmsMessage;
83 import android.hardware.radio.V1_0.CdmaT53AudioControlInfoRecord;
84 import android.hardware.radio.V1_0.CfData;
85 import android.hardware.radio.V1_0.LceDataInfo;
86 import android.hardware.radio.V1_0.PcoDataInfo;
87 import android.hardware.radio.V1_0.SimRefreshResult;
88 import android.hardware.radio.V1_0.SsInfoData;
89 import android.hardware.radio.V1_0.StkCcUnsolSsResult;
90 import android.hardware.radio.V1_0.SuppSvcNotification;
91 import android.hardware.radio.V1_6.IRadioIndication;
92 import android.hardware.radio.V1_6.PhonebookRecordInfo;
93 import android.hardware.radio.V1_6.PhysicalChannelConfig.Band;
94 import android.os.AsyncResult;
95 import android.os.RemoteException;
96 import android.sysprop.TelephonyProperties;
97 import android.telephony.AnomalyReporter;
98 import android.telephony.BarringInfo;
99 import android.telephony.CellIdentity;
100 import android.telephony.CellInfo;
101 import android.telephony.LinkCapacityEstimate;
102 import android.telephony.NetworkRegistrationInfo;
103 import android.telephony.PcoData;
104 import android.telephony.PhysicalChannelConfig;
105 import android.telephony.ServiceState;
106 import android.telephony.SignalStrength;
107 import android.telephony.SmsMessage;
108 import android.telephony.data.DataCallResponse;
109 import android.telephony.emergency.EmergencyNumber;
110 import android.text.TextUtils;
111 
112 import com.android.internal.telephony.cdma.CdmaCallWaitingNotification;
113 import com.android.internal.telephony.cdma.CdmaInformationRecords;
114 import com.android.internal.telephony.data.KeepaliveStatus;
115 import com.android.internal.telephony.flags.Flags;
116 import com.android.internal.telephony.gsm.SsData;
117 import com.android.internal.telephony.gsm.SuppServiceNotification;
118 import com.android.internal.telephony.uicc.IccRefreshResponse;
119 import com.android.internal.telephony.uicc.IccUtils;
120 import com.android.internal.telephony.uicc.ReceivedPhonebookRecords;
121 import com.android.internal.telephony.uicc.SimPhonebookRecord;
122 
123 import java.util.ArrayList;
124 import java.util.List;
125 import java.util.UUID;
126 
127 public class RadioIndication extends IRadioIndication.Stub {
128     RIL mRil;
129 
RadioIndication(RIL ril)130     RadioIndication(RIL ril) {
131         mRil = ril;
132     }
133 
134     /**
135      * Indicates when radio state changes.
136      * @param indicationType RadioIndicationType
137      * @param radioState android.hardware.radio.V1_0.RadioState
138      */
radioStateChanged(int indicationType, int radioState)139     public void radioStateChanged(int indicationType, int radioState) {
140         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
141 
142         int state = RILUtils.convertHalRadioState(radioState);
143         if (mRil.isLogOrTrace()) {
144             mRil.unsljLogMore(
145                     RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, "radioStateChanged: " + state);
146         }
147 
148         mRil.setRadioState(state, false /* forceNotifyRegistrants */);
149     }
150 
callStateChanged(int indicationType)151     public void callStateChanged(int indicationType) {
152         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
153 
154         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED);
155 
156         mRil.mCallStateRegistrants.notifyRegistrants();
157     }
158 
159     /**
160      * Indicates when either voice or data network state changed
161      * @param indicationType RadioIndicationType
162      */
networkStateChanged(int indicationType)163     public void networkStateChanged(int indicationType) {
164         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
165 
166         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED);
167 
168         mRil.mNetworkStateRegistrants.notifyRegistrants();
169     }
170 
newSms(int indicationType, ArrayList<Byte> pdu)171     public void newSms(int indicationType, ArrayList<Byte> pdu) {
172         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
173 
174         byte[] pduArray = RILUtils.arrayListToPrimitiveArray(pdu);
175         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_RESPONSE_NEW_SMS);
176 
177         SmsMessageBase smsb = com.android.internal.telephony.gsm.SmsMessage.createFromPdu(pduArray);
178         if (mRil.mGsmSmsRegistrant != null) {
179             mRil.mGsmSmsRegistrant.notifyRegistrant(
180                     new AsyncResult(null, smsb == null ? null : new SmsMessage(smsb), null));
181         }
182     }
183 
newSmsStatusReport(int indicationType, ArrayList<Byte> pdu)184     public void newSmsStatusReport(int indicationType, ArrayList<Byte> pdu) {
185         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
186 
187         byte[] pduArray = RILUtils.arrayListToPrimitiveArray(pdu);
188         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT);
189 
190         if (mRil.mSmsStatusRegistrant != null) {
191             mRil.mSmsStatusRegistrant.notifyRegistrant(new AsyncResult(null, pduArray, null));
192         }
193     }
194 
newSmsOnSim(int indicationType, int recordNumber)195     public void newSmsOnSim(int indicationType, int recordNumber) {
196         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
197 
198         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM);
199 
200         if (mRil.mSmsOnSimRegistrant != null) {
201             mRil.mSmsOnSimRegistrant.notifyRegistrant(new AsyncResult(null, recordNumber, null));
202         }
203     }
204 
onUssd(int indicationType, int ussdModeType, String msg)205     public void onUssd(int indicationType, int ussdModeType, String msg) {
206         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
207 
208         if (mRil.isLogOrTrace()) mRil.unsljLogMore(RIL_UNSOL_ON_USSD, "" + ussdModeType);
209 
210         // todo: Clean this up with a parcelable class for better self-documentation
211         String[] resp = new String[2];
212         resp[0] = "" + ussdModeType;
213         resp[1] = msg;
214         if (mRil.mUSSDRegistrant != null) {
215             mRil.mUSSDRegistrant.notifyRegistrant(new AsyncResult (null, resp, null));
216         }
217     }
218 
nitzTimeReceived(int indicationType, String nitzTime, long receivedTime)219     public void nitzTimeReceived(int indicationType, String nitzTime, long receivedTime) {
220         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
221 
222         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_NITZ_TIME_RECEIVED, nitzTime);
223 
224         // todo: Clean this up with a parcelable class for better self-documentation
225         Object[] result = new Object[2];
226         result[0] = nitzTime;
227         result[1] = receivedTime;
228 
229         boolean ignoreNitz = TelephonyProperties.ignore_nitz().orElse(false);
230 
231         if (ignoreNitz) {
232             if (mRil.isLogOrTrace()) mRil.riljLog("ignoring UNSOL_NITZ_TIME_RECEIVED");
233         } else {
234             if (mRil.mNITZTimeRegistrant != null) {
235                 mRil.mNITZTimeRegistrant.notifyRegistrant(new AsyncResult (null, result, null));
236             }
237             // in case NITZ time registrant isn't registered yet, or a new registrant
238             // registers later
239             mRil.mLastNITZTimeInfo = result;
240         }
241     }
242 
currentSignalStrength(int indicationType, android.hardware.radio.V1_0.SignalStrength signalStrength)243     public void currentSignalStrength(int indicationType,
244             android.hardware.radio.V1_0.SignalStrength signalStrength) {
245         mRil.unsljLogMore(RIL_UNSOL_SIGNAL_STRENGTH, "unsupported on IRadio < 1.4");
246     }
247 
248     /**
249      * Indicates current link capacity estimate.
250      */
currentLinkCapacityEstimate(int indicationType, android.hardware.radio.V1_2.LinkCapacityEstimate lce)251     public void currentLinkCapacityEstimate(int indicationType,
252             android.hardware.radio.V1_2.LinkCapacityEstimate lce) {
253         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
254 
255         List<LinkCapacityEstimate> response = RILUtils.convertHalLinkCapacityEstimate(lce);
256 
257         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_LCEDATA_RECV, response);
258 
259         if (mRil.mLceInfoRegistrants != null) {
260             mRil.mLceInfoRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
261         }
262     }
263 
264     /**
265      * Indicates current link capacity estimate.
266      */
currentLinkCapacityEstimate_1_6(int indicationType, android.hardware.radio.V1_6.LinkCapacityEstimate lce)267     public void currentLinkCapacityEstimate_1_6(int indicationType,
268             android.hardware.radio.V1_6.LinkCapacityEstimate lce) {
269         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
270 
271         List<LinkCapacityEstimate> response = RILUtils.convertHalLinkCapacityEstimate(lce);
272 
273         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_LCEDATA_RECV, response);
274 
275         if (mRil.mLceInfoRegistrants != null) {
276             mRil.mLceInfoRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
277         }
278     }
279 
280     /**
281      * Indicates the current signal strength of the camped or primary serving cell.
282      */
currentSignalStrength_1_2(int indicationType, android.hardware.radio.V1_2.SignalStrength signalStrength)283     public void currentSignalStrength_1_2(int indicationType,
284             android.hardware.radio.V1_2.SignalStrength signalStrength) {
285         mRil.unsljLogMore(RIL_UNSOL_SIGNAL_STRENGTH, "unsupported on IRadio < 1.4");
286     }
287 
288     /**
289      * Indicates the current signal strength of the camped or primary serving cell.
290      */
currentSignalStrength_1_4(int indicationType, android.hardware.radio.V1_4.SignalStrength signalStrength)291     public void currentSignalStrength_1_4(int indicationType,
292             android.hardware.radio.V1_4.SignalStrength signalStrength) {
293 
294         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
295 
296         SignalStrength ss = RILUtils.convertHalSignalStrength(signalStrength);
297 
298         if (mRil.isLogvOrTrace()) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss);
299 
300         if (mRil.mSignalStrengthRegistrant != null) {
301             mRil.mSignalStrengthRegistrant.notifyRegistrant(new AsyncResult(null, ss, null));
302         }
303     }
304 
305     /**
306      * Indicates the current signal strength of the camped or primary serving cell.
307      */
currentSignalStrength_1_6(int indicationType, android.hardware.radio.V1_6.SignalStrength signalStrength)308     public void currentSignalStrength_1_6(int indicationType,
309             android.hardware.radio.V1_6.SignalStrength signalStrength) {
310 
311         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
312 
313         SignalStrength ss = RILUtils.convertHalSignalStrength(signalStrength);
314 
315         if (mRil.isLogvOrTrace()) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss);
316 
317         if (mRil.mSignalStrengthRegistrant != null) {
318             mRil.mSignalStrengthRegistrant.notifyRegistrant(new AsyncResult(null, ss, null));
319         }
320     }
321 
322     /**
323      * Indicates current physical channel configuration.
324      */
currentPhysicalChannelConfigs_1_4(int indicationType, ArrayList<android.hardware.radio.V1_4.PhysicalChannelConfig> configs)325     public void currentPhysicalChannelConfigs_1_4(int indicationType,
326             ArrayList<android.hardware.radio.V1_4.PhysicalChannelConfig> configs) {
327         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
328         physicalChannelConfigsIndication(configs);
329     }
330 
331     /**
332      * Indicates current physical channel configuration.
333      */
currentPhysicalChannelConfigs_1_6(int indicationType, ArrayList<android.hardware.radio.V1_6.PhysicalChannelConfig> configs)334     public void currentPhysicalChannelConfigs_1_6(int indicationType,
335             ArrayList<android.hardware.radio.V1_6.PhysicalChannelConfig> configs) {
336         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
337         physicalChannelConfigsIndication(configs);
338     }
339 
340     /**
341      * Indicates current physical channel configuration.
342      */
currentPhysicalChannelConfigs(int indicationType, ArrayList<android.hardware.radio.V1_2.PhysicalChannelConfig> configs)343     public void currentPhysicalChannelConfigs(int indicationType,
344             ArrayList<android.hardware.radio.V1_2.PhysicalChannelConfig> configs) {
345         mRil.unsljLogMore(RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG, "unsupported on IRadio < 1.4");
346     }
347 
348     /**
349      * Indicates current emergency number list.
350      */
currentEmergencyNumberList(int indicationType, ArrayList<android.hardware.radio.V1_4.EmergencyNumber> emergencyNumberList)351     public void currentEmergencyNumberList(int indicationType,
352             ArrayList<android.hardware.radio.V1_4.EmergencyNumber> emergencyNumberList) {
353         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
354         List<EmergencyNumber> response = new ArrayList<>(emergencyNumberList.size());
355 
356         for (android.hardware.radio.V1_4.EmergencyNumber emergencyNumberHal
357                 : emergencyNumberList) {
358             EmergencyNumber emergencyNumber = new EmergencyNumber(emergencyNumberHal.number,
359                     MccTable.countryCodeForMcc(emergencyNumberHal.mcc), emergencyNumberHal.mnc,
360                     emergencyNumberHal.categories, emergencyNumberHal.urns,
361                     emergencyNumberHal.sources, EmergencyNumber.EMERGENCY_CALL_ROUTING_UNKNOWN);
362             response.add(emergencyNumber);
363         }
364 
365         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_EMERGENCY_NUMBER_LIST, response);
366 
367         // Cache emergency number list from last indication.
368         mRil.cacheEmergencyNumberListIndication(response);
369 
370         // Notify emergency number list from radio to registrants
371         mRil.mEmergencyNumberListRegistrants.notifyRegistrants(
372                 new AsyncResult(null, response, null));
373     }
374 
375     /** Indicates current data call list. */
dataCallListChanged(int indicationType, ArrayList<android.hardware.radio.V1_0.SetupDataCallResult> dcList)376     public void dataCallListChanged(int indicationType,
377             ArrayList<android.hardware.radio.V1_0.SetupDataCallResult> dcList) {
378         mRil.unsljLogMore(RIL_UNSOL_DATA_CALL_LIST_CHANGED, "unsupported on IRadio < 1.4");
379     }
380 
381     /** Indicates current data call list with radio HAL 1.4. */
dataCallListChanged_1_4(int indicationType, ArrayList<android.hardware.radio.V1_4.SetupDataCallResult> dcList)382     public void dataCallListChanged_1_4(int indicationType,
383             ArrayList<android.hardware.radio.V1_4.SetupDataCallResult> dcList) {
384         responseDataCallListChanged(indicationType, dcList);
385 
386     }
387 
388     /** Indicates current data call list with radio HAL 1.5. */
dataCallListChanged_1_5(int indicationType, ArrayList<android.hardware.radio.V1_5.SetupDataCallResult> dcList)389     public void dataCallListChanged_1_5(int indicationType,
390             ArrayList<android.hardware.radio.V1_5.SetupDataCallResult> dcList) {
391         responseDataCallListChanged(indicationType, dcList);
392     }
393 
394     /** Indicates current data call list with radio HAL 1.6. */
dataCallListChanged_1_6(int indicationType, ArrayList<android.hardware.radio.V1_6.SetupDataCallResult> dcList)395     public void dataCallListChanged_1_6(int indicationType,
396             ArrayList<android.hardware.radio.V1_6.SetupDataCallResult> dcList) {
397         responseDataCallListChanged(indicationType, dcList);
398     }
399 
400     @Override
unthrottleApn(int indicationType, String apn)401     public void unthrottleApn(int indicationType, String apn)
402             throws RemoteException {
403         responseApnUnthrottled(indicationType, apn);
404     }
405 
suppSvcNotify(int indicationType, SuppSvcNotification suppSvcNotification)406     public void suppSvcNotify(int indicationType, SuppSvcNotification suppSvcNotification) {
407         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
408 
409         SuppServiceNotification notification = new SuppServiceNotification();
410         notification.notificationType = suppSvcNotification.isMT ? 1 : 0;
411         notification.code = suppSvcNotification.code;
412         notification.index = suppSvcNotification.index;
413         notification.type = suppSvcNotification.type;
414         notification.number = suppSvcNotification.number;
415 
416         if (mRil.isLogOrTrace()) {
417             mRil.unsljLogRet(RIL_UNSOL_SUPP_SVC_NOTIFICATION, notification);
418         }
419 
420         if (mRil.mSsnRegistrant != null) {
421             mRil.mSsnRegistrant.notifyRegistrant(new AsyncResult (null, notification, null));
422         }
423     }
424 
stkSessionEnd(int indicationType)425     public void stkSessionEnd(int indicationType) {
426         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
427 
428         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_STK_SESSION_END);
429 
430         if (mRil.mCatSessionEndRegistrant != null) {
431             mRil.mCatSessionEndRegistrant.notifyRegistrant(new AsyncResult (null, null, null));
432         }
433     }
434 
stkProactiveCommand(int indicationType, String cmd)435     public void stkProactiveCommand(int indicationType, String cmd) {
436         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
437 
438         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_STK_PROACTIVE_COMMAND);
439 
440         if (mRil.mCatProCmdRegistrant != null) {
441             mRil.mCatProCmdRegistrant.notifyRegistrant(new AsyncResult (null, cmd, null));
442         }
443     }
444 
stkEventNotify(int indicationType, String cmd)445     public void stkEventNotify(int indicationType, String cmd) {
446         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
447 
448         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_STK_EVENT_NOTIFY);
449 
450         if (mRil.mCatEventRegistrant != null) {
451             mRil.mCatEventRegistrant.notifyRegistrant(new AsyncResult (null, cmd, null));
452         }
453     }
454 
stkCallSetup(int indicationType, long timeout)455     public void stkCallSetup(int indicationType, long timeout) {
456         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
457 
458         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_STK_CALL_SETUP, timeout);
459 
460         if (mRil.mCatCallSetUpRegistrant != null) {
461             mRil.mCatCallSetUpRegistrant.notifyRegistrant(new AsyncResult (null, timeout, null));
462         }
463     }
464 
simSmsStorageFull(int indicationType)465     public void simSmsStorageFull(int indicationType) {
466         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
467 
468         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_SIM_SMS_STORAGE_FULL);
469 
470         if (mRil.mIccSmsFullRegistrant != null) {
471             mRil.mIccSmsFullRegistrant.notifyRegistrant();
472         }
473     }
474 
simRefresh(int indicationType, SimRefreshResult refreshResult)475     public void simRefresh(int indicationType, SimRefreshResult refreshResult) {
476         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
477 
478         IccRefreshResponse response = new IccRefreshResponse();
479         response.refreshResult = refreshResult.type;
480         response.efId = refreshResult.efId;
481         response.aid = refreshResult.aid;
482 
483         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_SIM_REFRESH, response);
484 
485         mRil.mIccRefreshRegistrants.notifyRegistrants(new AsyncResult (null, response, null));
486     }
487 
callRing(int indicationType, boolean isGsm, CdmaSignalInfoRecord record)488     public void callRing(int indicationType, boolean isGsm, CdmaSignalInfoRecord record) {
489         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
490 
491         char response[] = null;
492 
493         // Ignore record for gsm
494         if (!isGsm) {
495             // todo: Clean this up with a parcelable class for better self-documentation
496             response = new char[4];
497             response[0] = (char) (record.isPresent ? 1 : 0);
498             response[1] = (char) record.signalType;
499             response[2] = (char) record.alertPitch;
500             response[3] = (char) record.signal;
501             mRil.writeMetricsCallRing(response);
502         }
503 
504         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_CALL_RING, response);
505 
506         if (mRil.mRingRegistrant != null) {
507             mRil.mRingRegistrant.notifyRegistrant(new AsyncResult (null, response, null));
508         }
509     }
510 
simStatusChanged(int indicationType)511     public void simStatusChanged(int indicationType) {
512         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
513 
514         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED);
515 
516         mRil.mIccStatusChangedRegistrants.notifyRegistrants();
517     }
518 
cdmaNewSms(int indicationType, CdmaSmsMessage msg)519     public void cdmaNewSms(int indicationType, CdmaSmsMessage msg) {
520         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
521 
522         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_RESPONSE_CDMA_NEW_SMS);
523 
524         SmsMessage sms = new SmsMessage(RILUtils.convertHalCdmaSmsMessage(msg));
525         if (mRil.mCdmaSmsRegistrant != null) {
526             mRil.mCdmaSmsRegistrant.notifyRegistrant(new AsyncResult(null, sms, null));
527         }
528     }
529 
newBroadcastSms(int indicationType, ArrayList<Byte> data)530     public void newBroadcastSms(int indicationType, ArrayList<Byte> data) {
531         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
532 
533         byte[] response = RILUtils.arrayListToPrimitiveArray(data);
534         if (mRil.isLogOrTrace()) {
535             mRil.unsljLogvRet(
536                     RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS, IccUtils.bytesToHexString(response));
537         }
538 
539         if (mRil.mGsmBroadcastSmsRegistrant != null) {
540             mRil.mGsmBroadcastSmsRegistrant.notifyRegistrant(new AsyncResult(null, response, null));
541         }
542     }
543 
cdmaRuimSmsStorageFull(int indicationType)544     public void cdmaRuimSmsStorageFull(int indicationType) {
545         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
546 
547         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL);
548 
549         if (mRil.mIccSmsFullRegistrant != null) {
550             mRil.mIccSmsFullRegistrant.notifyRegistrant();
551         }
552     }
553 
restrictedStateChanged(int indicationType, int state)554     public void restrictedStateChanged(int indicationType, int state) {
555         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
556 
557         if (mRil.isLogOrTrace()) mRil.unsljLogvRet(RIL_UNSOL_RESTRICTED_STATE_CHANGED, state);
558 
559         if (mRil.mRestrictedStateRegistrant != null) {
560             mRil.mRestrictedStateRegistrant.notifyRegistrant(new AsyncResult (null, state, null));
561         }
562     }
563 
enterEmergencyCallbackMode(int indicationType)564     public void enterEmergencyCallbackMode(int indicationType) {
565         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
566 
567         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE);
568 
569         if (mRil.mEmergencyCallbackModeRegistrant != null) {
570             mRil.mEmergencyCallbackModeRegistrant.notifyRegistrant();
571         }
572     }
573 
cdmaCallWaiting(int indicationType, CdmaCallWaiting callWaitingRecord)574     public void cdmaCallWaiting(int indicationType, CdmaCallWaiting callWaitingRecord) {
575         if (Flags.phoneTypeCleanup()) return;
576         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
577 
578         // todo: create a CdmaCallWaitingNotification constructor that takes in these fields to make
579         // sure no fields are missing
580         CdmaCallWaitingNotification notification = new CdmaCallWaitingNotification();
581         notification.number = callWaitingRecord.number;
582         notification.numberPresentation = CdmaCallWaitingNotification.presentationFromCLIP(
583                 callWaitingRecord.numberPresentation);
584         notification.name = callWaitingRecord.name;
585         notification.namePresentation = notification.numberPresentation;
586         notification.isPresent = callWaitingRecord.signalInfoRecord.isPresent ? 1 : 0;
587         notification.signalType = callWaitingRecord.signalInfoRecord.signalType;
588         notification.alertPitch = callWaitingRecord.signalInfoRecord.alertPitch;
589         notification.signal = callWaitingRecord.signalInfoRecord.signal;
590         notification.numberType = callWaitingRecord.numberType;
591         notification.numberPlan = callWaitingRecord.numberPlan;
592 
593         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_CDMA_CALL_WAITING, notification);
594 
595         mRil.mCallWaitingInfoRegistrants.notifyRegistrants(
596                 new AsyncResult (null, notification, null));
597     }
598 
cdmaOtaProvisionStatus(int indicationType, int status)599     public void cdmaOtaProvisionStatus(int indicationType, int status) {
600         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
601 
602         int response[] = new int[1];
603         response[0] = status;
604 
605         if (mRil.isLogOrTrace()) {
606             mRil.unsljLogRet(RIL_UNSOL_CDMA_OTA_PROVISION_STATUS, response);
607         }
608 
609         mRil.mOtaProvisionRegistrants.notifyRegistrants(new AsyncResult (null, response, null));
610     }
611 
cdmaInfoRec(int indicationType, android.hardware.radio.V1_0.CdmaInformationRecords records)612     public void cdmaInfoRec(int indicationType,
613                             android.hardware.radio.V1_0.CdmaInformationRecords records) {
614         if (Flags.phoneTypeCleanup()) return;
615         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
616 
617         int numberOfInfoRecs = records.infoRec.size();
618         for (int i = 0; i < numberOfInfoRecs; i++) {
619             CdmaInformationRecord record = records.infoRec.get(i);
620             int id = record.name;
621             CdmaInformationRecords cdmaInformationRecords;
622             switch (id) {
623                 case CdmaInformationRecords.RIL_CDMA_DISPLAY_INFO_REC:
624                 case CdmaInformationRecords.RIL_CDMA_EXTENDED_DISPLAY_INFO_REC:
625                     CdmaInformationRecords.CdmaDisplayInfoRec cdmaDisplayInfoRec =
626                             new CdmaInformationRecords.CdmaDisplayInfoRec(id,
627                             record.display.get(0).alphaBuf);
628                     cdmaInformationRecords = new CdmaInformationRecords(cdmaDisplayInfoRec);
629                     break;
630 
631                 case CdmaInformationRecords.RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC:
632                 case CdmaInformationRecords.RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC:
633                 case CdmaInformationRecords.RIL_CDMA_CONNECTED_NUMBER_INFO_REC:
634                     CdmaNumberInfoRecord numInfoRecord = record.number.get(0);
635                     CdmaInformationRecords.CdmaNumberInfoRec cdmaNumberInfoRec =
636                             new CdmaInformationRecords.CdmaNumberInfoRec(id,
637                             numInfoRecord.number,
638                             numInfoRecord.numberType,
639                             numInfoRecord.numberPlan,
640                             numInfoRecord.pi,
641                             numInfoRecord.si);
642                     cdmaInformationRecords = new CdmaInformationRecords(cdmaNumberInfoRec);
643                     break;
644 
645                 case CdmaInformationRecords.RIL_CDMA_SIGNAL_INFO_REC:
646                     CdmaSignalInfoRecord signalInfoRecord = record.signal.get(0);
647                     CdmaInformationRecords.CdmaSignalInfoRec cdmaSignalInfoRec =
648                             new CdmaInformationRecords.CdmaSignalInfoRec(
649                             signalInfoRecord.isPresent ? 1 : 0,
650                             signalInfoRecord.signalType,
651                             signalInfoRecord.alertPitch,
652                             signalInfoRecord.signal);
653                     cdmaInformationRecords = new CdmaInformationRecords(cdmaSignalInfoRec);
654                     break;
655 
656                 case CdmaInformationRecords.RIL_CDMA_REDIRECTING_NUMBER_INFO_REC:
657                     CdmaRedirectingNumberInfoRecord redirectingNumberInfoRecord =
658                             record.redir.get(0);
659                     CdmaInformationRecords.CdmaRedirectingNumberInfoRec
660                             cdmaRedirectingNumberInfoRec =
661                             new CdmaInformationRecords.CdmaRedirectingNumberInfoRec(
662                             redirectingNumberInfoRecord.redirectingNumber.number,
663                             redirectingNumberInfoRecord.redirectingNumber.numberType,
664                             redirectingNumberInfoRecord.redirectingNumber.numberPlan,
665                             redirectingNumberInfoRecord.redirectingNumber.pi,
666                             redirectingNumberInfoRecord.redirectingNumber.si,
667                             redirectingNumberInfoRecord.redirectingReason);
668                     cdmaInformationRecords = new CdmaInformationRecords(
669                             cdmaRedirectingNumberInfoRec);
670                     break;
671 
672                 case CdmaInformationRecords.RIL_CDMA_LINE_CONTROL_INFO_REC:
673                     CdmaLineControlInfoRecord lineControlInfoRecord = record.lineCtrl.get(0);
674                     CdmaInformationRecords.CdmaLineControlInfoRec cdmaLineControlInfoRec =
675                             new CdmaInformationRecords.CdmaLineControlInfoRec(
676                             lineControlInfoRecord.lineCtrlPolarityIncluded,
677                             lineControlInfoRecord.lineCtrlToggle,
678                             lineControlInfoRecord.lineCtrlReverse,
679                             lineControlInfoRecord.lineCtrlPowerDenial);
680                     cdmaInformationRecords = new CdmaInformationRecords(cdmaLineControlInfoRec);
681                     break;
682 
683                 case CdmaInformationRecords.RIL_CDMA_T53_CLIR_INFO_REC:
684                     CdmaInformationRecords.CdmaT53ClirInfoRec cdmaT53ClirInfoRec =
685                             new CdmaInformationRecords.CdmaT53ClirInfoRec(record.clir.get(0).cause);
686                     cdmaInformationRecords = new CdmaInformationRecords(cdmaT53ClirInfoRec);
687                     break;
688 
689                 case CdmaInformationRecords.RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC:
690                     CdmaT53AudioControlInfoRecord audioControlInfoRecord = record.audioCtrl.get(0);
691                     CdmaInformationRecords.CdmaT53AudioControlInfoRec cdmaT53AudioControlInfoRec =
692                             new CdmaInformationRecords.CdmaT53AudioControlInfoRec(
693                             audioControlInfoRecord.upLink,
694                             audioControlInfoRecord.downLink);
695                     cdmaInformationRecords = new CdmaInformationRecords(cdmaT53AudioControlInfoRec);
696                     break;
697 
698                 default:
699                     throw new RuntimeException("RIL_UNSOL_CDMA_INFO_REC: unsupported record. Got "
700                             + CdmaInformationRecords.idToString(id) + " ");
701             }
702 
703             if (mRil.isLogOrTrace()) {
704                 mRil.unsljLogRet(RIL_UNSOL_CDMA_INFO_REC, cdmaInformationRecords);
705             }
706             mRil.notifyRegistrantsCdmaInfoRec(cdmaInformationRecords);
707         }
708     }
709 
indicateRingbackTone(int indicationType, boolean start)710     public void indicateRingbackTone(int indicationType, boolean start) {
711         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
712 
713         if (mRil.isLogOrTrace()) mRil.unsljLogvRet(RIL_UNSOL_RINGBACK_TONE, start);
714 
715         mRil.mRingbackToneRegistrants.notifyRegistrants(new AsyncResult(null, start, null));
716     }
717 
resendIncallMute(int indicationType)718     public void resendIncallMute(int indicationType) {
719         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
720 
721         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_RESEND_INCALL_MUTE);
722 
723         mRil.mResendIncallMuteRegistrants.notifyRegistrants();
724     }
725 
cdmaSubscriptionSourceChanged(int indicationType, int cdmaSource)726     public void cdmaSubscriptionSourceChanged(int indicationType, int cdmaSource) {
727         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
728 
729         int response[] = new int[1];
730         response[0] = cdmaSource;
731 
732         if (mRil.isLogOrTrace()) {
733             mRil.unsljLogRet(RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, response);
734         }
735 
736         mRil.mCdmaSubscriptionChangedRegistrants.notifyRegistrants(
737                 new AsyncResult (null, response, null));
738     }
739 
cdmaPrlChanged(int indicationType, int version)740     public void cdmaPrlChanged(int indicationType, int version) {
741         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
742 
743         int response[] = new int[1];
744         response[0] = version;
745 
746         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_CDMA_PRL_CHANGED, response);
747 
748         mRil.mCdmaPrlChangedRegistrants.notifyRegistrants(
749                 new AsyncResult (null, response, null));
750     }
751 
exitEmergencyCallbackMode(int indicationType)752     public void exitEmergencyCallbackMode(int indicationType) {
753         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
754 
755         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE);
756 
757         mRil.mExitEmergencyCallbackModeRegistrants.notifyRegistrants();
758     }
759 
rilConnected(int indicationType)760     public void rilConnected(int indicationType) {
761         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
762 
763         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_RIL_CONNECTED);
764 
765         // Initial conditions
766         mRil.setRadioPower(false, null);
767         mRil.setCdmaSubscriptionSource(mRil.mCdmaSubscription, null);
768         // todo: this should not require a version number now. Setting it to latest RIL version for
769         // now.
770         mRil.notifyRegistrantsRilConnectionChanged(15);
771     }
772 
voiceRadioTechChanged(int indicationType, int rat)773     public void voiceRadioTechChanged(int indicationType, int rat) {
774         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
775 
776         int response[] = new int[1];
777         response[0] = rat;
778 
779         if (mRil.isLogOrTrace()) {
780             mRil.unsljLogRet(RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, response);
781         }
782 
783         mRil.mVoiceRadioTechChangedRegistrants.notifyRegistrants(
784                 new AsyncResult (null, response, null));
785     }
786 
787     /** Get unsolicited message for cellInfoList */
cellInfoList(int indicationType, ArrayList<android.hardware.radio.V1_0.CellInfo> records)788     public void cellInfoList(int indicationType,
789             ArrayList<android.hardware.radio.V1_0.CellInfo> records) {
790         mRil.unsljLogMore(RIL_UNSOL_CELL_INFO_LIST, "unsupported on IRadio < 1.4");
791     }
792 
793     /** Get unsolicited message for cellInfoList using HAL V1_2 */
cellInfoList_1_2(int indicationType, ArrayList<android.hardware.radio.V1_2.CellInfo> records)794     public void cellInfoList_1_2(int indicationType,
795             ArrayList<android.hardware.radio.V1_2.CellInfo> records) {
796         mRil.unsljLogMore(RIL_UNSOL_CELL_INFO_LIST, "unsupported on IRadio < 1.4");
797     }
798 
799     /** Get unsolicited message for cellInfoList using HAL V1_4 */
cellInfoList_1_4(int indicationType, ArrayList<android.hardware.radio.V1_4.CellInfo> records)800     public void cellInfoList_1_4(int indicationType,
801             ArrayList<android.hardware.radio.V1_4.CellInfo> records) {
802         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
803         responseCellInfoList(records);
804     }
805 
806     /** Get unsolicited message for cellInfoList using HAL V1_5 */
cellInfoList_1_5(int indicationType, ArrayList<android.hardware.radio.V1_5.CellInfo> records)807     public void cellInfoList_1_5(int indicationType,
808             ArrayList<android.hardware.radio.V1_5.CellInfo> records) {
809         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
810         responseCellInfoList(records);
811     }
812 
813     /** Get unsolicited message for cellInfoList using HAL V1_5 */
cellInfoList_1_6(int indicationType, ArrayList<android.hardware.radio.V1_6.CellInfo> records)814     public void cellInfoList_1_6(int indicationType,
815             ArrayList<android.hardware.radio.V1_6.CellInfo> records) {
816         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
817         responseCellInfoList(records);
818     }
819 
responseCellInfoList(ArrayList<? extends Object> records)820     private void responseCellInfoList(ArrayList<? extends Object> records) {
821         ArrayList<CellInfo> response = RILUtils.convertHalCellInfoList((ArrayList<Object>) records);
822         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_CELL_INFO_LIST, response);
823         mRil.mRilCellInfoListRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
824     }
825 
826     /** Get unsolicited message for uicc applications enablement changes. */
uiccApplicationsEnablementChanged(int indicationType, boolean enabled)827     public void uiccApplicationsEnablementChanged(int indicationType, boolean enabled) {
828         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
829 
830         if (mRil.isLogOrTrace()) {
831             mRil.unsljLogRet(RIL_UNSOL_UICC_APPLICATIONS_ENABLEMENT_CHANGED, enabled);
832         }
833 
834         mRil.mUiccApplicationsEnablementRegistrants.notifyResult(enabled);
835     }
836 
837     /** Incremental network scan results */
networkScanResult(int indicationType, android.hardware.radio.V1_1.NetworkScanResult result)838     public void networkScanResult(int indicationType,
839             android.hardware.radio.V1_1.NetworkScanResult result) {
840         mRil.unsljLogMore(RIL_UNSOL_NETWORK_SCAN_RESULT, "unsupported on IRadio < 1.4");
841     }
842 
843     /** Incremental network scan results with HAL V1_2 */
networkScanResult_1_2(int indicationType, android.hardware.radio.V1_2.NetworkScanResult result)844     public void networkScanResult_1_2(int indicationType,
845             android.hardware.radio.V1_2.NetworkScanResult result) {
846         mRil.unsljLogMore(RIL_UNSOL_NETWORK_SCAN_RESULT, "unsupported on IRadio < 1.4");
847     }
848 
849     /** Incremental network scan results with HAL V1_4 */
networkScanResult_1_4(int indicationType, android.hardware.radio.V1_4.NetworkScanResult result)850     public void networkScanResult_1_4(int indicationType,
851             android.hardware.radio.V1_4.NetworkScanResult result) {
852         responseNetworkScan(indicationType, result);
853     }
854 
855     /** Incremental network scan results with HAL V1_5 */
networkScanResult_1_5(int indicationType, android.hardware.radio.V1_5.NetworkScanResult result)856     public void networkScanResult_1_5(int indicationType,
857             android.hardware.radio.V1_5.NetworkScanResult result) {
858         responseNetworkScan_1_5(indicationType, result);
859     }
860 
861     /** Incremental network scan results with HAL V1_6 */
networkScanResult_1_6(int indicationType, android.hardware.radio.V1_6.NetworkScanResult result)862     public void networkScanResult_1_6(int indicationType,
863             android.hardware.radio.V1_6.NetworkScanResult result) {
864         responseNetworkScan_1_6(indicationType, result);
865     }
866 
imsNetworkStateChanged(int indicationType)867     public void imsNetworkStateChanged(int indicationType) {
868         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
869 
870         if (mRil.isLogOrTrace()) mRil.unsljLog(RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED);
871 
872         mRil.mImsNetworkStateChangedRegistrants.notifyRegistrants();
873     }
874 
subscriptionStatusChanged(int indicationType, boolean activate)875     public void subscriptionStatusChanged(int indicationType, boolean activate) {
876         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
877 
878         int response[] = new int[1];
879         response[0] = activate ? 1 : 0;
880 
881         if (mRil.isLogOrTrace()) {
882             mRil.unsljLogRet(RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED, response);
883         }
884 
885         mRil.mSubscriptionStatusRegistrants.notifyRegistrants(
886                 new AsyncResult (null, response, null));
887     }
888 
srvccStateNotify(int indicationType, int state)889     public void srvccStateNotify(int indicationType, int state) {
890         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
891 
892         int response[] = new int[1];
893         response[0] = state;
894 
895         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_SRVCC_STATE_NOTIFY, response);
896 
897         mRil.writeMetricsSrvcc(state);
898 
899         mRil.mSrvccStateRegistrants.notifyRegistrants(
900                 new AsyncResult (null, response, null));
901     }
902 
hardwareConfigChanged(int indicationType, ArrayList<android.hardware.radio.V1_0.HardwareConfig> configs)903     public void hardwareConfigChanged(int indicationType,
904             ArrayList<android.hardware.radio.V1_0.HardwareConfig> configs) {
905         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
906 
907         ArrayList<HardwareConfig> response = RILUtils.convertHalHardwareConfigList(configs);
908 
909         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_HARDWARE_CONFIG_CHANGED, response);
910 
911         mRil.mHardwareConfigChangeRegistrants.notifyRegistrants(
912                 new AsyncResult (null, response, null));
913     }
914 
radioCapabilityIndication(int indicationType, android.hardware.radio.V1_0.RadioCapability rc)915     public void radioCapabilityIndication(int indicationType,
916             android.hardware.radio.V1_0.RadioCapability rc) {
917         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
918 
919         RadioCapability response = RILUtils.convertHalRadioCapability(rc, mRil);
920 
921         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_RADIO_CAPABILITY, response);
922 
923         mRil.mPhoneRadioCapabilityChangedRegistrants.notifyRegistrants(
924                 new AsyncResult (null, response, null));
925     }
926 
onSupplementaryServiceIndication(int indicationType, StkCcUnsolSsResult ss)927     public void onSupplementaryServiceIndication(int indicationType, StkCcUnsolSsResult ss) {
928         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
929 
930         int num;
931         SsData ssData = new SsData();
932 
933         ssData.serviceType = ssData.ServiceTypeFromRILInt(ss.serviceType);
934         ssData.requestType = ssData.RequestTypeFromRILInt(ss.requestType);
935         ssData.teleserviceType = ssData.TeleserviceTypeFromRILInt(ss.teleserviceType);
936         ssData.serviceClass = ss.serviceClass; // This is service class sent in the SS request.
937         ssData.result = ss.result; // This is the result of the SS request.
938 
939         if (ssData.serviceType.isTypeCF() &&
940                 ssData.requestType.isTypeInterrogation()) {
941             CfData cfData = ss.cfData.get(0);
942             num = cfData.cfInfo.size();
943             ssData.cfInfo = new CallForwardInfo[num];
944 
945             for (int i = 0; i < num; i++) {
946                 android.hardware.radio.V1_0.CallForwardInfo cfInfo = cfData.cfInfo.get(i);
947                 ssData.cfInfo[i] = new CallForwardInfo();
948 
949                 ssData.cfInfo[i].status = cfInfo.status;
950                 ssData.cfInfo[i].reason = cfInfo.reason;
951                 ssData.cfInfo[i].serviceClass = cfInfo.serviceClass;
952                 ssData.cfInfo[i].toa = cfInfo.toa;
953                 ssData.cfInfo[i].number = cfInfo.number;
954                 ssData.cfInfo[i].timeSeconds = cfInfo.timeSeconds;
955 
956                 mRil.riljLog("[SS Data] CF Info " + i + " : " +  ssData.cfInfo[i]);
957             }
958         } else {
959             SsInfoData ssInfo = ss.ssInfo.get(0);
960             num = ssInfo.ssInfo.size();
961             ssData.ssInfo = new int[num];
962             for (int i = 0; i < num; i++) {
963                 ssData.ssInfo[i] = ssInfo.ssInfo.get(i);
964                 mRil.riljLog("[SS Data] SS Info " + i + " : " +  ssData.ssInfo[i]);
965             }
966         }
967 
968         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_ON_SS, ssData);
969 
970         if (mRil.mSsRegistrant != null) {
971             mRil.mSsRegistrant.notifyRegistrant(new AsyncResult(null, ssData, null));
972         }
973     }
974 
stkCallControlAlphaNotify(int indicationType, String alpha)975     public void stkCallControlAlphaNotify(int indicationType, String alpha) {
976         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
977 
978         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_STK_CC_ALPHA_NOTIFY, alpha);
979 
980         if (mRil.mCatCcAlphaRegistrant != null) {
981             mRil.mCatCcAlphaRegistrant.notifyRegistrant(new AsyncResult (null, alpha, null));
982         }
983     }
984 
lceData(int indicationType, LceDataInfo lce)985     public void lceData(int indicationType, LceDataInfo lce) {
986         mRil.unsljLogMore(RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG, "unsupported on IRadio < 1.4");
987     }
988 
pcoData(int indicationType, PcoDataInfo pco)989     public void pcoData(int indicationType, PcoDataInfo pco) {
990         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
991 
992         PcoData response = new PcoData(pco.cid, pco.bearerProto, pco.pcoId,
993                 RILUtils.arrayListToPrimitiveArray(pco.contents));
994 
995         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_PCO_DATA, response);
996 
997         mRil.mPcoDataRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
998     }
999 
modemReset(int indicationType, String reason)1000     public void modemReset(int indicationType, String reason) {
1001         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1002 
1003         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_MODEM_RESTART, reason);
1004 
1005         mRil.writeMetricsModemRestartEvent(reason);
1006         mRil.mModemResetRegistrants.notifyRegistrants(new AsyncResult(null, reason, null));
1007     }
1008 
1009     /**
1010      * Indicates when the carrier info to encrypt IMSI is being requested
1011      * @param indicationType RadioIndicationType
1012      */
carrierInfoForImsiEncryption(int indicationType)1013     public void carrierInfoForImsiEncryption(int indicationType) {
1014         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1015 
1016         if (mRil.isLogOrTrace()) {
1017             mRil.unsljLogRet(RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION, null);
1018         }
1019 
1020         mRil.mCarrierInfoForImsiEncryptionRegistrants.notifyRegistrants(
1021                 new AsyncResult(null, null, null));
1022     }
1023 
1024     /**
1025      * Indicates a change in the status of an ongoing Keepalive session
1026      * @param indicationType RadioIndicationType
1027      * @param halStatus Status of the ongoing Keepalive session
1028      */
keepaliveStatus( int indicationType, android.hardware.radio.V1_1.KeepaliveStatus halStatus)1029     public void keepaliveStatus(
1030             int indicationType, android.hardware.radio.V1_1.KeepaliveStatus halStatus) {
1031         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1032 
1033         if (mRil.isLogOrTrace()) {
1034             mRil.unsljLogRet(
1035                     RIL_UNSOL_KEEPALIVE_STATUS,
1036                     "handle=" + halStatus.sessionHandle + " code=" + halStatus.code);
1037         }
1038 
1039         KeepaliveStatus ks = new KeepaliveStatus(
1040                 halStatus.sessionHandle, halStatus.code);
1041         mRil.mNattKeepaliveStatusRegistrants.notifyRegistrants(new AsyncResult(null, ks, null));
1042     }
1043 
1044     /**
1045      * Indicates when the phonebook is changed.
1046      *
1047      * @param indicationType RadioIndicationType
1048      */
simPhonebookChanged(int indicationType)1049     public void simPhonebookChanged(int indicationType) {
1050         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1051 
1052         if (mRil.isLogOrTrace()) {
1053             mRil.unsljLog(RIL_UNSOL_RESPONSE_SIM_PHONEBOOK_CHANGED);
1054         }
1055 
1056         mRil.mSimPhonebookChangedRegistrants.notifyRegistrants();
1057     }
1058 
1059     /**
1060      * Indicates the content of all the used records in the SIM phonebook.
1061      * @param indicationType RadioIndicationType
1062      * @param status Status of PbReceivedStatus
1063      * @param records Content of the SIM phonebook records
1064      */
simPhonebookRecordsReceived(int indicationType, byte status, ArrayList<PhonebookRecordInfo> records)1065     public void simPhonebookRecordsReceived(int indicationType, byte status,
1066             ArrayList<PhonebookRecordInfo> records) {
1067         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1068 
1069         List<SimPhonebookRecord> simPhonebookRecords = new ArrayList<>();
1070 
1071         for (PhonebookRecordInfo record : records) {
1072             simPhonebookRecords.add(RILUtils.convertHalPhonebookRecordInfo(record));
1073         }
1074 
1075         if (mRil.isLogOrTrace()) {
1076             mRil.unsljLogRet(
1077                     RIL_UNSOL_RESPONSE_SIM_PHONEBOOK_RECORDS_RECEIVED,
1078                     "status = " + status + " received " + records.size() + " records");
1079         }
1080 
1081         mRil.mSimPhonebookRecordsReceivedRegistrants.notifyRegistrants(
1082                 new AsyncResult(null,
1083                 new ReceivedPhonebookRecords(status, simPhonebookRecords), null));
1084     }
1085 
1086     /**
1087      * Indicate that a registration failure has occurred.
1088      *
1089      * @param cellIdentity a CellIdentity the CellIdentity of the Cell
1090      * @param chosenPlmn a 5 or 6 digit alphanumeric string indicating the PLMN on which
1091      *        registration failed
1092      * @param domain the domain of the failed procedure: CS, PS, or both
1093      * @param causeCode the primary failure cause code of the procedure
1094      * @param additionalCauseCode an additional cause code if applicable
1095      */
registrationFailed(int indicationType, android.hardware.radio.V1_5.CellIdentity cellIdentity, String chosenPlmn, @NetworkRegistrationInfo.Domain int domain, int causeCode, int additionalCauseCode)1096     public void registrationFailed(int indicationType,
1097             android.hardware.radio.V1_5.CellIdentity cellIdentity, String chosenPlmn,
1098             @NetworkRegistrationInfo.Domain int domain,
1099             int causeCode, int additionalCauseCode) {
1100         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1101         CellIdentity ci = RILUtils.convertHalCellIdentity(cellIdentity);
1102         if (ci == null
1103                 || TextUtils.isEmpty(chosenPlmn)
1104                 || (domain & NetworkRegistrationInfo.DOMAIN_CS_PS) == 0
1105                 || (domain & ~NetworkRegistrationInfo.DOMAIN_CS_PS) != 0
1106                 || causeCode < 0 || additionalCauseCode < 0
1107                 || (causeCode == Integer.MAX_VALUE && additionalCauseCode == Integer.MAX_VALUE)) {
1108             AnomalyReporter.reportAnomaly(
1109                     UUID.fromString("f16e5703-6105-4341-9eb3-e68189156eb4"),
1110                             "Invalid registrationFailed indication");
1111 
1112             mRil.riljLoge("Invalid registrationFailed indication");
1113             return;
1114         }
1115 
1116         mRil.mRegistrationFailedRegistrant.notifyRegistrant(
1117                 new AsyncResult(null, new RegistrationFailedEvent(ci, chosenPlmn, domain,
1118                         causeCode, additionalCauseCode), null));
1119     }
1120 
1121     /**
1122      * Indicate that BarringInfo has changed for the current cell and user.
1123      *
1124      * @param cellIdentity a CellIdentity the CellIdentity of the Cell
1125      * @param barringInfos the updated barring information from the current cell, filtered for the
1126      *        current PLMN and access class / access category.
1127      */
barringInfoChanged(int indicationType, android.hardware.radio.V1_5.CellIdentity cellIdentity, ArrayList<android.hardware.radio.V1_5.BarringInfo> barringInfos)1128     public void barringInfoChanged(int indicationType,
1129             android.hardware.radio.V1_5.CellIdentity cellIdentity,
1130             ArrayList<android.hardware.radio.V1_5.BarringInfo> barringInfos) {
1131         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1132 
1133         if (cellIdentity == null || barringInfos == null) {
1134             AnomalyReporter.reportAnomaly(
1135                     UUID.fromString("645b16bb-c930-4c1c-9c5d-568696542e05"),
1136                             "Invalid barringInfoChanged indication");
1137 
1138             mRil.riljLoge("Invalid barringInfoChanged indication");
1139             return;
1140         }
1141 
1142         BarringInfo cbi = new BarringInfo(RILUtils.convertHalCellIdentity(cellIdentity),
1143                 RILUtils.convertHalBarringInfoList(barringInfos));
1144 
1145         mRil.mBarringInfoChangedRegistrants.notifyRegistrants(
1146                 new AsyncResult(null, cbi, null));
1147     }
1148 
1149     /**
1150      * Set the frequency range or channel number from the physical channel config. Only one of them
1151      * is valid, we should set the other to the unknown value.
1152      * @param builder the builder of {@link PhysicalChannelConfig}.
1153      * @param config physical channel config from ril.
1154      */
setFrequencyRangeOrChannelNumber(PhysicalChannelConfig.Builder builder, android.hardware.radio.V1_4.PhysicalChannelConfig config)1155     private void setFrequencyRangeOrChannelNumber(PhysicalChannelConfig.Builder builder,
1156             android.hardware.radio.V1_4.PhysicalChannelConfig config) {
1157 
1158         switch (config.rfInfo.getDiscriminator()) {
1159             case android.hardware.radio.V1_4.RadioFrequencyInfo.hidl_discriminator.range:
1160                 builder.setFrequencyRange(config.rfInfo.range());
1161                 break;
1162             case android.hardware.radio.V1_4.RadioFrequencyInfo.hidl_discriminator.channelNumber:
1163                 builder.setDownlinkChannelNumber(config.rfInfo.channelNumber());
1164                 break;
1165             default:
1166                 mRil.riljLoge("Unsupported frequency type " + config.rfInfo.getDiscriminator());
1167         }
1168     }
1169 
physicalChannelConfigsIndication(List<? extends Object> configs)1170     private void physicalChannelConfigsIndication(List<? extends Object> configs) {
1171         List<PhysicalChannelConfig> response = new ArrayList<>(configs.size());
1172         try {
1173             for (Object obj : configs) {
1174                 if (obj instanceof android.hardware.radio.V1_4.PhysicalChannelConfig) {
1175                     android.hardware.radio.V1_4.PhysicalChannelConfig config =
1176                             (android.hardware.radio.V1_4.PhysicalChannelConfig) obj;
1177                     PhysicalChannelConfig.Builder builder = new PhysicalChannelConfig.Builder();
1178                     setFrequencyRangeOrChannelNumber(builder, config);
1179                     response.add(builder.setCellConnectionStatus(
1180                             RILUtils.convertHalCellConnectionStatus(config.base.status))
1181                             .setCellBandwidthDownlinkKhz(config.base.cellBandwidthDownlink)
1182                             .setNetworkType(
1183                                     ServiceState.rilRadioTechnologyToNetworkType(config.rat))
1184                             .setPhysicalCellId(config.physicalCellId)
1185                             .setContextIds(config.contextIds.stream().mapToInt(x -> x).toArray())
1186                             .build());
1187                 } else if (obj instanceof android.hardware.radio.V1_6.PhysicalChannelConfig) {
1188                     android.hardware.radio.V1_6.PhysicalChannelConfig config =
1189                             (android.hardware.radio.V1_6.PhysicalChannelConfig) obj;
1190                     PhysicalChannelConfig.Builder builder = new PhysicalChannelConfig.Builder();
1191                     int band = PhysicalChannelConfig.BAND_UNKNOWN;
1192                     switch (config.band.getDiscriminator()) {
1193                         case Band.hidl_discriminator.geranBand:
1194                             band = config.band.geranBand();
1195                             break;
1196                         case Band.hidl_discriminator.utranBand:
1197                             band = config.band.utranBand();
1198                             break;
1199                         case Band.hidl_discriminator.eutranBand:
1200                             band = config.band.eutranBand();
1201                             break;
1202                         case Band.hidl_discriminator.ngranBand:
1203                             band = config.band.ngranBand();
1204                             break;
1205                         default:
1206                             mRil.riljLoge("Unsupported band " + config.band.getDiscriminator());
1207                     }
1208                     if (band == PhysicalChannelConfig.BAND_UNKNOWN) {
1209                         mRil.riljLoge("Unsupported unknown band.");
1210                         // TODO, b/288310456,
1211                         //  If the band is unknown, PhysicalChannelConfig can be built without
1212                         //  setBand. It should be enforced not to allow "unknown" bands in the
1213                         //  near future.
1214                         // return;
1215                     } else {
1216                         builder.setBand(band);
1217                     }
1218                     response.add(builder.setCellConnectionStatus(
1219                             RILUtils.convertHalCellConnectionStatus(config.status))
1220                             .setDownlinkChannelNumber(config.downlinkChannelNumber)
1221                             .setUplinkChannelNumber(config.uplinkChannelNumber)
1222                             .setCellBandwidthDownlinkKhz(config.cellBandwidthDownlinkKhz)
1223                             .setCellBandwidthUplinkKhz(config.cellBandwidthUplinkKhz)
1224                             .setNetworkType(
1225                                     ServiceState.rilRadioTechnologyToNetworkType(config.rat))
1226                             .setPhysicalCellId(config.physicalCellId)
1227                             .setContextIds(config.contextIds.stream().mapToInt(x -> x).toArray())
1228                             .build());
1229                 } else {
1230                     mRil.riljLoge("Unsupported PhysicalChannelConfig " + obj);
1231                 }
1232             }
1233         } catch (IllegalArgumentException iae) {
1234             AnomalyReporter.reportAnomaly(
1235                     UUID.fromString("918f0970-9aa9-4bcd-a28e-e49a83fe77d5"),
1236                             "RIL reported invalid PCC (HIDL)");
1237             mRil.riljLoge("Invalid PhysicalChannelConfig " + iae);
1238             return;
1239         }
1240 
1241         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_PHYSICAL_CHANNEL_CONFIG, response);
1242 
1243         mRil.mPhysicalChannelConfigurationRegistrants.notifyRegistrants(
1244                 new AsyncResult(null, response, null));
1245     }
1246 
responseNetworkScan(int indicationType, android.hardware.radio.V1_4.NetworkScanResult result)1247     private void responseNetworkScan(int indicationType,
1248             android.hardware.radio.V1_4.NetworkScanResult result) {
1249         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1250 
1251         ArrayList<CellInfo> cellInfos =
1252                 RILUtils.convertHalCellInfoList(new ArrayList<>(result.networkInfos));
1253         NetworkScanResult nsr = new NetworkScanResult(result.status, result.error, cellInfos);
1254         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_NETWORK_SCAN_RESULT, nsr);
1255         mRil.mRilNetworkScanResultRegistrants.notifyRegistrants(new AsyncResult(null, nsr, null));
1256     }
1257 
responseNetworkScan_1_5(int indicationType, android.hardware.radio.V1_5.NetworkScanResult result)1258     private void responseNetworkScan_1_5(int indicationType,
1259             android.hardware.radio.V1_5.NetworkScanResult result) {
1260         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1261 
1262         ArrayList<CellInfo> cellInfos =
1263                 RILUtils.convertHalCellInfoList(new ArrayList<>(result.networkInfos));
1264         NetworkScanResult nsr = new NetworkScanResult(result.status, result.error, cellInfos);
1265         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_NETWORK_SCAN_RESULT, nsr);
1266         mRil.mRilNetworkScanResultRegistrants.notifyRegistrants(new AsyncResult(null, nsr, null));
1267     }
1268 
responseNetworkScan_1_6(int indicationType, android.hardware.radio.V1_6.NetworkScanResult result)1269     private void responseNetworkScan_1_6(int indicationType,
1270             android.hardware.radio.V1_6.NetworkScanResult result) {
1271         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1272 
1273         ArrayList<CellInfo> cellInfos =
1274                 RILUtils.convertHalCellInfoList(new ArrayList<>(result.networkInfos));
1275         NetworkScanResult nsr = new NetworkScanResult(result.status, result.error, cellInfos);
1276         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_NETWORK_SCAN_RESULT, nsr);
1277         mRil.mRilNetworkScanResultRegistrants.notifyRegistrants(new AsyncResult(null, nsr, null));
1278     }
1279 
responseDataCallListChanged(int indicationType, List<?> dcList)1280     private void responseDataCallListChanged(int indicationType, List<?> dcList) {
1281         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1282 
1283         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_DATA_CALL_LIST_CHANGED, dcList);
1284 
1285         ArrayList<DataCallResponse> response = RILUtils.convertHalDataCallResultList(dcList);
1286         mRil.mDataCallListChangedRegistrants.notifyRegistrants(
1287                 new AsyncResult(null, response, null));
1288     }
1289 
responseApnUnthrottled(int indicationType, String apn)1290     private void responseApnUnthrottled(int indicationType, String apn) {
1291         mRil.processIndication(HAL_SERVICE_RADIO, indicationType);
1292 
1293         if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_UNTHROTTLE_APN, apn);
1294 
1295         mRil.mApnUnthrottledRegistrants.notifyRegistrants(
1296                 new AsyncResult(null, apn, null));
1297     }
1298 }
1299