1 /* 2 * Copyright (C) 2006 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 android.annotation.NonNull; 20 import android.annotation.Nullable; 21 import android.compat.annotation.UnsupportedAppUsage; 22 import android.net.KeepalivePacketData; 23 import android.net.LinkProperties; 24 import android.os.Build; 25 import android.os.Handler; 26 import android.os.Message; 27 import android.os.WorkSource; 28 import android.telephony.AccessNetworkConstants; 29 import android.telephony.AccessNetworkConstants.AccessNetworkType; 30 import android.telephony.BarringInfo; 31 import android.telephony.CarrierRestrictionRules; 32 import android.telephony.ClientRequestStats; 33 import android.telephony.DomainSelectionService; 34 import android.telephony.ImsiEncryptionInfo; 35 import android.telephony.NetworkScanRequest; 36 import android.telephony.RadioAccessSpecifier; 37 import android.telephony.SignalThresholdInfo; 38 import android.telephony.TelephonyManager; 39 import android.telephony.TelephonyManager.HalService; 40 import android.telephony.data.DataCallResponse; 41 import android.telephony.data.DataProfile; 42 import android.telephony.data.NetworkSliceInfo; 43 import android.telephony.data.TrafficDescriptor; 44 import android.telephony.emergency.EmergencyNumber; 45 import android.telephony.ims.RegistrationManager; 46 import android.telephony.ims.feature.MmTelFeature; 47 import android.telephony.ims.stub.ImsRegistrationImplBase; 48 49 import com.android.internal.telephony.cdma.CdmaSmsBroadcastConfigInfo; 50 import com.android.internal.telephony.emergency.EmergencyConstants; 51 import com.android.internal.telephony.gsm.SmsBroadcastConfigInfo; 52 import com.android.internal.telephony.imsphone.ImsCallInfo; 53 import com.android.internal.telephony.uicc.IccCardApplicationStatus.PersoSubState; 54 import com.android.internal.telephony.uicc.IccCardStatus; 55 import com.android.internal.telephony.uicc.SimPhonebookRecord; 56 57 import java.util.List; 58 59 /** 60 * {@hide} 61 */ 62 public interface CommandsInterface { 63 64 //***** Constants 65 66 // Used as parameter to dial() and setCLIR() below 67 static final int CLIR_DEFAULT = 0; // "use subscription default value" 68 static final int CLIR_INVOCATION = 1; // (restrict CLI presentation) 69 static final int CLIR_SUPPRESSION = 2; // (allow CLI presentation) 70 71 // Used as return value for CDMA SS query 72 static final int SS_STATUS_UNKNOWN = 0xff; 73 74 // Used as parameters for call forward methods below 75 static final int CF_ACTION_DISABLE = 0; 76 static final int CF_ACTION_ENABLE = 1; 77 // static final int CF_ACTION_UNUSED = 2; 78 static final int CF_ACTION_REGISTRATION = 3; 79 static final int CF_ACTION_ERASURE = 4; 80 81 static final int CF_REASON_UNCONDITIONAL = 0; 82 static final int CF_REASON_BUSY = 1; 83 static final int CF_REASON_NO_REPLY = 2; 84 static final int CF_REASON_NOT_REACHABLE = 3; 85 static final int CF_REASON_ALL = 4; 86 static final int CF_REASON_ALL_CONDITIONAL = 5; 87 88 // Used for call barring methods below 89 static final String CB_FACILITY_BAOC = "AO"; 90 static final String CB_FACILITY_BAOIC = "OI"; 91 static final String CB_FACILITY_BAOICxH = "OX"; 92 static final String CB_FACILITY_BAIC = "AI"; 93 static final String CB_FACILITY_BAICr = "IR"; 94 static final String CB_FACILITY_BA_ALL = "AB"; 95 static final String CB_FACILITY_BA_MO = "AG"; 96 static final String CB_FACILITY_BA_MT = "AC"; 97 static final String CB_FACILITY_BA_SIM = "SC"; 98 static final String CB_FACILITY_BA_FD = "FD"; 99 static final String CB_FACILITY_BIC_ACR = "AR"; 100 101 102 // Used for various supp services apis 103 // See 27.007 +CCFC or +CLCK 104 static final int SERVICE_CLASS_NONE = 0; // no user input 105 static final int SERVICE_CLASS_VOICE = (1 << 0); 106 static final int SERVICE_CLASS_DATA = (1 << 1); //synonym for 16+32+64+128 107 static final int SERVICE_CLASS_FAX = (1 << 2); 108 static final int SERVICE_CLASS_SMS = (1 << 3); 109 static final int SERVICE_CLASS_DATA_SYNC = (1 << 4); 110 static final int SERVICE_CLASS_DATA_ASYNC = (1 << 5); 111 static final int SERVICE_CLASS_PACKET = (1 << 6); 112 static final int SERVICE_CLASS_PAD = (1 << 7); 113 static final int SERVICE_CLASS_MAX = (1 << 7); // Max SERVICE_CLASS value 114 115 // Numeric representation of string values returned 116 // by messages sent to setOnUSSD handler 117 static final int USSD_MODE_NOTIFY = 0; 118 static final int USSD_MODE_REQUEST = 1; 119 static final int USSD_MODE_NW_RELEASE = 2; 120 static final int USSD_MODE_LOCAL_CLIENT = 3; 121 static final int USSD_MODE_NOT_SUPPORTED = 4; 122 static final int USSD_MODE_NW_TIMEOUT = 5; 123 124 // GSM SMS fail cause for acknowledgeLastIncomingSMS. From TS 23.040, 9.2.3.22. 125 static final int GSM_SMS_FAIL_CAUSE_MEMORY_CAPACITY_EXCEEDED = 0xD3; 126 static final int GSM_SMS_FAIL_CAUSE_USIM_APP_TOOLKIT_BUSY = 0xD4; 127 static final int GSM_SMS_FAIL_CAUSE_USIM_DATA_DOWNLOAD_ERROR = 0xD5; 128 static final int GSM_SMS_FAIL_CAUSE_UNSPECIFIED_ERROR = 0xFF; 129 130 // CDMA SMS fail cause for acknowledgeLastIncomingCdmaSms. From TS N.S0005, 6.5.2.125. 131 static final int CDMA_SMS_FAIL_CAUSE_INVALID_TELESERVICE_ID = 4; 132 static final int CDMA_SMS_FAIL_CAUSE_RESOURCE_SHORTAGE = 35; 133 static final int CDMA_SMS_FAIL_CAUSE_OTHER_TERMINAL_PROBLEM = 39; 134 static final int CDMA_SMS_FAIL_CAUSE_ENCODING_PROBLEM = 96; 135 136 /** IMS voice capability */ 137 int IMS_MMTEL_CAPABILITY_VOICE = 1 << 0; 138 /** IMS video capability */ 139 int IMS_MMTEL_CAPABILITY_VIDEO = 1 << 1; 140 /** IMS SMS capability */ 141 int IMS_MMTEL_CAPABILITY_SMS = 1 << 2; 142 /** IMS RCS capabilities */ 143 int IMS_RCS_CAPABILITIES = 1 << 3; 144 145 //***** Methods 146 147 /** 148 * get latest radio power state from modem 149 * @return 150 */ getRadioState()151 int getRadioState(); 152 153 /** 154 * response.obj.result is an int[2] 155 * 156 * response.obj.result[0] is IMS registration state 157 * 0 - Not registered 158 * 1 - Registered 159 * response.obj.result[1] is of type RILConstants.GSM_PHONE or 160 * RILConstants.CDMA_PHONE 161 */ getImsRegistrationState(Message result)162 void getImsRegistrationState(Message result); 163 164 /** 165 * Fires on any RadioState transition 166 * Always fires immediately as well 167 * 168 * do not attempt to calculate transitions by storing getRadioState() values 169 * on previous invocations of this notification. Instead, use the other 170 * registration methods 171 */ 172 @UnsupportedAppUsage registerForRadioStateChanged(Handler h, int what, Object obj)173 void registerForRadioStateChanged(Handler h, int what, Object obj); unregisterForRadioStateChanged(Handler h)174 void unregisterForRadioStateChanged(Handler h); 175 registerForVoiceRadioTechChanged(Handler h, int what, Object obj)176 void registerForVoiceRadioTechChanged(Handler h, int what, Object obj); 177 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) unregisterForVoiceRadioTechChanged(Handler h)178 void unregisterForVoiceRadioTechChanged(Handler h); 179 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) registerForImsNetworkStateChanged(Handler h, int what, Object obj)180 void registerForImsNetworkStateChanged(Handler h, int what, Object obj); unregisterForImsNetworkStateChanged(Handler h)181 void unregisterForImsNetworkStateChanged(Handler h); 182 183 /** 184 * Fires on any transition into RadioState.isOn() 185 * Fires immediately if currently in that state 186 * In general, actions should be idempotent. State may change 187 * before event is received. 188 */ 189 @UnsupportedAppUsage registerForOn(Handler h, int what, Object obj)190 void registerForOn(Handler h, int what, Object obj); 191 @UnsupportedAppUsage unregisterForOn(Handler h)192 void unregisterForOn(Handler h); 193 194 /** 195 * Fires on any transition out of RadioState.isAvailable() 196 * Fires immediately if currently in that state 197 * In general, actions should be idempotent. State may change 198 * before event is received. 199 */ 200 @UnsupportedAppUsage registerForAvailable(Handler h, int what, Object obj)201 void registerForAvailable(Handler h, int what, Object obj); 202 @UnsupportedAppUsage unregisterForAvailable(Handler h)203 void unregisterForAvailable(Handler h); 204 205 /** 206 * Fires on any transition into !RadioState.isAvailable() 207 * Fires immediately if currently in that state 208 * In general, actions should be idempotent. State may change 209 * before event is received. 210 */ 211 @UnsupportedAppUsage registerForNotAvailable(Handler h, int what, Object obj)212 void registerForNotAvailable(Handler h, int what, Object obj); unregisterForNotAvailable(Handler h)213 void unregisterForNotAvailable(Handler h); 214 215 /** 216 * Fires on any transition into RADIO_OFF or !RadioState.isAvailable() 217 * Fires immediately if currently in that state 218 * In general, actions should be idempotent. State may change 219 * before event is received. 220 */ 221 @UnsupportedAppUsage registerForOffOrNotAvailable(Handler h, int what, Object obj)222 void registerForOffOrNotAvailable(Handler h, int what, Object obj); 223 @UnsupportedAppUsage unregisterForOffOrNotAvailable(Handler h)224 void unregisterForOffOrNotAvailable(Handler h); 225 226 /** 227 * Fires on any change in ICC status 228 */ registerForIccStatusChanged(Handler h, int what, Object obj)229 void registerForIccStatusChanged(Handler h, int what, Object obj); unregisterForIccStatusChanged(Handler h)230 void unregisterForIccStatusChanged(Handler h); 231 /** Register for ICC slot status changed event */ registerForIccSlotStatusChanged(Handler h, int what, Object obj)232 void registerForIccSlotStatusChanged(Handler h, int what, Object obj); 233 /** Unregister for ICC slot status changed event */ unregisterForIccSlotStatusChanged(Handler h)234 void unregisterForIccSlotStatusChanged(Handler h); 235 registerForCallStateChanged(Handler h, int what, Object obj)236 void registerForCallStateChanged(Handler h, int what, Object obj); unregisterForCallStateChanged(Handler h)237 void unregisterForCallStateChanged(Handler h); 238 /** Register for network state changed event */ registerForNetworkStateChanged(Handler h, int what, Object obj)239 void registerForNetworkStateChanged(Handler h, int what, Object obj); 240 /** Unregister from network state changed event */ unregisterForNetworkStateChanged(Handler h)241 void unregisterForNetworkStateChanged(Handler h); 242 /** Register for data call list changed event */ registerForDataCallListChanged(Handler h, int what, Object obj)243 void registerForDataCallListChanged(Handler h, int what, Object obj); 244 /** Unregister from data call list changed event */ unregisterForDataCallListChanged(Handler h)245 void unregisterForDataCallListChanged(Handler h); 246 /** Register for the apn unthrottled event */ registerForApnUnthrottled(Handler h, int what, Object obj)247 void registerForApnUnthrottled(Handler h, int what, Object obj); 248 /** Unregister for apn unthrottled event */ unregisterForApnUnthrottled(Handler h)249 void unregisterForApnUnthrottled(Handler h); 250 /** Register for the slicing config changed event */ registerForSlicingConfigChanged(Handler h, int what, Object obj)251 void registerForSlicingConfigChanged(Handler h, int what, Object obj); 252 /** Unregister for slicing config changed event */ unregisterForSlicingConfigChanged(Handler h)253 void unregisterForSlicingConfigChanged(Handler h); 254 255 /** InCall voice privacy notifications */ registerForInCallVoicePrivacyOn(Handler h, int what, Object obj)256 void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj); unregisterForInCallVoicePrivacyOn(Handler h)257 void unregisterForInCallVoicePrivacyOn(Handler h); registerForInCallVoicePrivacyOff(Handler h, int what, Object obj)258 void registerForInCallVoicePrivacyOff(Handler h, int what, Object obj); unregisterForInCallVoicePrivacyOff(Handler h)259 void unregisterForInCallVoicePrivacyOff(Handler h); 260 261 /** Single Radio Voice Call State progress notifications */ registerForSrvccStateChanged(Handler h, int what, Object obj)262 void registerForSrvccStateChanged(Handler h, int what, Object obj); unregisterForSrvccStateChanged(Handler h)263 void unregisterForSrvccStateChanged(Handler h); 264 265 /** 266 * Handlers for subscription status change indications. 267 * 268 * @param h Handler for subscription status change messages. 269 * @param what User-defined message code. 270 * @param obj User object. 271 */ registerForSubscriptionStatusChanged(Handler h, int what, Object obj)272 void registerForSubscriptionStatusChanged(Handler h, int what, Object obj); unregisterForSubscriptionStatusChanged(Handler h)273 void unregisterForSubscriptionStatusChanged(Handler h); 274 275 /** 276 * fires on any change in hardware configuration. 277 */ registerForHardwareConfigChanged(Handler h, int what, Object obj)278 void registerForHardwareConfigChanged(Handler h, int what, Object obj); unregisterForHardwareConfigChanged(Handler h)279 void unregisterForHardwareConfigChanged(Handler h); 280 281 /** 282 * unlike the register* methods, there's only one new 3GPP format SMS handler. 283 * if you need to unregister, you should also tell the radio to stop 284 * sending SMS's to you (via AT+CNMI) 285 * 286 * AsyncResult.result is a String containing the SMS PDU 287 */ setOnNewGsmSms(Handler h, int what, Object obj)288 void setOnNewGsmSms(Handler h, int what, Object obj); unSetOnNewGsmSms(Handler h)289 void unSetOnNewGsmSms(Handler h); 290 291 /** 292 * unlike the register* methods, there's only one new 3GPP2 format SMS handler. 293 * if you need to unregister, you should also tell the radio to stop 294 * sending SMS's to you (via AT+CNMI) 295 * 296 * AsyncResult.result is a String containing the SMS PDU 297 */ setOnNewCdmaSms(Handler h, int what, Object obj)298 void setOnNewCdmaSms(Handler h, int what, Object obj); unSetOnNewCdmaSms(Handler h)299 void unSetOnNewCdmaSms(Handler h); 300 301 /** 302 * Set the handler for SMS Cell Broadcast messages. 303 * 304 * AsyncResult.result is a byte array containing the SMS-CB PDU 305 */ 306 @UnsupportedAppUsage setOnNewGsmBroadcastSms(Handler h, int what, Object obj)307 void setOnNewGsmBroadcastSms(Handler h, int what, Object obj); unSetOnNewGsmBroadcastSms(Handler h)308 void unSetOnNewGsmBroadcastSms(Handler h); 309 310 /** 311 * Register for NEW_SMS_ON_SIM unsolicited message 312 * 313 * AsyncResult.result is an int array containing the index of new SMS 314 */ 315 @UnsupportedAppUsage setOnSmsOnSim(Handler h, int what, Object obj)316 void setOnSmsOnSim(Handler h, int what, Object obj); unSetOnSmsOnSim(Handler h)317 void unSetOnSmsOnSim(Handler h); 318 319 /** 320 * Register for NEW_SMS_STATUS_REPORT unsolicited message 321 * 322 * AsyncResult.result is a String containing the status report PDU 323 */ 324 @UnsupportedAppUsage setOnSmsStatus(Handler h, int what, Object obj)325 void setOnSmsStatus(Handler h, int what, Object obj); unSetOnSmsStatus(Handler h)326 void unSetOnSmsStatus(Handler h); 327 328 /** 329 * unlike the register* methods, there's only one NITZ time handler 330 * 331 * AsyncResult.result is an Object[] 332 * ((Object[])AsyncResult.result)[0] is a String containing the NITZ time string 333 * ((Object[])AsyncResult.result)[1] is a Long containing the milliseconds since boot as 334 * returned by elapsedRealtime() when this NITZ time 335 * was posted. 336 * 337 * Please note that the delivery of this message may be delayed several 338 * seconds on system startup 339 */ 340 @UnsupportedAppUsage setOnNITZTime(Handler h, int what, Object obj)341 void setOnNITZTime(Handler h, int what, Object obj); unSetOnNITZTime(Handler h)342 void unSetOnNITZTime(Handler h); 343 344 /** 345 * unlike the register* methods, there's only one USSD notify handler 346 * 347 * Represents the arrival of a USSD "notify" message, which may 348 * or may not have been triggered by a previous USSD send 349 * 350 * AsyncResult.result is a String[] 351 * ((String[])(AsyncResult.result))[0] contains status code 352 * "0" USSD-Notify -- text in ((const char **)data)[1] 353 * "1" USSD-Request -- text in ((const char **)data)[1] 354 * "2" Session terminated by network 355 * "3" other local client (eg, SIM Toolkit) has responded 356 * "4" Operation not supported 357 * "5" Network timeout 358 * 359 * ((String[])(AsyncResult.result))[1] contains the USSD message 360 * The numeric representations of these are in USSD_MODE_* 361 */ 362 setOnUSSD(Handler h, int what, Object obj)363 void setOnUSSD(Handler h, int what, Object obj); unSetOnUSSD(Handler h)364 void unSetOnUSSD(Handler h); 365 366 /** 367 * unlike the register* methods, there's only one signal strength handler 368 * AsyncResult.result is an int[2] 369 * response.obj.result[0] is received signal strength (0-31, 99) 370 * response.obj.result[1] is bit error rate (0-7, 99) 371 * as defined in TS 27.007 8.5 372 */ 373 374 @UnsupportedAppUsage setOnSignalStrengthUpdate(Handler h, int what, Object obj)375 void setOnSignalStrengthUpdate(Handler h, int what, Object obj); unSetOnSignalStrengthUpdate(Handler h)376 void unSetOnSignalStrengthUpdate(Handler h); 377 378 /** 379 * Sets the handler for SIM/RUIM SMS storage full unsolicited message. 380 * Unlike the register* methods, there's only one notification handler 381 * 382 * @param h Handler for notification message. 383 * @param what User-defined message code. 384 * @param obj User object. 385 */ 386 @UnsupportedAppUsage setOnIccSmsFull(Handler h, int what, Object obj)387 void setOnIccSmsFull(Handler h, int what, Object obj); unSetOnIccSmsFull(Handler h)388 void unSetOnIccSmsFull(Handler h); 389 390 /** 391 * Sets the handler for SIM Refresh notifications. 392 * 393 * @param h Handler for notification message. 394 * @param what User-defined message code. 395 * @param obj User object. 396 */ 397 @UnsupportedAppUsage registerForIccRefresh(Handler h, int what, Object obj)398 void registerForIccRefresh(Handler h, int what, Object obj); unregisterForIccRefresh(Handler h)399 void unregisterForIccRefresh(Handler h); 400 401 @UnsupportedAppUsage setOnIccRefresh(Handler h, int what, Object obj)402 void setOnIccRefresh(Handler h, int what, Object obj); unsetOnIccRefresh(Handler h)403 void unsetOnIccRefresh(Handler h); 404 405 /** 406 * Sets the handler for RING notifications. 407 * Unlike the register* methods, there's only one notification handler 408 * 409 * @param h Handler for notification message. 410 * @param what User-defined message code. 411 * @param obj User object. 412 */ 413 @UnsupportedAppUsage setOnCallRing(Handler h, int what, Object obj)414 void setOnCallRing(Handler h, int what, Object obj); unSetOnCallRing(Handler h)415 void unSetOnCallRing(Handler h); 416 417 /** 418 * Sets the handler for RESTRICTED_STATE changed notification, 419 * eg, for Domain Specific Access Control 420 * unlike the register* methods, there's only one signal strength handler 421 * 422 * AsyncResult.result is an int[1] 423 * response.obj.result[0] is a bitmask of RIL_RESTRICTED_STATE_* values 424 */ 425 setOnRestrictedStateChanged(Handler h, int what, Object obj)426 void setOnRestrictedStateChanged(Handler h, int what, Object obj); unSetOnRestrictedStateChanged(Handler h)427 void unSetOnRestrictedStateChanged(Handler h); 428 429 /** 430 * Sets the handler for Supplementary Service Notifications. 431 * Unlike the register* methods, there's only one notification handler 432 * 433 * @param h Handler for notification message. 434 * @param what User-defined message code. 435 * @param obj User object. 436 */ 437 @UnsupportedAppUsage setOnSuppServiceNotification(Handler h, int what, Object obj)438 void setOnSuppServiceNotification(Handler h, int what, Object obj); unSetOnSuppServiceNotification(Handler h)439 void unSetOnSuppServiceNotification(Handler h); 440 441 /** 442 * Sets the handler for Session End Notifications for CAT. 443 * Unlike the register* methods, there's only one notification handler 444 * 445 * @param h Handler for notification message. 446 * @param what User-defined message code. 447 * @param obj User object. 448 */ 449 @UnsupportedAppUsage setOnCatSessionEnd(Handler h, int what, Object obj)450 void setOnCatSessionEnd(Handler h, int what, Object obj); unSetOnCatSessionEnd(Handler h)451 void unSetOnCatSessionEnd(Handler h); 452 453 /** 454 * Sets the handler for Proactive Commands for CAT. 455 * Unlike the register* methods, there's only one notification handler 456 * 457 * @param h Handler for notification message. 458 * @param what User-defined message code. 459 * @param obj User object. 460 */ 461 @UnsupportedAppUsage setOnCatProactiveCmd(Handler h, int what, Object obj)462 void setOnCatProactiveCmd(Handler h, int what, Object obj); unSetOnCatProactiveCmd(Handler h)463 void unSetOnCatProactiveCmd(Handler h); 464 465 /** 466 * Sets the handler for Event Notifications for CAT. 467 * Unlike the register* methods, there's only one notification handler 468 * 469 * @param h Handler for notification message. 470 * @param what User-defined message code. 471 * @param obj User object. 472 */ 473 @UnsupportedAppUsage setOnCatEvent(Handler h, int what, Object obj)474 void setOnCatEvent(Handler h, int what, Object obj); unSetOnCatEvent(Handler h)475 void unSetOnCatEvent(Handler h); 476 477 /** 478 * Sets the handler for Call Set Up Notifications for CAT. 479 * Unlike the register* methods, there's only one notification handler 480 * 481 * @param h Handler for notification message. 482 * @param what User-defined message code. 483 * @param obj User object. 484 */ 485 @UnsupportedAppUsage setOnCatCallSetUp(Handler h, int what, Object obj)486 void setOnCatCallSetUp(Handler h, int what, Object obj); unSetOnCatCallSetUp(Handler h)487 void unSetOnCatCallSetUp(Handler h); 488 489 /** 490 * Enables/disbables supplementary service related notifications from 491 * the network. 492 * 493 * @param enable true to enable notifications, false to disable. 494 * @param result Message to be posted when command completes. 495 */ setSuppServiceNotifications(boolean enable, Message result)496 void setSuppServiceNotifications(boolean enable, Message result); 497 //void unSetSuppServiceNotifications(Handler h); 498 499 /** 500 * Sets the handler for Alpha Notification during STK Call Control. 501 * Unlike the register* methods, there's only one notification handler 502 * 503 * @param h Handler for notification message. 504 * @param what User-defined message code. 505 * @param obj User object. 506 */ 507 @UnsupportedAppUsage setOnCatCcAlphaNotify(Handler h, int what, Object obj)508 void setOnCatCcAlphaNotify(Handler h, int what, Object obj); unSetOnCatCcAlphaNotify(Handler h)509 void unSetOnCatCcAlphaNotify(Handler h); 510 511 /** 512 * Sets the handler for notifying Suplementary Services (SS) 513 * Data during STK Call Control. 514 * Unlike the register* methods, there's only one notification handler 515 * 516 * @param h Handler for notification message. 517 * @param what User-defined message code. 518 * @param obj User object. 519 */ setOnSs(Handler h, int what, Object obj)520 void setOnSs(Handler h, int what, Object obj); unSetOnSs(Handler h)521 void unSetOnSs(Handler h); 522 523 /** 524 * Register for unsolicited NATT Keepalive Status Indications 525 * 526 * @param h Handler for notification message. 527 * @param what User-defined message code. 528 * @param obj User object. 529 */ setOnRegistrationFailed(Handler h, int what, Object obj)530 default void setOnRegistrationFailed(Handler h, int what, Object obj) {} 531 532 /** 533 * @param h Handler for notification message. 534 */ unSetOnRegistrationFailed(Handler h)535 default void unSetOnRegistrationFailed(Handler h) {} 536 537 /** 538 * Sets the handler for Event Notifications for CDMA Display Info. 539 * Unlike the register* methods, there's only one notification handler 540 * 541 * @param h Handler for notification message. 542 * @param what User-defined message code. 543 * @param obj User object. 544 */ registerForDisplayInfo(Handler h, int what, Object obj)545 void registerForDisplayInfo(Handler h, int what, Object obj); unregisterForDisplayInfo(Handler h)546 void unregisterForDisplayInfo(Handler h); 547 548 /** 549 * Sets the handler for Event Notifications for CallWaiting Info. 550 * Unlike the register* methods, there's only one notification handler 551 * 552 * @param h Handler for notification message. 553 * @param what User-defined message code. 554 * @param obj User object. 555 */ registerForCallWaitingInfo(Handler h, int what, Object obj)556 void registerForCallWaitingInfo(Handler h, int what, Object obj); unregisterForCallWaitingInfo(Handler h)557 void unregisterForCallWaitingInfo(Handler h); 558 559 /** 560 * Sets the handler for Event Notifications for Signal Info. 561 * Unlike the register* methods, there's only one notification handler 562 * 563 * @param h Handler for notification message. 564 * @param what User-defined message code. 565 * @param obj User object. 566 */ registerForSignalInfo(Handler h, int what, Object obj)567 void registerForSignalInfo(Handler h, int what, Object obj); unregisterForSignalInfo(Handler h)568 void unregisterForSignalInfo(Handler h); 569 570 /** 571 * Registers the handler for CDMA number information record 572 * Unlike the register* methods, there's only one notification handler 573 * 574 * @param h Handler for notification message. 575 * @param what User-defined message code. 576 * @param obj User object. 577 */ registerForNumberInfo(Handler h, int what, Object obj)578 void registerForNumberInfo(Handler h, int what, Object obj); unregisterForNumberInfo(Handler h)579 void unregisterForNumberInfo(Handler h); 580 581 /** 582 * Registers the handler for CDMA redirected number Information record 583 * Unlike the register* methods, there's only one notification handler 584 * 585 * @param h Handler for notification message. 586 * @param what User-defined message code. 587 * @param obj User object. 588 */ registerForRedirectedNumberInfo(Handler h, int what, Object obj)589 void registerForRedirectedNumberInfo(Handler h, int what, Object obj); unregisterForRedirectedNumberInfo(Handler h)590 void unregisterForRedirectedNumberInfo(Handler h); 591 592 /** 593 * Registers the handler for CDMA line control information record 594 * Unlike the register* methods, there's only one notification handler 595 * 596 * @param h Handler for notification message. 597 * @param what User-defined message code. 598 * @param obj User object. 599 */ registerForLineControlInfo(Handler h, int what, Object obj)600 void registerForLineControlInfo(Handler h, int what, Object obj); unregisterForLineControlInfo(Handler h)601 void unregisterForLineControlInfo(Handler h); 602 603 /** 604 * Registers the handler for CDMA T53 CLIR information record 605 * Unlike the register* methods, there's only one notification handler 606 * 607 * @param h Handler for notification message. 608 * @param what User-defined message code. 609 * @param obj User object. 610 */ registerFoT53ClirlInfo(Handler h, int what, Object obj)611 void registerFoT53ClirlInfo(Handler h, int what, Object obj); unregisterForT53ClirInfo(Handler h)612 void unregisterForT53ClirInfo(Handler h); 613 614 /** 615 * Registers the handler for CDMA T53 audio control information record 616 * Unlike the register* methods, there's only one notification handler 617 * 618 * @param h Handler for notification message. 619 * @param what User-defined message code. 620 * @param obj User object. 621 */ registerForT53AudioControlInfo(Handler h, int what, Object obj)622 void registerForT53AudioControlInfo(Handler h, int what, Object obj); unregisterForT53AudioControlInfo(Handler h)623 void unregisterForT53AudioControlInfo(Handler h); 624 625 /** 626 * Fires on if Modem enters Emergency Callback mode 627 */ 628 @UnsupportedAppUsage setEmergencyCallbackMode(Handler h, int what, Object obj)629 void setEmergencyCallbackMode(Handler h, int what, Object obj); 630 631 /** 632 * Fires on any CDMA OTA provision status change 633 */ 634 @UnsupportedAppUsage registerForCdmaOtaProvision(Handler h,int what, Object obj)635 void registerForCdmaOtaProvision(Handler h,int what, Object obj); 636 @UnsupportedAppUsage unregisterForCdmaOtaProvision(Handler h)637 void unregisterForCdmaOtaProvision(Handler h); 638 639 /** 640 * Registers the handler when out-band ringback tone is needed.<p> 641 * 642 * Messages received from this: 643 * Message.obj will be an AsyncResult 644 * AsyncResult.userObj = obj 645 * AsyncResult.result = boolean. <p> 646 */ registerForRingbackTone(Handler h, int what, Object obj)647 void registerForRingbackTone(Handler h, int what, Object obj); unregisterForRingbackTone(Handler h)648 void unregisterForRingbackTone(Handler h); 649 650 /** 651 * Registers the handler when mute/unmute need to be resent to get 652 * uplink audio during a call.<p> 653 * 654 * @param h Handler for notification message. 655 * @param what User-defined message code. 656 * @param obj User object. 657 * 658 */ registerForResendIncallMute(Handler h, int what, Object obj)659 void registerForResendIncallMute(Handler h, int what, Object obj); unregisterForResendIncallMute(Handler h)660 void unregisterForResendIncallMute(Handler h); 661 662 /** 663 * Registers the handler for when Cdma subscription changed events 664 * 665 * @param h Handler for notification message. 666 * @param what User-defined message code. 667 * @param obj User object. 668 * 669 */ registerForCdmaSubscriptionChanged(Handler h, int what, Object obj)670 void registerForCdmaSubscriptionChanged(Handler h, int what, Object obj); unregisterForCdmaSubscriptionChanged(Handler h)671 void unregisterForCdmaSubscriptionChanged(Handler h); 672 673 /** 674 * Registers the handler for when Cdma prl changed events 675 * 676 * @param h Handler for notification message. 677 * @param what User-defined message code. 678 * @param obj User object. 679 * 680 */ registerForCdmaPrlChanged(Handler h, int what, Object obj)681 void registerForCdmaPrlChanged(Handler h, int what, Object obj); unregisterForCdmaPrlChanged(Handler h)682 void unregisterForCdmaPrlChanged(Handler h); 683 684 /** 685 * Registers the handler for when Cdma prl changed events 686 * 687 * @param h Handler for notification message. 688 * @param what User-defined message code. 689 * @param obj User object. 690 * 691 */ registerForExitEmergencyCallbackMode(Handler h, int what, Object obj)692 void registerForExitEmergencyCallbackMode(Handler h, int what, Object obj); unregisterForExitEmergencyCallbackMode(Handler h)693 void unregisterForExitEmergencyCallbackMode(Handler h); 694 695 /** 696 * Registers the handler for RIL_UNSOL_RIL_CONNECT events. 697 * 698 * When ril connects or disconnects a message is sent to the registrant 699 * which contains an AsyncResult, ar, in msg.obj. The ar.result is an 700 * Integer which is the version of the ril or -1 if the ril disconnected. 701 * 702 * @param h Handler for notification message. 703 * @param what User-defined message code. 704 * @param obj User object. 705 */ 706 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) registerForRilConnected(Handler h, int what, Object obj)707 void registerForRilConnected(Handler h, int what, Object obj); 708 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) unregisterForRilConnected(Handler h)709 void unregisterForRilConnected(Handler h); 710 711 /** 712 * Registers the handler for RIL_UNSOL_SIM_DETACH_FROM_NETWORK_CONFIG_CHANGED events. 713 * 714 * @param h Handler for notification message. 715 * @param what User-defined message code. 716 * @param obj User object. 717 */ registerUiccApplicationEnablementChanged(Handler h, int what, Object obj)718 default void registerUiccApplicationEnablementChanged(Handler h, int what, Object obj) {}; 719 720 /** 721 * Unregisters the handler for RIL_UNSOL_SIM_DETACH_FROM_NETWORK_CONFIG_CHANGED events. 722 * 723 * @param h Handler for notification message. 724 */ unregisterUiccApplicationEnablementChanged(Handler h)725 default void unregisterUiccApplicationEnablementChanged(Handler h) {}; 726 727 /** 728 * Supply the ICC PIN to the ICC card 729 * 730 * returned message 731 * retMsg.obj = AsyncResult ar 732 * ar.exception carries exception on failure 733 * This exception is CommandException with an error of PASSWORD_INCORRECT 734 * if the password is incorrect 735 * 736 * ar.result is an optional array of integers where the first entry 737 * is the number of attempts remaining before the ICC will be PUK locked. 738 * 739 * ar.exception and ar.result are null on success 740 */ 741 742 @UnsupportedAppUsage supplyIccPin(String pin, Message result)743 void supplyIccPin(String pin, Message result); 744 745 /** 746 * Supply the PIN for the app with this AID on the ICC card 747 * 748 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 749 * 750 * returned message 751 * retMsg.obj = AsyncResult ar 752 * ar.exception carries exception on failure 753 * This exception is CommandException with an error of PASSWORD_INCORRECT 754 * if the password is incorrect 755 * 756 * ar.result is an optional array of integers where the first entry 757 * is the number of attempts remaining before the ICC will be PUK locked. 758 * 759 * ar.exception and ar.result are null on success 760 */ 761 supplyIccPinForApp(String pin, String aid, Message result)762 void supplyIccPinForApp(String pin, String aid, Message result); 763 764 /** 765 * Supply the ICC PUK and newPin to the ICC card 766 * 767 * returned message 768 * retMsg.obj = AsyncResult ar 769 * ar.exception carries exception on failure 770 * This exception is CommandException with an error of PASSWORD_INCORRECT 771 * if the password is incorrect 772 * 773 * ar.result is an optional array of integers where the first entry 774 * is the number of attempts remaining before the ICC is permanently disabled. 775 * 776 * ar.exception and ar.result are null on success 777 */ 778 supplyIccPuk(String puk, String newPin, Message result)779 void supplyIccPuk(String puk, String newPin, Message result); 780 781 /** 782 * Supply the PUK, new pin for the app with this AID on the ICC card 783 * 784 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 785 * 786 * retMsg.obj = AsyncResult ar 787 * ar.exception carries exception on failure 788 * This exception is CommandException with an error of PASSWORD_INCORRECT 789 * if the password is incorrect 790 * 791 * ar.result is an optional array of integers where the first entry 792 * is the number of attempts remaining before the ICC is permanently disabled. 793 * 794 * ar.exception and ar.result are null on success 795 */ 796 supplyIccPukForApp(String puk, String newPin, String aid, Message result)797 void supplyIccPukForApp(String puk, String newPin, String aid, Message result); 798 799 /** 800 * Supply the ICC PIN2 to the ICC card 801 * Only called following operation where ICC_PIN2 was 802 * returned as a a failure from a previous operation 803 * 804 * returned message 805 * retMsg.obj = AsyncResult ar 806 * ar.exception carries exception on failure 807 * This exception is CommandException with an error of PASSWORD_INCORRECT 808 * if the password is incorrect 809 * 810 * ar.result is an optional array of integers where the first entry 811 * is the number of attempts remaining before the ICC will be PUK locked. 812 * 813 * ar.exception and ar.result are null on success 814 */ 815 supplyIccPin2(String pin2, Message result)816 void supplyIccPin2(String pin2, Message result); 817 818 /** 819 * Supply the PIN2 for the app with this AID on the ICC card 820 * Only called following operation where ICC_PIN2 was 821 * returned as a a failure from a previous operation 822 * 823 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 824 * 825 * returned message 826 * retMsg.obj = AsyncResult ar 827 * ar.exception carries exception on failure 828 * This exception is CommandException with an error of PASSWORD_INCORRECT 829 * if the password is incorrect 830 * 831 * ar.result is an optional array of integers where the first entry 832 * is the number of attempts remaining before the ICC will be PUK locked. 833 * 834 * ar.exception and ar.result are null on success 835 */ 836 supplyIccPin2ForApp(String pin2, String aid, Message result)837 void supplyIccPin2ForApp(String pin2, String aid, Message result); 838 839 /** 840 * Supply the SIM PUK2 to the SIM card 841 * Only called following operation where SIM_PUK2 was 842 * returned as a a failure from a previous operation 843 * 844 * returned message 845 * retMsg.obj = AsyncResult ar 846 * ar.exception carries exception on failure 847 * This exception is CommandException with an error of PASSWORD_INCORRECT 848 * if the password is incorrect 849 * 850 * ar.result is an optional array of integers where the first entry 851 * is the number of attempts remaining before the ICC is permanently disabled. 852 * 853 * ar.exception and ar.result are null on success 854 */ 855 supplyIccPuk2(String puk2, String newPin2, Message result)856 void supplyIccPuk2(String puk2, String newPin2, Message result); 857 858 /** 859 * Supply the PUK2, newPin2 for the app with this AID on the ICC card 860 * Only called following operation where SIM_PUK2 was 861 * returned as a a failure from a previous operation 862 * 863 * AID (Application ID), See ETSI 102.221 8.1 and 101.220 4 864 * 865 * returned message 866 * retMsg.obj = AsyncResult ar 867 * ar.exception carries exception on failure 868 * This exception is CommandException with an error of PASSWORD_INCORRECT 869 * if the password is incorrect 870 * 871 * ar.result is an optional array of integers where the first entry 872 * is the number of attempts remaining before the ICC is permanently disabled. 873 * 874 * ar.exception and ar.result are null on success 875 */ 876 supplyIccPuk2ForApp(String puk2, String newPin2, String aid, Message result)877 void supplyIccPuk2ForApp(String puk2, String newPin2, String aid, Message result); 878 879 // TODO: Add java doc and indicate that msg.arg1 contains the number of attempts remaining. changeIccPin(String oldPin, String newPin, Message result)880 void changeIccPin(String oldPin, String newPin, Message result); changeIccPinForApp(String oldPin, String newPin, String aidPtr, Message result)881 void changeIccPinForApp(String oldPin, String newPin, String aidPtr, Message result); changeIccPin2(String oldPin2, String newPin2, Message result)882 void changeIccPin2(String oldPin2, String newPin2, Message result); changeIccPin2ForApp(String oldPin2, String newPin2, String aidPtr, Message result)883 void changeIccPin2ForApp(String oldPin2, String newPin2, String aidPtr, Message result); 884 885 @UnsupportedAppUsage changeBarringPassword(String facility, String oldPwd, String newPwd, Message result)886 void changeBarringPassword(String facility, String oldPwd, String newPwd, Message result); 887 supplyNetworkDepersonalization(String netpin, Message result)888 void supplyNetworkDepersonalization(String netpin, Message result); 889 supplySimDepersonalization(PersoSubState persoType, String controlKey, Message result)890 void supplySimDepersonalization(PersoSubState persoType, String controlKey, Message result); 891 892 /** 893 * returned message 894 * retMsg.obj = AsyncResult ar 895 * ar.exception carries exception on failure 896 * ar.userObject contains the orignal value of result.obj 897 * ar.result contains a List of DriverCall 898 * The ar.result List is sorted by DriverCall.index 899 */ getCurrentCalls(Message result)900 void getCurrentCalls (Message result); 901 902 /** 903 * returned message 904 * retMsg.obj = AsyncResult ar 905 * ar.exception carries exception on failure 906 * ar.userObject contains the orignal value of result.obj 907 * ar.result contains a List of DataCallResponse 908 * @deprecated Do not use. 909 */ 910 @UnsupportedAppUsage 911 @Deprecated getPDPContextList(Message result)912 void getPDPContextList(Message result); 913 914 /** 915 * returned message 916 * retMsg.obj = AsyncResult ar 917 * ar.exception carries exception on failure 918 * ar.userObject contains the orignal value of result.obj 919 * ar.result contains a List of DataCallResponse 920 */ 921 @UnsupportedAppUsage getDataCallList(Message result)922 void getDataCallList(Message result); 923 924 /** 925 * returned message 926 * retMsg.obj = AsyncResult ar 927 * ar.exception carries exception on failure 928 * ar.userObject contains the orignal value of result.obj 929 * ar.result is null on success and failure 930 * 931 * CLIR_DEFAULT == on "use subscription default value" 932 * CLIR_SUPPRESSION == on "CLIR suppression" (allow CLI presentation) 933 * CLIR_INVOCATION == on "CLIR invocation" (restrict CLI presentation) 934 */ dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo, boolean hasKnownUserIntentEmergency, int clirMode, Message result)935 void dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo, 936 boolean hasKnownUserIntentEmergency, int clirMode, Message result); 937 938 /** 939 * returned message 940 * retMsg.obj = AsyncResult ar 941 * ar.exception carries exception on failure 942 * ar.userObject contains the orignal value of result.obj 943 * ar.result is null on success and failure 944 * 945 * CLIR_DEFAULT == on "use subscription default value" 946 * CLIR_SUPPRESSION == on "CLIR suppression" (allow CLI presentation) 947 * CLIR_INVOCATION == on "CLIR invocation" (restrict CLI presentation) 948 */ dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo, boolean hasKnownUserIntentEmergency, int clirMode, UUSInfo uusInfo, Message result)949 void dial(String address, boolean isEmergencyCall, EmergencyNumber emergencyNumberInfo, 950 boolean hasKnownUserIntentEmergency, int clirMode, UUSInfo uusInfo, Message result); 951 952 /** 953 * returned message 954 * retMsg.obj = AsyncResult ar 955 * ar.exception carries exception on failure 956 * ar.userObject contains the orignal value of result.obj 957 * ar.result is String containing IMSI on success 958 */ 959 @UnsupportedAppUsage getIMSI(Message result)960 void getIMSI(Message result); 961 962 /** 963 * returned message 964 * retMsg.obj = AsyncResult ar 965 * ar.exception carries exception on failure 966 * ar.userObject contains the orignal value of result.obj 967 * ar.result is String containing IMSI on success 968 */ getIMSIForApp(String aid, Message result)969 void getIMSIForApp(String aid, Message result); 970 971 /** 972 * returned message 973 * retMsg.obj = AsyncResult ar 974 * ar.exception carries exception on failure 975 * ar.userObject contains the orignal value of result.obj 976 * ar.result is String containing IMEI on success 977 */ getIMEI(Message result)978 void getIMEI(Message result); 979 980 /** 981 * returned message 982 * retMsg.obj = AsyncResult ar 983 * ar.exception carries exception on failure 984 * ar.userObject contains the orignal value of result.obj 985 * ar.result is String containing IMEISV on success 986 */ 987 @UnsupportedAppUsage getIMEISV(Message result)988 void getIMEISV(Message result); 989 990 /** 991 * Hang up one individual connection. 992 * returned message 993 * retMsg.obj = AsyncResult ar 994 * ar.exception carries exception on failure 995 * ar.userObject contains the orignal value of result.obj 996 * ar.result is null on success and failure 997 * 998 * 3GPP 22.030 6.5.5 999 * "Releases a specific active call X" 1000 */ hangupConnection(int gsmIndex, Message result)1001 void hangupConnection (int gsmIndex, Message result); 1002 1003 /** 1004 * 3GPP 22.030 6.5.5 1005 * "Releases all held calls or sets User Determined User Busy (UDUB) 1006 * for a waiting call." 1007 * ar.exception carries exception on failure 1008 * ar.userObject contains the orignal value of result.obj 1009 * ar.result is null on success and failure 1010 */ hangupWaitingOrBackground(Message result)1011 void hangupWaitingOrBackground (Message result); 1012 1013 /** 1014 * 3GPP 22.030 6.5.5 1015 * "Releases all active calls (if any exist) and accepts 1016 * the other (held or waiting) call." 1017 * 1018 * ar.exception carries exception on failure 1019 * ar.userObject contains the orignal value of result.obj 1020 * ar.result is null on success and failure 1021 */ hangupForegroundResumeBackground(Message result)1022 void hangupForegroundResumeBackground (Message result); 1023 1024 /** 1025 * 3GPP 22.030 6.5.5 1026 * "Places all active calls (if any exist) on hold and accepts 1027 * the other (held or waiting) call." 1028 * 1029 * ar.exception carries exception on failure 1030 * ar.userObject contains the orignal value of result.obj 1031 * ar.result is null on success and failure 1032 */ 1033 @UnsupportedAppUsage switchWaitingOrHoldingAndActive(Message result)1034 void switchWaitingOrHoldingAndActive (Message result); 1035 1036 /** 1037 * 3GPP 22.030 6.5.5 1038 * "Adds a held call to the conversation" 1039 * 1040 * ar.exception carries exception on failure 1041 * ar.userObject contains the orignal value of result.obj 1042 * ar.result is null on success and failure 1043 */ conference(Message result)1044 void conference (Message result); 1045 1046 /** 1047 * Set preferred Voice Privacy (VP). 1048 * 1049 * @param enable true is enhanced and false is normal VP 1050 * @param result is a callback message 1051 */ setPreferredVoicePrivacy(boolean enable, Message result)1052 void setPreferredVoicePrivacy(boolean enable, Message result); 1053 1054 /** 1055 * Get currently set preferred Voice Privacy (VP) mode. 1056 * 1057 * @param result is a callback message 1058 */ getPreferredVoicePrivacy(Message result)1059 void getPreferredVoicePrivacy(Message result); 1060 1061 /** 1062 * 3GPP 22.030 6.5.5 1063 * "Places all active calls on hold except call X with which 1064 * communication shall be supported." 1065 */ separateConnection(int gsmIndex, Message result)1066 void separateConnection (int gsmIndex, Message result); 1067 1068 /** 1069 * 1070 * ar.exception carries exception on failure 1071 * ar.userObject contains the orignal value of result.obj 1072 * ar.result is null on success and failure 1073 */ 1074 @UnsupportedAppUsage acceptCall(Message result)1075 void acceptCall (Message result); 1076 1077 /** 1078 * also known as UDUB 1079 * ar.exception carries exception on failure 1080 * ar.userObject contains the orignal value of result.obj 1081 * ar.result is null on success and failure 1082 */ rejectCall(Message result)1083 void rejectCall (Message result); 1084 1085 /** 1086 * 3GPP 22.030 6.5.5 1087 * "Connects the two calls and disconnects the subscriber from both calls" 1088 * 1089 * ar.exception carries exception on failure 1090 * ar.userObject contains the orignal value of result.obj 1091 * ar.result is null on success and failure 1092 */ explicitCallTransfer(Message result)1093 void explicitCallTransfer (Message result); 1094 1095 /** 1096 * cause code returned as int[0] in Message.obj.response 1097 * Returns integer cause code defined in TS 24.008 1098 * Annex H or closest approximation. 1099 * Most significant codes: 1100 * - Any defined in 22.001 F.4 (for generating busy/congestion) 1101 * - Cause 68: ACM >= ACMMax 1102 */ getLastCallFailCause(Message result)1103 void getLastCallFailCause (Message result); 1104 1105 1106 /** 1107 * Reason for last PDP context deactivate or failure to activate 1108 * cause code returned as int[0] in Message.obj.response 1109 * returns an integer cause code defined in TS 24.008 1110 * section 6.1.3.1.3 or close approximation 1111 * @deprecated Do not use. 1112 */ 1113 @UnsupportedAppUsage 1114 @Deprecated getLastPdpFailCause(Message result)1115 void getLastPdpFailCause (Message result); 1116 1117 /** 1118 * The preferred new alternative to getLastPdpFailCause 1119 * that is also CDMA-compatible. 1120 */ 1121 @UnsupportedAppUsage getLastDataCallFailCause(Message result)1122 void getLastDataCallFailCause (Message result); 1123 setMute(boolean enableMute, Message response)1124 void setMute (boolean enableMute, Message response); 1125 getMute(Message response)1126 void getMute (Message response); 1127 1128 /** 1129 * response.obj is an AsyncResult 1130 * response.obj.result is an int[2] 1131 * response.obj.result[0] is received signal strength (0-31, 99) 1132 * response.obj.result[1] is bit error rate (0-7, 99) 1133 * as defined in TS 27.007 8.5 1134 */ 1135 @UnsupportedAppUsage getSignalStrength(Message response)1136 void getSignalStrength (Message response); 1137 1138 1139 /** 1140 * response.obj.result is an int[3] 1141 * response.obj.result[0] is registration state 0-5 from TS 27.007 7.2 1142 * response.obj.result[1] is LAC if registered or -1 if not 1143 * response.obj.result[2] is CID if registered or -1 if not 1144 * valid LAC and CIDs are 0x0000 - 0xffff 1145 * 1146 * Please note that registration state 4 ("unknown") is treated 1147 * as "out of service" above 1148 */ 1149 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) getVoiceRegistrationState(Message response)1150 void getVoiceRegistrationState (Message response); 1151 1152 /** 1153 * response.obj.result is an int[3] 1154 * response.obj.result[0] is registration state 0-5 from TS 27.007 7.2 1155 * response.obj.result[1] is LAC if registered or -1 if not 1156 * response.obj.result[2] is CID if registered or -1 if not 1157 * valid LAC and CIDs are 0x0000 - 0xffff 1158 * 1159 * Please note that registration state 4 ("unknown") is treated 1160 * as "out of service" above 1161 */ getDataRegistrationState(Message response)1162 void getDataRegistrationState (Message response); 1163 1164 /** 1165 * response.obj.result is a String[3] 1166 * response.obj.result[0] is long alpha or null if unregistered 1167 * response.obj.result[1] is short alpha or null if unregistered 1168 * response.obj.result[2] is numeric or null if unregistered 1169 */ 1170 @UnsupportedAppUsage getOperator(Message response)1171 void getOperator(Message response); 1172 1173 /** 1174 * ar.exception carries exception on failure 1175 * ar.userObject contains the orignal value of result.obj 1176 * ar.result is null on success and failure 1177 */ 1178 @UnsupportedAppUsage sendDtmf(char c, Message result)1179 void sendDtmf(char c, Message result); 1180 1181 1182 /** 1183 * ar.exception carries exception on failure 1184 * ar.userObject contains the orignal value of result.obj 1185 * ar.result is null on success and failure 1186 */ startDtmf(char c, Message result)1187 void startDtmf(char c, Message result); 1188 1189 /** 1190 * ar.exception carries exception on failure 1191 * ar.userObject contains the orignal value of result.obj 1192 * ar.result is null on success and failure 1193 */ stopDtmf(Message result)1194 void stopDtmf(Message result); 1195 1196 /** 1197 * ar.exception carries exception on failure 1198 * ar.userObject contains the orignal value of result.obj 1199 * ar.result is null on success and failure 1200 */ sendBurstDtmf(String dtmfString, int on, int off, Message result)1201 void sendBurstDtmf(String dtmfString, int on, int off, Message result); 1202 1203 /** 1204 * smscPDU is smsc address in PDU form GSM BCD format prefixed 1205 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1206 * pdu is SMS in PDU format as an ASCII hex string 1207 * less the SMSC address 1208 */ sendSMS(String smscPDU, String pdu, Message response)1209 void sendSMS (String smscPDU, String pdu, Message response); 1210 1211 /** 1212 * Send an SMS message, Identical to sendSMS, 1213 * except that more messages are expected to be sent soon 1214 * smscPDU is smsc address in PDU form GSM BCD format prefixed 1215 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1216 * pdu is SMS in PDU format as an ASCII hex string 1217 * less the SMSC address 1218 */ sendSMSExpectMore(String smscPDU, String pdu, Message response)1219 void sendSMSExpectMore (String smscPDU, String pdu, Message response); 1220 1221 /** 1222 * @param pdu is CDMA-SMS in internal pseudo-PDU format 1223 * @param response sent when operation completes 1224 */ sendCdmaSms(byte[] pdu, Message response)1225 void sendCdmaSms(byte[] pdu, Message response); 1226 1227 /** 1228 * Identical to sendCdmaSms, except that more messages are expected to be sent soon 1229 * @param pdu is CDMA-SMS in internal pseudo-PDU format 1230 * @param response response sent when operation completed 1231 */ sendCdmaSMSExpectMore(byte[] pdu, Message response)1232 void sendCdmaSMSExpectMore(byte[] pdu, Message response); 1233 1234 /** 1235 * send SMS over IMS with 3GPP/GSM SMS format 1236 * @param smscPDU is smsc address in PDU form GSM BCD format prefixed 1237 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1238 * @param pdu is SMS in PDU format as an ASCII hex string 1239 * less the SMSC address 1240 * @param retry indicates if this is a retry; 0 == not retry, nonzero = retry 1241 * @param messageRef valid field if retry is set to nonzero. 1242 * Contains messageRef from RIL_SMS_Response corresponding to failed MO SMS 1243 * @param response sent when operation completes 1244 */ sendImsGsmSms(String smscPDU, String pdu, int retry, int messageRef, Message response)1245 void sendImsGsmSms (String smscPDU, String pdu, int retry, int messageRef, 1246 Message response); 1247 1248 /** 1249 * send SMS over IMS with 3GPP2/CDMA SMS format 1250 * @param pdu is CDMA-SMS in internal pseudo-PDU format 1251 * @param response sent when operation completes 1252 * @param retry indicates if this is a retry; 0 == not retry, nonzero = retry 1253 * @param messageRef valid field if retry is set to nonzero. 1254 * Contains messageRef from RIL_SMS_Response corresponding to failed MO SMS 1255 * @param response sent when operation completes 1256 */ sendImsCdmaSms(byte[] pdu, int retry, int messageRef, Message response)1257 void sendImsCdmaSms(byte[] pdu, int retry, int messageRef, Message response); 1258 1259 /** 1260 * Deletes the specified SMS record from SIM memory (EF_SMS). 1261 * 1262 * @param index index of the SMS record to delete 1263 * @param response sent when operation completes 1264 */ 1265 @UnsupportedAppUsage deleteSmsOnSim(int index, Message response)1266 void deleteSmsOnSim(int index, Message response); 1267 1268 /** 1269 * Deletes the specified SMS record from RUIM memory (EF_SMS in DF_CDMA). 1270 * 1271 * @param index index of the SMS record to delete 1272 * @param response sent when operation completes 1273 */ 1274 @UnsupportedAppUsage deleteSmsOnRuim(int index, Message response)1275 void deleteSmsOnRuim(int index, Message response); 1276 1277 /** 1278 * Writes an SMS message to SIM memory (EF_SMS). 1279 * 1280 * @param status status of message on SIM. One of: 1281 * SmsManger.STATUS_ON_ICC_READ 1282 * SmsManger.STATUS_ON_ICC_UNREAD 1283 * SmsManger.STATUS_ON_ICC_SENT 1284 * SmsManger.STATUS_ON_ICC_UNSENT 1285 * @param pdu message PDU, as hex string 1286 * @param response sent when operation completes. 1287 * response.obj will be an AsyncResult, and will indicate 1288 * any error that may have occurred (eg, out of memory). 1289 */ 1290 @UnsupportedAppUsage writeSmsToSim(int status, String smsc, String pdu, Message response)1291 void writeSmsToSim(int status, String smsc, String pdu, Message response); 1292 1293 /** 1294 * Writes an SMS message to RUIM memory (EF_SMS). 1295 * 1296 * @param status status of message on SIM. One of: 1297 * SmsManger.STATUS_ON_ICC_READ 1298 * SmsManger.STATUS_ON_ICC_UNREAD 1299 * SmsManger.STATUS_ON_ICC_SENT 1300 * SmsManger.STATUS_ON_ICC_UNSENT 1301 * @param pdu message PDU, as byte array 1302 * @param response sent when operation completes. response.obj will be an AsyncResult, and will 1303 * indicate any error that may have occurred (eg, out of memory). 1304 */ 1305 @UnsupportedAppUsage writeSmsToRuim(int status, byte[] pdu, Message response)1306 void writeSmsToRuim(int status, byte[] pdu, Message response); 1307 1308 @UnsupportedAppUsage setRadioPower(boolean on, Message response)1309 default void setRadioPower(boolean on, Message response) { 1310 setRadioPower(on, false, false, response); 1311 } 1312 1313 /** 1314 * Sets the radio power on/off state (off is sometimes 1315 * called "airplane mode"). 1316 * 1317 * @param on true means "on", false means "off". 1318 * @param forEmergencyCall true means the purpose of turning radio power on is for emergency 1319 * call. No effect if power is set false. 1320 * @param isSelectedPhoneForEmergencyCall true means this phone / modem is selected to place 1321 * emergency call after turning power on. No effect if power 1322 * or forEmergency is set false. 1323 * @param response sent when operation completes. 1324 */ setRadioPower(boolean on, boolean forEmergencyCall, boolean isSelectedPhoneForEmergencyCall, Message response)1325 default void setRadioPower(boolean on, boolean forEmergencyCall, 1326 boolean isSelectedPhoneForEmergencyCall, Message response) {} 1327 1328 @UnsupportedAppUsage acknowledgeLastIncomingGsmSms(boolean success, int cause, Message response)1329 void acknowledgeLastIncomingGsmSms(boolean success, int cause, Message response); 1330 1331 @UnsupportedAppUsage acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message response)1332 void acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message response); 1333 1334 /** 1335 * Acknowledge successful or failed receipt of last incoming SMS, 1336 * including acknowledgement TPDU to send as the RP-User-Data element 1337 * of the RP-ACK or RP-ERROR PDU. 1338 * 1339 * @param success true to send RP-ACK, false to send RP-ERROR 1340 * @param ackPdu the acknowledgement TPDU in hexadecimal format 1341 * @param response sent when operation completes. 1342 */ acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu, Message response)1343 void acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu, Message response); 1344 1345 /** 1346 * parameters equivalent to 27.007 AT+CRSM command 1347 * response.obj will be an AsyncResult 1348 * response.obj.result will be an IccIoResult on success 1349 */ 1350 @UnsupportedAppUsage iccIO(int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, Message response)1351 void iccIO (int command, int fileid, String path, int p1, int p2, int p3, 1352 String data, String pin2, Message response); 1353 1354 /** 1355 * parameters equivalent to 27.007 AT+CRSM command 1356 * response.obj will be an AsyncResult 1357 * response.obj.userObj will be a IccIoResult on success 1358 */ 1359 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) iccIOForApp(int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, String aid, Message response)1360 void iccIOForApp (int command, int fileid, String path, int p1, int p2, int p3, 1361 String data, String pin2, String aid, Message response); 1362 1363 /** 1364 * (AsyncResult)response.obj).result is an int[] with element [0] set to 1365 * 1 for "CLIP is provisioned", and 0 for "CLIP is not provisioned". 1366 * 1367 * @param response is callback message 1368 */ 1369 queryCLIP(Message response)1370 void queryCLIP(Message response); 1371 1372 /** 1373 * response.obj will be a an int[2] 1374 * 1375 * response.obj[0] will be TS 27.007 +CLIR parameter 'n' 1376 * 0 presentation indicator is used according to the subscription of the CLIR service 1377 * 1 CLIR invocation 1378 * 2 CLIR suppression 1379 * 1380 * response.obj[1] will be TS 27.007 +CLIR parameter 'm' 1381 * 0 CLIR not provisioned 1382 * 1 CLIR provisioned in permanent mode 1383 * 2 unknown (e.g. no network, etc.) 1384 * 3 CLIR temporary mode presentation restricted 1385 * 4 CLIR temporary mode presentation allowed 1386 */ 1387 getCLIR(Message response)1388 void getCLIR(Message response); 1389 1390 /** 1391 * clirMode is one of the CLIR_* constants above 1392 * 1393 * response.obj is null 1394 */ 1395 setCLIR(int clirMode, Message response)1396 void setCLIR(int clirMode, Message response); 1397 1398 /** 1399 * (AsyncResult)response.obj).result is an int[] with element [0] set to 1400 * 0 for disabled, 1 for enabled. 1401 * 1402 * @param serviceClass is a sum of SERVICE_CLASS_* 1403 * @param response is callback message 1404 */ 1405 1406 @UnsupportedAppUsage queryCallWaiting(int serviceClass, Message response)1407 void queryCallWaiting(int serviceClass, Message response); 1408 1409 /** 1410 * @param enable is true to enable, false to disable 1411 * @param serviceClass is a sum of SERVICE_CLASS_* 1412 * @param response is callback message 1413 */ 1414 1415 @UnsupportedAppUsage setCallWaiting(boolean enable, int serviceClass, Message response)1416 void setCallWaiting(boolean enable, int serviceClass, Message response); 1417 1418 /** 1419 * @param action is one of CF_ACTION_* 1420 * @param cfReason is one of CF_REASON_* 1421 * @param serviceClass is a sum of SERVICE_CLASSS_* 1422 */ 1423 @UnsupportedAppUsage setCallForward(int action, int cfReason, int serviceClass, String number, int timeSeconds, Message response)1424 void setCallForward(int action, int cfReason, int serviceClass, 1425 String number, int timeSeconds, Message response); 1426 1427 /** 1428 * cfReason is one of CF_REASON_* 1429 * 1430 * ((AsyncResult)response.obj).result will be an array of 1431 * CallForwardInfo's 1432 * 1433 * An array of length 0 means "disabled for all codes" 1434 */ 1435 @UnsupportedAppUsage queryCallForwardStatus(int cfReason, int serviceClass, String number, Message response)1436 void queryCallForwardStatus(int cfReason, int serviceClass, 1437 String number, Message response); 1438 1439 @UnsupportedAppUsage setNetworkSelectionModeAutomatic(Message response)1440 void setNetworkSelectionModeAutomatic(Message response); 1441 1442 /** 1443 * Ask the radio to connect to the input network with specific RadioAccessNetwork 1444 * and change selection mode to manual. 1445 * @param operatorNumeric PLMN ID of the network to select. 1446 * @param ran radio access network type (see {@link AccessNetworkType}). 1447 * @param response callback message. 1448 */ 1449 @UnsupportedAppUsage setNetworkSelectionModeManual(String operatorNumeric, int ran, Message response)1450 void setNetworkSelectionModeManual(String operatorNumeric, int ran, Message response); 1451 1452 /** 1453 * Queries whether the current network selection mode is automatic 1454 * or manual 1455 * 1456 * ((AsyncResult)response.obj).result is an int[] with element [0] being 1457 * a 0 for automatic selection and a 1 for manual selection 1458 */ 1459 1460 @UnsupportedAppUsage getNetworkSelectionMode(Message response)1461 void getNetworkSelectionMode(Message response); 1462 1463 /** 1464 * Queries the currently available networks 1465 * 1466 * ((AsyncResult)response.obj).result is a List of NetworkInfo objects 1467 */ getAvailableNetworks(Message response)1468 void getAvailableNetworks(Message response); 1469 1470 /** 1471 * Starts a radio network scan 1472 * 1473 * ((AsyncResult)response.obj).result is a NetworkScanResult object 1474 */ startNetworkScan(NetworkScanRequest nsr, Message response)1475 void startNetworkScan(NetworkScanRequest nsr, Message response); 1476 1477 /** 1478 * Stops the ongoing network scan 1479 * 1480 * ((AsyncResult)response.obj).result is a NetworkScanResult object 1481 * 1482 */ stopNetworkScan(Message response)1483 void stopNetworkScan(Message response); 1484 1485 /** 1486 * Gets the baseband version 1487 */ 1488 @UnsupportedAppUsage getBasebandVersion(Message response)1489 void getBasebandVersion(Message response); 1490 1491 /** 1492 * (AsyncResult)response.obj).result will be an Integer representing 1493 * the sum of enabled service classes (sum of SERVICE_CLASS_*) 1494 * 1495 * @param facility one of CB_FACILTY_* 1496 * @param password password or "" if not required 1497 * @param serviceClass is a sum of SERVICE_CLASS_* 1498 * @param response is callback message 1499 */ 1500 1501 @UnsupportedAppUsage queryFacilityLock(String facility, String password, int serviceClass, Message response)1502 void queryFacilityLock (String facility, String password, int serviceClass, 1503 Message response); 1504 1505 /** 1506 * (AsyncResult)response.obj).result will be an Integer representing 1507 * the sum of enabled service classes (sum of SERVICE_CLASS_*) for the 1508 * application with appId. 1509 * 1510 * @param facility one of CB_FACILTY_* 1511 * @param password password or "" if not required 1512 * @param serviceClass is a sum of SERVICE_CLASS_* 1513 * @param appId is application Id or null if none 1514 * @param response is callback message 1515 */ 1516 queryFacilityLockForApp(String facility, String password, int serviceClass, String appId, Message response)1517 void queryFacilityLockForApp(String facility, String password, int serviceClass, String appId, 1518 Message response); 1519 1520 /** 1521 * @param facility one of CB_FACILTY_* 1522 * @param lockState true means lock, false means unlock 1523 * @param password password or "" if not required 1524 * @param serviceClass is a sum of SERVICE_CLASS_* 1525 * @param response is callback message 1526 */ 1527 @UnsupportedAppUsage setFacilityLock(String facility, boolean lockState, String password, int serviceClass, Message response)1528 void setFacilityLock (String facility, boolean lockState, String password, 1529 int serviceClass, Message response); 1530 1531 /** 1532 * Set the facility lock for the app with this AID on the ICC card. 1533 * 1534 * @param facility one of CB_FACILTY_* 1535 * @param lockState true means lock, false means unlock 1536 * @param password password or "" if not required 1537 * @param serviceClass is a sum of SERVICE_CLASS_* 1538 * @param appId is application Id or null if none 1539 * @param response is callback message 1540 */ setFacilityLockForApp(String facility, boolean lockState, String password, int serviceClass, String appId, Message response)1541 void setFacilityLockForApp(String facility, boolean lockState, String password, 1542 int serviceClass, String appId, Message response); 1543 sendUSSD(String ussdString, Message response)1544 void sendUSSD (String ussdString, Message response); 1545 1546 /** 1547 * Cancels a pending USSD session if one exists. 1548 * @param response callback message 1549 */ cancelPendingUssd(Message response)1550 void cancelPendingUssd (Message response); 1551 resetRadio(Message result)1552 void resetRadio(Message result); 1553 1554 /** 1555 * Assign a specified band for RF configuration. 1556 * 1557 * @param bandMode one of BM_*_BAND 1558 * @param response is callback message 1559 */ setBandMode(int bandMode, Message response)1560 void setBandMode (int bandMode, Message response); 1561 1562 /** 1563 * Query the list of band mode supported by RF. 1564 * 1565 * @param response is callback message 1566 * ((AsyncResult)response.obj).result is an int[] where int[0] is 1567 * the size of the array and the rest of each element representing 1568 * one available BM_*_BAND 1569 */ queryAvailableBandMode(Message response)1570 void queryAvailableBandMode (Message response); 1571 1572 /** 1573 * Requests to set the preferred network type for searching and registering 1574 * (CS/PS domain, RAT, and operation mode) 1575 * @param networkType one of NT_*_TYPE 1576 * @param response is callback message 1577 */ 1578 @UnsupportedAppUsage setPreferredNetworkType(int networkType , Message response)1579 void setPreferredNetworkType(int networkType , Message response); 1580 1581 /** 1582 * Query the preferred network type setting 1583 * 1584 * @param response is callback message to report one of NT_*_TYPE 1585 */ 1586 @UnsupportedAppUsage getPreferredNetworkType(Message response)1587 void getPreferredNetworkType(Message response); 1588 1589 /** 1590 * Requests to set the allowed network types for searching and registering. 1591 * 1592 * @param networkTypeBitmask {@link TelephonyManager.NetworkTypeBitMask} 1593 * @param response is callback message 1594 */ setAllowedNetworkTypesBitmap( @elephonyManager.NetworkTypeBitMask int networkTypeBitmask, Message response)1595 void setAllowedNetworkTypesBitmap( 1596 @TelephonyManager.NetworkTypeBitMask int networkTypeBitmask, Message response); 1597 1598 /** 1599 * Query the allowed network types setting. 1600 * 1601 * @param response is callback message to report allowed network types bitmask 1602 */ getAllowedNetworkTypesBitmap(Message response)1603 void getAllowedNetworkTypesBitmap(Message response); 1604 1605 /** 1606 * Enable/Disable E-UTRA-NR Dual Connectivity 1607 * @param nrDualConnectivityState expected NR dual connectivity state 1608 * This can be passed following states 1609 * <ol> 1610 * <li>Enable NR dual connectivity {@link TelephonyManager#NR_DUAL_CONNECTIVITY_ENABLE} 1611 * <li>Disable NR dual connectivity {@link TelephonyManager#NR_DUAL_CONNECTIVITY_DISABLE} 1612 * <li>Disable NR dual connectivity and force secondary cell to be released 1613 * {@link TelephonyManager#NR_DUAL_CONNECTIVITY_DISABLE_IMMEDIATE} 1614 * </ol> 1615 */ setNrDualConnectivityState(int nrDualConnectivityState, Message message, WorkSource workSource)1616 default void setNrDualConnectivityState(int nrDualConnectivityState, 1617 Message message, WorkSource workSource) {} 1618 1619 /** 1620 * Is E-UTRA-NR Dual Connectivity enabled 1621 */ isNrDualConnectivityEnabled(Message message, WorkSource workSource)1622 default void isNrDualConnectivityEnabled(Message message, WorkSource workSource) {} 1623 1624 /** 1625 * Enable or disable Voice over NR (VoNR) 1626 * @param enabled enable or disable VoNR. 1627 */ setVoNrEnabled(boolean enabled, Message message, WorkSource workSource)1628 default void setVoNrEnabled(boolean enabled, Message message, WorkSource workSource) {} 1629 1630 /** 1631 * Is voice over NR enabled 1632 */ isVoNrEnabled(Message message, WorkSource workSource)1633 default void isVoNrEnabled(Message message, WorkSource workSource) {} 1634 1635 /** 1636 * Request to enable/disable network state change notifications when 1637 * location information (lac and/or cid) has changed. 1638 * 1639 * @param enable true to enable, false to disable 1640 * @param workSource calling WorkSource 1641 * @param response callback message 1642 */ setLocationUpdates(boolean enable, WorkSource workSource, Message response)1643 default void setLocationUpdates(boolean enable, WorkSource workSource, Message response) {} 1644 1645 /** 1646 * To be deleted 1647 */ setLocationUpdates(boolean enable, Message response)1648 default void setLocationUpdates(boolean enable, Message response) {} 1649 1650 /** 1651 * Gets the default SMSC address. 1652 * 1653 * @param result Callback message contains the SMSC address. 1654 */ 1655 @UnsupportedAppUsage getSmscAddress(Message result)1656 void getSmscAddress(Message result); 1657 1658 /** 1659 * Sets the default SMSC address. 1660 * 1661 * @param address new SMSC address 1662 * @param result Callback message is empty on completion 1663 */ 1664 @UnsupportedAppUsage setSmscAddress(String address, Message result)1665 void setSmscAddress(String address, Message result); 1666 1667 /** 1668 * Indicates whether there is storage available for new SMS messages. 1669 * @param available true if storage is available 1670 * @param result callback message 1671 */ 1672 @UnsupportedAppUsage reportSmsMemoryStatus(boolean available, Message result)1673 void reportSmsMemoryStatus(boolean available, Message result); 1674 1675 /** 1676 * Indicates to the vendor ril that StkService is running 1677 * and is ready to receive RIL_UNSOL_STK_XXXX commands. 1678 * 1679 * @param result callback message 1680 */ 1681 @UnsupportedAppUsage reportStkServiceIsRunning(Message result)1682 void reportStkServiceIsRunning(Message result); 1683 1684 @UnsupportedAppUsage invokeOemRilRequestRaw(byte[] data, Message response)1685 void invokeOemRilRequestRaw(byte[] data, Message response); 1686 1687 /** 1688 * Sends carrier specific information to the vendor ril that can be used to 1689 * encrypt the IMSI and IMPI. 1690 * 1691 * @param publicKey the public key of the carrier used to encrypt IMSI/IMPI. 1692 * @param keyIdentifier the key identifier is optional information that is carrier 1693 * specific. 1694 * @param response callback message 1695 */ setCarrierInfoForImsiEncryption(ImsiEncryptionInfo imsiEncryptionInfo, Message response)1696 void setCarrierInfoForImsiEncryption(ImsiEncryptionInfo imsiEncryptionInfo, 1697 Message response); 1698 invokeOemRilRequestStrings(String[] strings, Message response)1699 void invokeOemRilRequestStrings(String[] strings, Message response); 1700 1701 /** 1702 * Fires when RIL_UNSOL_OEM_HOOK_RAW is received from the RIL. 1703 */ setOnUnsolOemHookRaw(Handler h, int what, Object obj)1704 void setOnUnsolOemHookRaw(Handler h, int what, Object obj); unSetOnUnsolOemHookRaw(Handler h)1705 void unSetOnUnsolOemHookRaw(Handler h); 1706 1707 /** 1708 * Send TERMINAL RESPONSE to the SIM, after processing a proactive command 1709 * sent by the SIM. 1710 * 1711 * @param contents String containing SAT/USAT response in hexadecimal 1712 * format starting with first byte of response data. See 1713 * TS 102 223 for details. 1714 * @param response Callback message 1715 */ 1716 @UnsupportedAppUsage sendTerminalResponse(String contents, Message response)1717 public void sendTerminalResponse(String contents, Message response); 1718 1719 /** 1720 * Send ENVELOPE to the SIM, after processing a proactive command sent by 1721 * the SIM. 1722 * 1723 * @param contents String containing SAT/USAT response in hexadecimal 1724 * format starting with command tag. See TS 102 223 for 1725 * details. 1726 * @param response Callback message 1727 */ 1728 @UnsupportedAppUsage sendEnvelope(String contents, Message response)1729 public void sendEnvelope(String contents, Message response); 1730 1731 /** 1732 * Send ENVELOPE to the SIM, such as an SMS-PP data download envelope 1733 * for a SIM data download message. This method has one difference 1734 * from {@link #sendEnvelope}: The SW1 and SW2 status bytes from the UICC response 1735 * are returned along with the response data. 1736 * 1737 * response.obj will be an AsyncResult 1738 * response.obj.result will be an IccIoResult on success 1739 * 1740 * @param contents String containing SAT/USAT response in hexadecimal 1741 * format starting with command tag. See TS 102 223 for 1742 * details. 1743 * @param response Callback message 1744 */ sendEnvelopeWithStatus(String contents, Message response)1745 public void sendEnvelopeWithStatus(String contents, Message response); 1746 1747 /** 1748 * Accept or reject the call setup request from SIM. 1749 * 1750 * @param accept true if the call is to be accepted, false otherwise. 1751 * @param response Callback message 1752 */ 1753 @UnsupportedAppUsage handleCallSetupRequestFromSim(boolean accept, Message response)1754 public void handleCallSetupRequestFromSim(boolean accept, Message response); 1755 1756 /** 1757 * Activate or deactivate cell broadcast SMS for GSM. 1758 * 1759 * @param activate 1760 * true = activate, false = deactivate 1761 * @param result Callback message is empty on completion 1762 */ setGsmBroadcastActivation(boolean activate, Message result)1763 public void setGsmBroadcastActivation(boolean activate, Message result); 1764 1765 /** 1766 * Configure cell broadcast SMS for GSM. 1767 * 1768 * @param response Callback message is empty on completion 1769 */ setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message response)1770 public void setGsmBroadcastConfig(SmsBroadcastConfigInfo[] config, Message response); 1771 1772 /** 1773 * Query the current configuration of cell broadcast SMS of GSM. 1774 * 1775 * @param response 1776 * Callback message contains the configuration from the modem 1777 * on completion 1778 */ getGsmBroadcastConfig(Message response)1779 public void getGsmBroadcastConfig(Message response); 1780 1781 //***** new Methods for CDMA support 1782 1783 /** 1784 * Request the device ESN / MEID / IMEI / IMEISV. 1785 * "response" is const char ** 1786 * [0] is IMEI if GSM subscription is available 1787 * [1] is IMEISV if GSM subscription is available 1788 * [2] is ESN if CDMA subscription is available 1789 * [3] is MEID if CDMA subscription is available 1790 */ getDeviceIdentity(Message response)1791 public void getDeviceIdentity(Message response); 1792 1793 /** 1794 * Request the device IMEI / IMEI type / IMEISV 1795 * "response" is ImeiInfo object that contains 1796 * [0] ImeiType Indicates whether IMEI is of primary or secondary type 1797 * [1] IMEI if GSM subscription is available 1798 * [2] IMEISV if GSM subscription is available 1799 * 1800 * @param response Message 1801 */ getImei(Message response)1802 public void getImei(Message response); 1803 1804 /** 1805 * Request the device MDN / H_SID / H_NID / MIN. 1806 * "response" is const char ** 1807 * [0] is MDN if CDMA subscription is available 1808 * [1] is a comma separated list of H_SID (Home SID) in decimal format 1809 * if CDMA subscription is available 1810 * [2] is a comma separated list of H_NID (Home NID) in decimal format 1811 * if CDMA subscription is available 1812 * [3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available 1813 */ 1814 @UnsupportedAppUsage getCDMASubscription(Message response)1815 public void getCDMASubscription(Message response); 1816 1817 /** 1818 * Send Flash Code. 1819 * "response" is is NULL 1820 * [0] is a FLASH string 1821 */ sendCDMAFeatureCode(String FeatureCode, Message response)1822 public void sendCDMAFeatureCode(String FeatureCode, Message response); 1823 1824 /** Set the Phone type created */ 1825 @UnsupportedAppUsage setPhoneType(int phoneType)1826 void setPhoneType(int phoneType); 1827 1828 /** 1829 * Query the CDMA roaming preference setting 1830 * 1831 * @param response is callback message to report one of CDMA_RM_* 1832 */ queryCdmaRoamingPreference(Message response)1833 void queryCdmaRoamingPreference(Message response); 1834 1835 /** 1836 * Requests to set the CDMA roaming preference 1837 * @param cdmaRoamingType one of CDMA_RM_* 1838 * @param response is callback message 1839 */ setCdmaRoamingPreference(int cdmaRoamingType, Message response)1840 void setCdmaRoamingPreference(int cdmaRoamingType, Message response); 1841 1842 /** 1843 * Requests to set the CDMA subscription mode 1844 * @param cdmaSubscriptionType one of CDMA_SUBSCRIPTION_* 1845 * @param response is callback message 1846 */ setCdmaSubscriptionSource(int cdmaSubscriptionType, Message response)1847 void setCdmaSubscriptionSource(int cdmaSubscriptionType, Message response); 1848 1849 /** 1850 * Requests to get the CDMA subscription srouce 1851 * @param response is callback message 1852 */ getCdmaSubscriptionSource(Message response)1853 void getCdmaSubscriptionSource(Message response); 1854 1855 /** 1856 * Set the TTY mode 1857 * 1858 * @param ttyMode one of the following: 1859 * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} 1860 * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} 1861 * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} 1862 * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO} 1863 * @param response is callback message 1864 */ 1865 @UnsupportedAppUsage setTTYMode(int ttyMode, Message response)1866 void setTTYMode(int ttyMode, Message response); 1867 1868 /** 1869 * Query the TTY mode 1870 * (AsyncResult)response.obj).result is an int[] with element [0] set to 1871 * tty mode: 1872 * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} 1873 * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} 1874 * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} 1875 * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO} 1876 * @param response is callback message 1877 */ 1878 @UnsupportedAppUsage queryTTYMode(Message response)1879 void queryTTYMode(Message response); 1880 1881 /** 1882 * Setup a packet data connection On successful completion, the result 1883 * message will return a SetupDataResult object containing the connection information. 1884 * 1885 * @param accessNetworkType 1886 * Access network to use. Values is one of AccessNetworkConstants.AccessNetworkType. 1887 * @param dataProfile 1888 * Data profile for data call setup 1889 * @param isRoaming 1890 * Device is roaming or not 1891 * @param allowRoaming 1892 * Flag indicating data roaming is enabled or not 1893 * @param reason 1894 * The reason for data setup 1895 * @param linkProperties 1896 * If the reason is for handover, this indicates the link properties of the existing 1897 * data connection 1898 * @param pduSessionId the pdu session id to be used for this data call. 1899 * The standard range of values are 1-15 while 0 means no pdu session id was attached 1900 * to this call. Reference: 3GPP TS 24.007 section 11.2.3.1b. 1901 * @param sliceInfo used within the data connection when a handover occurs from EPDG to 5G. 1902 * The value is null unless the access network is 1903 * {@link android.telephony.AccessNetworkConstants.AccessNetworkType#NGRAN} and a 1904 * handover is occurring from EPDG to 5G. If the slice passed is rejected, then 1905 * {@link DataCallResponse#getCause()} is 1906 * {@link android.telephony.DataFailCause#SLICE_REJECTED}. 1907 * @param trafficDescriptor TrafficDescriptor for which data connection needs to be established. 1908 * It is used for URSP traffic matching as described in 3GPP TS 24.526 Section 4.2.2. 1909 * It includes an optional DNN which, if present, must be used for traffic matching; 1910 * it does not specify the end point to be used for the data call. 1911 * @param matchAllRuleAllowed indicates if using default match-all URSP rule for this request is 1912 * allowed. If false, this request must not use the match-all URSP rule and if a 1913 * non-match-all rule is not found (or if URSP rules are not available) then 1914 * {@link DataCallResponse#getCause()} is 1915 * {@link android.telephony.DataFailCause#MATCH_ALL_RULE_NOT_ALLOWED}. This is needed 1916 * as some requests need to have a hard failure if the intention cannot be met, 1917 * for example, a zero-rating slice. 1918 * @param result 1919 * Callback message 1920 */ setupDataCall(int accessNetworkType, DataProfile dataProfile, boolean isRoaming, boolean allowRoaming, int reason, LinkProperties linkProperties, int pduSessionId, NetworkSliceInfo sliceInfo, TrafficDescriptor trafficDescriptor, boolean matchAllRuleAllowed, Message result)1921 void setupDataCall(int accessNetworkType, DataProfile dataProfile, boolean isRoaming, 1922 boolean allowRoaming, int reason, LinkProperties linkProperties, int pduSessionId, 1923 NetworkSliceInfo sliceInfo, TrafficDescriptor trafficDescriptor, 1924 boolean matchAllRuleAllowed, Message result); 1925 1926 /** 1927 * Deactivate packet data connection 1928 * 1929 * @param cid 1930 * The connection ID 1931 * @param reason 1932 * Data disconnect reason. 1933 * @param result 1934 * Callback message is empty on completion 1935 */ deactivateDataCall(int cid, int reason, Message result)1936 public void deactivateDataCall(int cid, int reason, Message result); 1937 1938 /** 1939 * Activate or deactivate cell broadcast SMS for CDMA. 1940 * 1941 * @param activate 1942 * true = activate, false = deactivate 1943 * @param result 1944 * Callback message is empty on completion 1945 */ 1946 @UnsupportedAppUsage setCdmaBroadcastActivation(boolean activate, Message result)1947 public void setCdmaBroadcastActivation(boolean activate, Message result); 1948 1949 /** 1950 * Configure cdma cell broadcast SMS. 1951 * 1952 * @param response 1953 * Callback message is empty on completion 1954 */ setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message response)1955 public void setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message response); 1956 1957 /** 1958 * Query the current configuration of cdma cell broadcast SMS. 1959 * 1960 * @param result 1961 * Callback message contains the configuration from the modem on completion 1962 */ 1963 @UnsupportedAppUsage getCdmaBroadcastConfig(Message result)1964 public void getCdmaBroadcastConfig(Message result); 1965 1966 /** 1967 * Requests the radio's system selection module to exit emergency callback mode. 1968 * This function should only be called from for CDMA. 1969 * 1970 * @param response callback message 1971 */ 1972 @UnsupportedAppUsage exitEmergencyCallbackMode(Message response)1973 public void exitEmergencyCallbackMode(Message response); 1974 1975 /** 1976 * Request the status of the ICC and UICC cards. 1977 * 1978 * @param result 1979 * Callback message containing {@link IccCardStatus} structure for the card. 1980 */ 1981 @UnsupportedAppUsage getIccCardStatus(Message result)1982 public void getIccCardStatus(Message result); 1983 1984 /** 1985 * Request the status of all the physical UICC slots. 1986 * 1987 * @param result Callback message containing a {@link java.util.ArrayList} of 1988 * {@link com.android.internal.telephony.uicc.IccSlotStatus} instances for all the slots. 1989 */ getIccSlotsStatus(Message result)1990 void getIccSlotsStatus(Message result); 1991 1992 /** 1993 * Set the mapping from logical slots to physical slots. 1994 * 1995 * @param physicalSlots Mapping from logical slots to physical slots. 1996 * @param result Callback message is empty on completion. 1997 */ setLogicalToPhysicalSlotMapping(int[] physicalSlots, Message result)1998 void setLogicalToPhysicalSlotMapping(int[] physicalSlots, Message result); 1999 2000 /** 2001 * Request the SIM application on the UICC to perform authentication 2002 * challenge/response algorithm. The data string and challenge response are 2003 * Base64 encoded Strings. 2004 * Can support EAP-SIM, EAP-AKA with results encoded per 3GPP TS 31.102. 2005 * 2006 * @param authContext is the P2 parameter that specifies the authentication context per 3GPP TS 2007 * 31.102 (Section 7.1.2) 2008 * @param data authentication challenge data 2009 * @param aid used to determine which application/slot to send the auth command to. See ETSI 2010 * 102.221 8.1 and 101.220 4 2011 * @param response a callback message with the String response in the obj field 2012 */ 2013 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) requestIccSimAuthentication(int authContext, String data, String aid, Message response)2014 public void requestIccSimAuthentication(int authContext, String data, String aid, Message response); 2015 2016 /** 2017 * Get the current Voice Radio Technology. 2018 * 2019 * AsyncResult.result is an int array with the first value 2020 * being one of the ServiceState.RIL_RADIO_TECHNOLOGY_xxx values. 2021 * 2022 * @param result is sent back to handler and result.obj is a AsyncResult 2023 */ getVoiceRadioTechnology(Message result)2024 void getVoiceRadioTechnology(Message result); 2025 2026 /** 2027 * Return the current set of CellInfo records 2028 * 2029 * AsyncResult.result is a of Collection<CellInfo> 2030 * 2031 * @param result is sent back to handler and result.obj is a AsyncResult 2032 * @param workSource calling WorkSource 2033 */ getCellInfoList(Message result, WorkSource workSource)2034 default void getCellInfoList(Message result, WorkSource workSource) {} 2035 2036 /** 2037 * Sets the minimum time in milli-seconds between when RIL_UNSOL_CELL_INFO_LIST 2038 * should be invoked. 2039 * 2040 * The default, 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported 2041 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue 2042 * A RIL_UNSOL_CELL_INFO_LIST. 2043 * 2044 * 2045 2046 * @param rateInMillis is sent back to handler and result.obj is a AsyncResult 2047 * @param response.obj is AsyncResult ar when sent to associated handler 2048 * ar.exception carries exception on failure or null on success 2049 * otherwise the error. 2050 * @param workSource calling WorkSource 2051 */ setCellInfoListRate(int rateInMillis, Message response, WorkSource workSource)2052 default void setCellInfoListRate(int rateInMillis, Message response, WorkSource workSource){} 2053 2054 /** 2055 * Fires when RIL_UNSOL_CELL_INFO_LIST is received from the RIL. 2056 */ 2057 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) registerForCellInfoList(Handler h, int what, Object obj)2058 void registerForCellInfoList(Handler h, int what, Object obj); unregisterForCellInfoList(Handler h)2059 void unregisterForCellInfoList(Handler h); 2060 2061 /** 2062 * Fires when a new {@link android.telephony.PhysicalChannelConfig} list is received from the 2063 * RIL. 2064 */ registerForPhysicalChannelConfiguration(Handler h, int what, Object obj)2065 void registerForPhysicalChannelConfiguration(Handler h, int what, Object obj); 2066 2067 /** 2068 * Unregisters the handler for {@link android.telephony.PhysicalChannelConfig} updates. 2069 */ unregisterForPhysicalChannelConfiguration(Handler h)2070 void unregisterForPhysicalChannelConfiguration(Handler h); 2071 2072 /** 2073 * Set Initial Attach Apn 2074 * 2075 * @param dataProfile 2076 * data profile for initial APN attach 2077 * @param isRoaming 2078 * indicating the device is roaming or not 2079 * @param result 2080 * callback message contains the information of SUCCESS/FAILURE 2081 */ setInitialAttachApn(DataProfile dataProfile, boolean isRoaming, Message result)2082 void setInitialAttachApn(DataProfile dataProfile, boolean isRoaming, Message result); 2083 2084 /** 2085 * Set data profiles in modem 2086 * 2087 * @param dps 2088 * Array of the data profiles set to modem 2089 * @param isRoaming 2090 * Indicating if the device is roaming or not 2091 * @param result 2092 * callback message contains the information of SUCCESS/FAILURE 2093 */ setDataProfile(DataProfile[] dps, boolean isRoaming, Message result)2094 void setDataProfile(DataProfile[] dps, boolean isRoaming, Message result); 2095 2096 /** 2097 * Notifiy that we are testing an emergency call 2098 */ testingEmergencyCall()2099 public void testingEmergencyCall(); 2100 2101 /** 2102 * Open a logical channel to the SIM. 2103 * 2104 * Input parameters equivalent to TS 27.007 AT+CCHO command. 2105 * 2106 * @param AID Application id. See ETSI 102.221 and 101.220. 2107 * @param p2 P2 parameter (described in ISO 7816-4). 2108 * @param response Callback message. response.obj will be an int [1] with 2109 * element [0] set to the id of the logical channel. 2110 */ iccOpenLogicalChannel(String AID, int p2, Message response)2111 public void iccOpenLogicalChannel(String AID, int p2, Message response); 2112 2113 /** 2114 * Close a previously opened logical channel to the SIM. 2115 * 2116 * Input parameters equivalent to TS 27.007 AT+CCHC command. 2117 * 2118 * Per spec SGP.22 V3.0, ES10 commands needs to be sent over command port of MEP-A. In order 2119 * to close proper logical channel, should pass information about whether the logical channel 2120 * was opened for sending ES10 commands or not. 2121 * 2122 * @param channel Channel id. Id of the channel to be closed. 2123 * @param isEs10 Whether the logical channel is opened to perform ES10 operations. 2124 * @param response Callback message. 2125 */ iccCloseLogicalChannel(int channel, boolean isEs10, Message response)2126 public void iccCloseLogicalChannel(int channel, boolean isEs10, Message response); 2127 2128 /** 2129 * Exchange APDUs with the SIM on a logical channel. 2130 * 2131 * Input parameters equivalent to TS 27.007 AT+CGLA command. 2132 * 2133 * @param channel Channel id of the channel to use for communication. Has to 2134 * be greater than zero. 2135 * @param cla Class of the APDU command. 2136 * @param instruction Instruction of the APDU command. 2137 * @param p1 P1 value of the APDU command. 2138 * @param p2 P2 value of the APDU command. 2139 * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 2140 * is sent to the SIM. 2141 * @param data Data to be sent with the APDU. 2142 * @param isEs10Command whether APDU command is an ES10 command or a regular APDU 2143 * @param response Callback message. response.obj.userObj will be 2144 * an IccIoResult on success. 2145 */ iccTransmitApduLogicalChannel(int channel, int cla, int instruction, int p1, int p2, int p3, String data, boolean isEs10Command, Message response)2146 void iccTransmitApduLogicalChannel(int channel, int cla, int instruction, 2147 int p1, int p2, int p3, String data, boolean isEs10Command, Message response); 2148 2149 /** 2150 * Exchange APDUs with the SIM on a basic channel. 2151 * 2152 * Input parameters equivalent to TS 27.007 AT+CSIM command. 2153 * 2154 * @param cla Class of the APDU command. 2155 * @param instruction Instruction of the APDU command. 2156 * @param p1 P1 value of the APDU command. 2157 * @param p2 P2 value of the APDU command. 2158 * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 2159 * is sent to the SIM. 2160 * @param data Data to be sent with the APDU. 2161 * @param response Callback message. response.obj.userObj will be 2162 * an IccIoResult on success. 2163 */ iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2, int p3, String data, Message response)2164 public void iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2, 2165 int p3, String data, Message response); 2166 2167 /** 2168 * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 2169 * Used for device configuration by some CDMA operators. 2170 * 2171 * @param itemID the ID of the item to read 2172 * @param response callback message with the String response in the obj field 2173 * @param workSource calling WorkSource 2174 */ nvReadItem(int itemID, Message response, WorkSource workSource)2175 default void nvReadItem(int itemID, Message response, WorkSource workSource) {} 2176 2177 /** 2178 * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 2179 * Used for device configuration by some CDMA operators. 2180 * 2181 * @param itemID the ID of the item to read 2182 * @param itemValue the value to write, as a String 2183 * @param response Callback message. 2184 * @param workSource calling WorkSource 2185 */ nvWriteItem(int itemID, String itemValue, Message response, WorkSource workSource)2186 default void nvWriteItem(int itemID, String itemValue, Message response, 2187 WorkSource workSource) {} 2188 2189 /** 2190 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. 2191 * Used for device configuration by some CDMA operators. 2192 * 2193 * @param preferredRoamingList byte array containing the new PRL 2194 * @param response Callback message. 2195 */ nvWriteCdmaPrl(byte[] preferredRoamingList, Message response)2196 void nvWriteCdmaPrl(byte[] preferredRoamingList, Message response); 2197 2198 /** 2199 * Perform the specified type of NV config reset. The radio will be taken offline 2200 * and the device must be rebooted after erasing the NV. Used for device 2201 * configuration by some CDMA operators. 2202 * 2203 * @param resetType reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV reset 2204 * @param response Callback message. 2205 */ nvResetConfig(int resetType, Message response)2206 void nvResetConfig(int resetType, Message response); 2207 2208 /** 2209 * returned message 2210 * retMsg.obj = AsyncResult ar 2211 * ar.exception carries exception on failure 2212 * ar.userObject contains the orignal value of result.obj 2213 * ar.result contains a List of HardwareConfig 2214 */ getHardwareConfig(Message result)2215 void getHardwareConfig (Message result); 2216 2217 /** 2218 * @return version of the ril. 2219 */ getRilVersion()2220 int getRilVersion(); 2221 2222 /** 2223 * @return the radio hal version 2224 * @deprecated use {@link #getHalVersion(int)} 2225 */ 2226 @Deprecated getHalVersion()2227 default HalVersion getHalVersion() { 2228 return HalVersion.UNKNOWN; 2229 } 2230 2231 /** 2232 * @param service indicate the service id to query. 2233 * @return the hal version of a specific service 2234 */ getHalVersion(@alService int service)2235 default HalVersion getHalVersion(@HalService int service) { 2236 return HalVersion.UNKNOWN; 2237 } 2238 2239 /** 2240 * Sets user selected subscription at Modem. 2241 * 2242 * @param slotId 2243 * Slot. 2244 * @param appIndex 2245 * Application index in the card. 2246 * @param subId 2247 * Indicates subscription 0 or subscription 1. 2248 * @param subStatus 2249 * Activation status, 1 = activate and 0 = deactivate. 2250 * @param result 2251 * Callback message contains the information of SUCCESS/FAILURE. 2252 */ 2253 // FIXME Update the doc and consider modifying the request to make more generic. 2254 @UnsupportedAppUsage setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, Message result)2255 public void setUiccSubscription(int slotId, int appIndex, int subId, int subStatus, 2256 Message result); 2257 2258 /** 2259 * Whether the device modem supports reporting the EID in either the slot or card status or 2260 * through ATR. 2261 * @return true if the modem supports EID. 2262 */ supportsEid()2263 default boolean supportsEid() { 2264 return false; 2265 } 2266 2267 /** 2268 * Tells the modem if data is allowed or not. 2269 * 2270 * @param allowed 2271 * true = allowed, false = not alowed 2272 * @param result 2273 * Callback message contains the information of SUCCESS/FAILURE. 2274 */ 2275 // FIXME We may need to pass AID and slotid also 2276 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) setDataAllowed(boolean allowed, Message result)2277 public void setDataAllowed(boolean allowed, Message result); 2278 2279 /** 2280 * Inform RIL that the device is shutting down 2281 * 2282 * @param result Callback message contains the information of SUCCESS/FAILURE 2283 */ 2284 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) requestShutdown(Message result)2285 public void requestShutdown(Message result); 2286 2287 /** 2288 * Set phone radio type and access technology. 2289 * 2290 * @param rc the phone radio capability defined in 2291 * RadioCapability. It's a input object used to transfer parameter to logic modem 2292 * 2293 * @param result Callback message. 2294 */ setRadioCapability(RadioCapability rc, Message result)2295 public void setRadioCapability(RadioCapability rc, Message result); 2296 2297 /** 2298 * Get phone radio capability 2299 * 2300 * @param result Callback message. 2301 */ getRadioCapability(Message result)2302 public void getRadioCapability(Message result); 2303 2304 /** 2305 * Registers the handler when phone radio capability is changed. 2306 * 2307 * @param h Handler for notification message. 2308 * @param what User-defined message code. 2309 * @param obj User object. 2310 */ registerForRadioCapabilityChanged(Handler h, int what, Object obj)2311 public void registerForRadioCapabilityChanged(Handler h, int what, Object obj); 2312 2313 /** 2314 * Unregister for notifications when phone radio capability is changed. 2315 * 2316 * @param h Handler to be removed from the registrant list. 2317 */ unregisterForRadioCapabilityChanged(Handler h)2318 public void unregisterForRadioCapabilityChanged(Handler h); 2319 2320 /** 2321 * Start LCE (Link Capacity Estimation) service with a desired reporting interval. 2322 * 2323 * @param reportIntervalMs 2324 * LCE info reporting interval (ms). 2325 * 2326 * @param result Callback message contains the current LCE status. 2327 * {byte status, int actualIntervalMs} 2328 */ startLceService(int reportIntervalMs, boolean pullMode, Message result)2329 public void startLceService(int reportIntervalMs, boolean pullMode, Message result); 2330 2331 /** 2332 * Stop LCE service. 2333 * 2334 * @param result Callback message contains the current LCE status: 2335 * {byte status, int actualIntervalMs} 2336 * 2337 */ stopLceService(Message result)2338 public void stopLceService(Message result); 2339 2340 /** 2341 * Pull LCE service for capacity data. 2342 * 2343 * @param result Callback message contains the capacity info: 2344 * {int capacityKbps, byte confidenceLevel, byte lceSuspendedTemporarily} 2345 */ pullLceData(Message result)2346 public void pullLceData(Message result); 2347 2348 /** 2349 * Register a LCE info listener. 2350 * 2351 * @param h Handler for notification message. 2352 * @param what User-defined message code. 2353 * @param obj User object. 2354 */ registerForLceInfo(Handler h, int what, Object obj)2355 void registerForLceInfo(Handler h, int what, Object obj); 2356 2357 /** 2358 * Unregister the LCE Info listener. 2359 * 2360 * @param h handle to be removed. 2361 */ unregisterForLceInfo(Handler h)2362 void unregisterForLceInfo(Handler h); 2363 2364 /** 2365 * 2366 * Get modem activity info and stats 2367 * 2368 * @param result Callback message contains the modem activity information 2369 * @param workSource calling WorkSource 2370 */ getModemActivityInfo(Message result, WorkSource workSource)2371 default void getModemActivityInfo(Message result, WorkSource workSource) {} 2372 2373 /** 2374 * Set allowed carriers 2375 * 2376 * @param carriers Allowed carriers 2377 * @param result Callback message contains the result of the operation 2378 * @param workSource calling WorkSource 2379 */ setAllowedCarriers(CarrierRestrictionRules carrierRestrictionRules, Message result, WorkSource workSource)2380 default void setAllowedCarriers(CarrierRestrictionRules carrierRestrictionRules, 2381 Message result, WorkSource workSource) {} 2382 2383 /** 2384 * Get allowed carriers 2385 * 2386 * @param result Callback message contains the allowed carriers 2387 * @param workSource calling WorkSource 2388 */ getAllowedCarriers(Message result, WorkSource workSource)2389 default void getAllowedCarriers(Message result, WorkSource workSource) {} 2390 2391 /** 2392 * Register for unsolicited PCO data. This information is carrier-specific, 2393 * opaque binary blobs destined for carrier apps for interpretation. 2394 * 2395 * @param h Handler for notification message. 2396 * @param what User-defined message code. 2397 * @param obj User object. 2398 */ registerForPcoData(Handler h, int what, Object obj)2399 public void registerForPcoData(Handler h, int what, Object obj); 2400 2401 /** 2402 * Unregister for PCO data. 2403 * 2404 * @param h handler to be removed 2405 */ unregisterForPcoData(Handler h)2406 public void unregisterForPcoData(Handler h); 2407 2408 /** 2409 * Register for modem reset indication. 2410 * 2411 * @param h Handler for the notification message 2412 * @param what User-defined message code 2413 * @param obj User object 2414 */ registerForModemReset(Handler h, int what, Object obj)2415 void registerForModemReset(Handler h, int what, Object obj); 2416 2417 /** 2418 * Unregister for modem reset 2419 * 2420 * @param h handler to be removed 2421 */ unregisterForModemReset(Handler h)2422 void unregisterForModemReset(Handler h); 2423 2424 /** 2425 * Send the updated device state 2426 * 2427 * @param stateType Device state type 2428 * @param state True if enabled, otherwise disabled 2429 * @param result callback message contains the information of SUCCESS/FAILURE 2430 */ sendDeviceState(int stateType, boolean state, Message result)2431 void sendDeviceState(int stateType, boolean state, Message result); 2432 2433 /** 2434 * Send the device state to the modem 2435 * 2436 * @param filter unsolicited response filter. See DeviceStateMonitor.UnsolicitedResponseFilter 2437 * @param result callback message contains the information of SUCCESS/FAILURE 2438 */ setUnsolResponseFilter(int filter, Message result)2439 void setUnsolResponseFilter(int filter, Message result); 2440 2441 /** 2442 * Sets or clears the signal strength reporting criteria for multiple RANs in one request. 2443 * 2444 * The reporting criteria are set individually for each combination of RAN and measurement type. 2445 * For each RAN type, if no reporting criteria are set, then the reporting of SignalStrength for 2446 * that RAN is implementation-defined. If any criteria are supplied for a RAN type, then 2447 * SignalStrength is only reported as specified by those criteria. For any RAN types not defined 2448 * by this HAL, reporting is implementation-defined. 2449 * 2450 * @param signalThresholdInfos Collection of SignalThresholdInfo specifying the reporting 2451 * criteria. See SignalThresholdInfo for details. 2452 * @param result callback message contains the information of SUCCESS/FAILURE 2453 */ setSignalStrengthReportingCriteria(@onNull List<SignalThresholdInfo> signalThresholdInfos, @Nullable Message result)2454 void setSignalStrengthReportingCriteria(@NonNull List<SignalThresholdInfo> signalThresholdInfos, 2455 @Nullable Message result); 2456 2457 /** 2458 * Send the link capacity reporting criteria to the modem 2459 * 2460 * @param hysteresisMs A hysteresis time in milliseconds. A value of 0 disables hysteresis. 2461 * @param hysteresisDlKbps An interval in kbps defining the required magnitude change between DL 2462 * reports. A value of 0 disables hysteresis. 2463 * @param hysteresisUlKbps An interval in kbps defining the required magnitude change between UL 2464 * reports. A value of 0 disables hysteresis. 2465 * @param thresholdsDlKbps An array of trigger thresholds in kbps for downlink reports. A size 2466 * of 0 disables thresholds. 2467 * @param thresholdsUlKbps An array of trigger thresholds in kbps for uplink reports. A size 2468 * of 0 disables thresholds. 2469 * @param ran RadioAccessNetwork for which to apply criteria. 2470 * @param result callback message contains the information of SUCCESS/FAILURE 2471 */ setLinkCapacityReportingCriteria(int hysteresisMs, int hysteresisDlKbps, int hysteresisUlKbps, int[] thresholdsDlKbps, int[] thresholdsUlKbps, int ran, Message result)2472 void setLinkCapacityReportingCriteria(int hysteresisMs, int hysteresisDlKbps, 2473 int hysteresisUlKbps, int[] thresholdsDlKbps, int[] thresholdsUlKbps, int ran, 2474 Message result); 2475 2476 /** 2477 * Set SIM card power up or down 2478 * 2479 * @param state State of SIM (power down, power up, pass through) 2480 * - {@link android.telephony.TelephonyManager#CARD_POWER_DOWN} 2481 * - {@link android.telephony.TelephonyManager#CARD_POWER_UP} 2482 * - {@link android.telephony.TelephonyManager#CARD_POWER_UP_PASS_THROUGH} 2483 * @param result callback message contains the information of SUCCESS/FAILURE 2484 * @param workSource calling WorkSource 2485 */ setSimCardPower(int state, Message result, WorkSource workSource)2486 default void setSimCardPower(int state, Message result, WorkSource workSource) {} 2487 2488 /** 2489 * Register for unsolicited Carrier Public Key. 2490 * 2491 * @param h Handler for notification message. 2492 * @param what User-defined message code. 2493 * @param obj User object. 2494 */ registerForCarrierInfoForImsiEncryption(Handler h, int what, Object obj)2495 void registerForCarrierInfoForImsiEncryption(Handler h, int what, Object obj); 2496 2497 /** 2498 * DeRegister for unsolicited Carrier Public Key. 2499 * 2500 * @param h Handler for notification message. 2501 */ unregisterForCarrierInfoForImsiEncryption(Handler h)2502 void unregisterForCarrierInfoForImsiEncryption(Handler h); 2503 2504 /** 2505 * Register for unsolicited Network Scan result. 2506 * 2507 * @param h Handler for notification message. 2508 * @param what User-defined message code. 2509 * @param obj User object. 2510 */ registerForNetworkScanResult(Handler h, int what, Object obj)2511 void registerForNetworkScanResult(Handler h, int what, Object obj); 2512 2513 /** 2514 * DeRegister for unsolicited Network Scan result. 2515 * 2516 * @param h Handler for notification message. 2517 */ unregisterForNetworkScanResult(Handler h)2518 void unregisterForNetworkScanResult(Handler h); 2519 2520 /** 2521 * Register for unsolicited NATT Keepalive Status Indications 2522 * 2523 * @param h Handler for notification message. 2524 * @param what User-defined message code. 2525 * @param obj User object. 2526 */ registerForNattKeepaliveStatus(Handler h, int what, Object obj)2527 void registerForNattKeepaliveStatus(Handler h, int what, Object obj); 2528 2529 /** 2530 * Deregister for unsolicited NATT Keepalive Status Indications. 2531 * 2532 * @param h Handler for notification message. 2533 */ unregisterForNattKeepaliveStatus(Handler h)2534 void unregisterForNattKeepaliveStatus(Handler h); 2535 2536 /** 2537 * Register for unsolicited Emergency Number List Indications 2538 * 2539 * @param h Handler for notification message. 2540 * @param what User-defined message code. 2541 * @param obj User object. 2542 */ registerForEmergencyNumberList(Handler h, int what, Object obj)2543 void registerForEmergencyNumberList(Handler h, int what, Object obj); 2544 2545 /** 2546 * Deregister for unsolicited Emergency Number List Indications 2547 * 2548 * @param h Handler for notification message. 2549 */ unregisterForEmergencyNumberList(Handler h)2550 void unregisterForEmergencyNumberList(Handler h); 2551 2552 /** 2553 * Start sending NATT Keepalive packets on a specified data connection 2554 * 2555 * @param contextId cid that identifies the data connection for this keepalive 2556 * @param packetData the keepalive packet data description 2557 * @param intervalMillis a time interval in ms between keepalive packet transmissions 2558 * @param result a Message to return to the requester 2559 */ startNattKeepalive( int contextId, KeepalivePacketData packetData, int intervalMillis, Message result)2560 void startNattKeepalive( 2561 int contextId, KeepalivePacketData packetData, int intervalMillis, Message result); 2562 2563 /** 2564 * Stop sending NATT Keepalive packets on a specified data connection 2565 * 2566 * @param sessionHandle the keepalive session handle (from the modem) to stop 2567 * @param result a Message to return to the requester 2568 */ stopNattKeepalive(int sessionHandle, Message result)2569 void stopNattKeepalive(int sessionHandle, Message result); 2570 2571 /** 2572 * Enable or disable the logical modem. 2573 * 2574 * @param enable whether to enable or disable the modem 2575 * @param result a Message to return to the requester 2576 */ enableModem(boolean enable, Message result)2577 default void enableModem(boolean enable, Message result) {}; 2578 2579 /** 2580 * Notify CommandsInterface that whether its corresponding slot is active or not. If not, 2581 * it means it has no RIL service or logical modem to connect to. 2582 * 2583 * @param active whether there's a matching active SIM slot. 2584 */ onSlotActiveStatusChange(boolean active)2585 default void onSlotActiveStatusChange(boolean active) {} 2586 2587 /** 2588 * Query whether logical modem is enabled or disabled 2589 * 2590 * @param result a Message to return to the requester 2591 */ getModemStatus(Message result)2592 default void getModemStatus(Message result) {}; 2593 2594 /** 2595 * Enable or disable uicc applications on the SIM. 2596 * 2597 * @param enable enable or disable UiccApplications on the SIM. 2598 * @param onCompleteMessage a Message to return to the requester 2599 */ enableUiccApplications(boolean enable, Message onCompleteMessage)2600 default void enableUiccApplications(boolean enable, Message onCompleteMessage) {} 2601 2602 /** 2603 * Specify which bands modem's background scan must act on. 2604 * If {@code specifiers} is non-empty, the scan will be restricted to the bands specified. 2605 * Otherwise, it scans all bands. 2606 * 2607 * For example, CBRS is only on LTE band 48. By specifying this band, 2608 * modem saves more power. 2609 * 2610 * @param specifiers which bands to scan. 2611 * @param onComplete a message to send when complete. 2612 */ setSystemSelectionChannels(@onNull List<RadioAccessSpecifier> specifiers, Message onComplete)2613 default void setSystemSelectionChannels(@NonNull List<RadioAccessSpecifier> specifiers, 2614 Message onComplete) {} 2615 2616 /** 2617 * Get which bands the modem's background scan is acting on. 2618 * 2619 * @param onComplete a message to send when complete. 2620 */ getSystemSelectionChannels(Message onComplete)2621 default void getSystemSelectionChannels(Message onComplete) {} 2622 2623 /** 2624 * Whether uicc applications are enabled or not. 2625 * 2626 * @param onCompleteMessage a Message to return to the requester 2627 */ areUiccApplicationsEnabled(Message onCompleteMessage)2628 default void areUiccApplicationsEnabled(Message onCompleteMessage) {} 2629 2630 /** 2631 * Whether {@link #enableUiccApplications} is supported, based on IRadio version. 2632 */ canToggleUiccApplicationsEnablement()2633 default boolean canToggleUiccApplicationsEnablement() { 2634 return false; 2635 } 2636 getClientRequestStats()2637 default List<ClientRequestStats> getClientRequestStats() { 2638 return null; 2639 } 2640 2641 /** 2642 * Registers the handler for RIL_UNSOL_BARRING_INFO_CHANGED events. 2643 * 2644 * @param h Handler for notification message. 2645 * @param what User-defined message code. 2646 * @param obj User object. 2647 */ registerForBarringInfoChanged(Handler h, int what, Object obj)2648 default void registerForBarringInfoChanged(Handler h, int what, Object obj) {}; 2649 2650 /** 2651 * Unregisters the handler for RIL_UNSOL_BARRING_INFO_CHANGED events. 2652 * 2653 * @param h Handler for notification message. 2654 */ unregisterForBarringInfoChanged(Handler h)2655 default void unregisterForBarringInfoChanged(Handler h) {}; 2656 2657 /** 2658 * Get all the barring info for the current camped cell applicable to the current user. 2659 * 2660 * AsyncResult.result is the object of {@link android.telephony.BarringInfo}. 2661 * 2662 * @param result Message will be sent back to handler and result.obj will be the AsycResult. 2663 */ getBarringInfo(Message result)2664 default void getBarringInfo(Message result) {}; 2665 2666 /** 2667 * Returns the last barring information received. 2668 * 2669 * @return the last barring information. 2670 */ getLastBarringInfo()2671 default @Nullable BarringInfo getLastBarringInfo() { 2672 return null; 2673 }; 2674 2675 /** 2676 * Allocates a pdu session id 2677 * 2678 * AsyncResult.result is the allocated pdu session id 2679 * 2680 * @param result Message will be sent back to handler and result.obj will be the AsycResult. 2681 * 2682 */ allocatePduSessionId(Message result)2683 default void allocatePduSessionId(Message result) {}; 2684 2685 /** 2686 * Release the pdu session id 2687 * 2688 * @param result Message that will be sent back to handler. 2689 * @param pduSessionId The id that was allocated and should now be released. 2690 * 2691 */ releasePduSessionId(Message result, int pduSessionId)2692 default void releasePduSessionId(Message result, int pduSessionId) {}; 2693 2694 /** 2695 * Indicates that a handover has started 2696 * 2697 * @param result Message that will be sent back to handler. 2698 * @param callId Identifier associated with the data call 2699 */ startHandover(Message result, int callId)2700 default void startHandover(Message result, int callId) {}; 2701 2702 /** 2703 * Indicates that a handover has been cancelled 2704 * 2705 * @param result Message that will be sent back to handler. 2706 * @param callId Identifier associated with the data call 2707 */ cancelHandover(Message result, int callId)2708 default void cancelHandover(Message result, int callId) {}; 2709 2710 /** 2711 * Control the data throttling at modem. 2712 * 2713 * @param result Message that will be sent back to the requester 2714 * @param workSource calling Worksource 2715 * @param dataThrottlingAction the DataThrottlingAction that is being requested. 2716 * Defined in android.hardware.radio@1.6.types. 2717 * @param completionWindowMillis milliseconds in which data throttling action has to be 2718 * achieved. 2719 */ setDataThrottling(Message result, WorkSource workSource, int dataThrottlingAction, long completionWindowMillis)2720 default void setDataThrottling(Message result, WorkSource workSource, 2721 int dataThrottlingAction, long completionWindowMillis) {}; 2722 2723 /** 2724 * Request to get the current slicing configuration including URSP rules and 2725 * NSSAIs (configured, allowed and rejected). 2726 * 2727 * @param result Message that will be sent back to handler. 2728 */ getSlicingConfig(Message result)2729 default void getSlicingConfig(Message result) {}; 2730 2731 /** 2732 * Request to enable/disable the mock modem service. 2733 * This is used in shell commands during CTS testing only. 2734 * 2735 * @param serviceName the service name which telephony wants to bind to 2736 */ setModemService(String serviceName)2737 default boolean setModemService(String serviceName) { 2738 return true; 2739 }; 2740 2741 /** 2742 * Return the class name of the currently bound modem service. 2743 * 2744 * @return the class name of the modem service. 2745 */ getModemService()2746 default String getModemService() { 2747 return "default"; 2748 }; 2749 2750 /** 2751 * Request the SIM phonebook records of all activated UICC applications 2752 * 2753 * @param result Callback message containing the count of ADN valid record. 2754 */ getSimPhonebookRecords(Message result)2755 public void getSimPhonebookRecords(Message result); 2756 2757 /** 2758 * Request the SIM phonebook Capacity of all activated UICC applications 2759 * 2760 */ getSimPhonebookCapacity(Message result)2761 public void getSimPhonebookCapacity(Message result); 2762 2763 /** 2764 * Request to insert/delete/update the SIM phonebook record 2765 * 2766 * @param phonebookRecordInfo adn record information to be updated 2767 * @param result Callback message containing the SIM phonebook record index. 2768 */ updateSimPhonebookRecord(SimPhonebookRecord phonebookRecordInfo, Message result)2769 public void updateSimPhonebookRecord(SimPhonebookRecord phonebookRecordInfo, Message result); 2770 2771 /** 2772 * Registers the handler when the SIM phonebook is changed. 2773 * 2774 * @param h Handler for notification message. 2775 * @param what User-defined message code. 2776 * @param obj User object . 2777 */ registerForSimPhonebookChanged(Handler h, int what, Object obj)2778 public void registerForSimPhonebookChanged(Handler h, int what, Object obj); 2779 2780 /** 2781 * Unregister for notifications when SIM phonebook has already init done. 2782 * 2783 * @param h Handler to be removed from the registrant list. 2784 */ unregisterForSimPhonebookChanged(Handler h)2785 public void unregisterForSimPhonebookChanged(Handler h); 2786 2787 /** 2788 * Registers the handler when a group of SIM phonebook records received. 2789 * 2790 * @param h Handler for notification message. 2791 * @param what User-defined message code. 2792 * @param obj User object. 2793 */ registerForSimPhonebookRecordsReceived(Handler h, int what, Object obj)2794 public void registerForSimPhonebookRecordsReceived(Handler h, int what, Object obj); 2795 2796 /** 2797 * Unregister for notifications when a group of SIM phonebook records received. 2798 * 2799 * @param h Handler to be removed from the registrant list. 2800 */ unregisterForSimPhonebookRecordsReceived(Handler h)2801 public void unregisterForSimPhonebookRecordsReceived(Handler h); 2802 2803 /** 2804 * Registers for notifications of connection setup failure. 2805 * 2806 * @param h Handler for notification message. 2807 * @param what User-defined message code. 2808 * @param obj User object. 2809 */ registerForConnectionSetupFailure(Handler h, int what, Object obj)2810 default void registerForConnectionSetupFailure(Handler h, int what, Object obj) {} 2811 2812 /** 2813 * Unregisters for notifications of connection setup failure. 2814 * 2815 * @param h Handler to be removed from the registrant list. 2816 */ unregisterForConnectionSetupFailure(Handler h)2817 default void unregisterForConnectionSetupFailure(Handler h) {} 2818 2819 /** 2820 * Registers for notifications when ANBR is received form the network. 2821 * 2822 * @param h Handler for notification message. 2823 * @param what User-defined message code. 2824 * @param obj User object. 2825 */ registerForNotifyAnbr(Handler h, int what, Object obj)2826 default void registerForNotifyAnbr(Handler h, int what, Object obj) {} 2827 2828 /** 2829 * Unregisters for notifications when ANBR is received form the network. 2830 * 2831 * @param h Handler to be removed from the registrant list. 2832 */ unregisterForNotifyAnbr(Handler h)2833 default void unregisterForNotifyAnbr(Handler h) {} 2834 2835 /** 2836 * Registers for IMS deregistration trigger from modem. 2837 * 2838 * @param h Handler for notification message. 2839 * @param what User-defined message code. 2840 * @param obj User object. 2841 */ registerForTriggerImsDeregistration(Handler h, int what, Object obj)2842 default void registerForTriggerImsDeregistration(Handler h, int what, Object obj) {} 2843 2844 /** 2845 * Unregisters for IMS deregistration trigger from modem. 2846 * 2847 * @param h Handler to be removed from the registrant list. 2848 */ unregisterForTriggerImsDeregistration(Handler h)2849 default void unregisterForTriggerImsDeregistration(Handler h) {} 2850 2851 /** 2852 * Set the UE's usage setting. 2853 * 2854 * @param result Callback message containing the success or failure status. 2855 * @param usageSetting the UE's usage setting, either VOICE_CENTRIC or DATA_CENTRIC. 2856 */ setUsageSetting(Message result, int usageSetting)2857 default void setUsageSetting(Message result, 2858 /* @TelephonyManager.UsageSetting */ int usageSetting) {} 2859 2860 /** 2861 * Get the UE's usage setting. 2862 * 2863 * @param result Callback message containing the usage setting (or a failure status). 2864 */ getUsageSetting(Message result)2865 default void getUsageSetting(Message result) {} 2866 2867 /** 2868 * Sets the emergency mode. 2869 * 2870 * @param emcMode Defines the radio emergency mode type. 2871 * @param result Callback message containing the success or failure status. 2872 */ setEmergencyMode(@mergencyConstants.EmergencyMode int emcMode, @Nullable Message result)2873 default void setEmergencyMode(@EmergencyConstants.EmergencyMode int emcMode, 2874 @Nullable Message result) {} 2875 2876 /** 2877 * Triggers an emergency network scan. 2878 * 2879 * @param accessNetwork Contains the list of access network types to be prioritized 2880 * during emergency scan. The 1st entry has the highest priority. 2881 * @param scanType Indicates the type of scans to be performed i.e. limited scan, 2882 * full service scan or both. 2883 * @param result Callback message containing the success or failure status. 2884 */ triggerEmergencyNetworkScan( @onNull @ccessNetworkConstants.RadioAccessNetworkType int[] accessNetwork, @DomainSelectionService.EmergencyScanType int scanType, @Nullable Message result)2885 default void triggerEmergencyNetworkScan( 2886 @NonNull @AccessNetworkConstants.RadioAccessNetworkType int[] accessNetwork, 2887 @DomainSelectionService.EmergencyScanType int scanType, @Nullable Message result) {} 2888 2889 /** 2890 * Cancels ongoing emergency network scan. 2891 * 2892 * @param resetScan Indicates how the next {@link #triggerEmergencyNetworkScan} should work. 2893 * If {@code true}, then the modem shall start the new scan from the beginning, 2894 * otherwise the modem shall resume from the last search. 2895 * @param result Callback message containing the success or failure status. 2896 */ cancelEmergencyNetworkScan(boolean resetScan, @Nullable Message result)2897 default void cancelEmergencyNetworkScan(boolean resetScan, @Nullable Message result) {} 2898 2899 /** 2900 * Exits ongoing emergency mode. 2901 * 2902 * @param result Callback message containing the success or failure status. 2903 */ exitEmergencyMode(@ullable Message result)2904 default void exitEmergencyMode(@Nullable Message result) {} 2905 2906 /** 2907 * Registers for emergency network scan result. 2908 * 2909 * @param h Handler for notification message. 2910 * @param what User-defined message code. 2911 * @param obj User object. 2912 */ registerForEmergencyNetworkScan(@onNull Handler h, int what, @Nullable Object obj)2913 default void registerForEmergencyNetworkScan(@NonNull Handler h, 2914 int what, @Nullable Object obj) {} 2915 2916 /** 2917 * Unregisters for emergency network scan result. 2918 * 2919 * @param h Handler to be removed from the registrant list. 2920 */ unregisterForEmergencyNetworkScan(@onNull Handler h)2921 default void unregisterForEmergencyNetworkScan(@NonNull Handler h) {} 2922 2923 /** 2924 * Provides a list of SRVCC call information to radio 2925 * 2926 * @param srvccConnections the list of connections. 2927 */ setSrvccCallInfo(SrvccConnection[] srvccConnections, Message result)2928 default void setSrvccCallInfo(SrvccConnection[] srvccConnections, Message result) {} 2929 2930 /** 2931 * Updates the IMS registration information to the radio. 2932 * 2933 * @param state The current IMS registration state. 2934 * @param imsRadioTech The type of underlying radio access network used. 2935 * @param suggestedAction The suggested action for the radio to perform. 2936 * @param capabilities IMS capabilities such as VOICE, VIDEO and SMS. 2937 */ updateImsRegistrationInfo(int state, @ImsRegistrationImplBase.ImsRegistrationTech int imsRadioTech, @RegistrationManager.SuggestedAction int suggestedAction, int capabilities, Message result)2938 default void updateImsRegistrationInfo(int state, 2939 @ImsRegistrationImplBase.ImsRegistrationTech int imsRadioTech, 2940 @RegistrationManager.SuggestedAction int suggestedAction, 2941 int capabilities, Message result) {} 2942 2943 /** 2944 * Notifies the NAS and RRC layers of the radio the type of upcoming IMS traffic. 2945 * 2946 * @param token A nonce to identify the request. 2947 * @param trafficType IMS traffic type like registration, voice, video, SMS, emergency, and etc. 2948 * @param accessNetworkType The type of underlying radio access network used. 2949 * @param trafficDirection Indicates whether traffic is originated by mobile originated or 2950 * mobile terminated use case eg. MO/MT call/SMS etc. 2951 */ startImsTraffic(int token, @MmTelFeature.ImsTrafficType int trafficType, @AccessNetworkConstants.RadioAccessNetworkType int accessNetworkType, @MmTelFeature.ImsTrafficDirection int trafficDirection, Message result)2952 default void startImsTraffic(int token, 2953 @MmTelFeature.ImsTrafficType int trafficType, 2954 @AccessNetworkConstants.RadioAccessNetworkType int accessNetworkType, 2955 @MmTelFeature.ImsTrafficDirection int trafficDirection, 2956 Message result) {} 2957 2958 /** 2959 * Notifies IMS traffic has been stopped. 2960 * 2961 * @param token The token assigned by startImsTraffic. 2962 */ stopImsTraffic(int token, Message result)2963 default void stopImsTraffic(int token, Message result) {} 2964 2965 /** 2966 * Triggers the UE initiated EPS fallback procedure. 2967 * 2968 * @param reason Specifies the reason for EPS fallback. 2969 */ triggerEpsFallback(int reason, Message result)2970 default void triggerEpsFallback(int reason, Message result) {} 2971 2972 /** 2973 * Triggers radio to send ANBRQ message to the network. 2974 * 2975 * @param mediaType Media type is used to identify media stream such as audio or video. 2976 * @param direction Direction of this packet stream (e.g. uplink or downlink). 2977 * @param bitsPerSecond The bit rate requested by the opponent UE. 2978 * @param result Callback message to receive the result. 2979 */ sendAnbrQuery(int mediaType, int direction, int bitsPerSecond, Message result)2980 default void sendAnbrQuery(int mediaType, int direction, int bitsPerSecond, Message result) {} 2981 2982 /** 2983 * Set the UE's ability to accept/reject null ciphered and/or null integrity-protected 2984 * connections. 2985 * 2986 * @param enabled true to allow null ciphered and/or null integrity-protected connections, 2987 * false to disallow. 2988 * @param result Callback message containing the success or failure status. 2989 */ setNullCipherAndIntegrityEnabled(boolean enabled, Message result)2990 default void setNullCipherAndIntegrityEnabled(boolean enabled, Message result) {} 2991 2992 /** 2993 * Check whether null ciphering and/or null integrity-protected connections are allowed. 2994 * 2995 * @param result Callback message containing the success or failure status. 2996 */ isNullCipherAndIntegrityEnabled(Message result)2997 default void isNullCipherAndIntegrityEnabled(Message result) {} 2998 2999 /** 3000 * Notifies the IMS call status to the modem. 3001 * 3002 * @param imsCallInfo The list of {@link ImsCallInfo}. 3003 * @param result A callback to receive the response. 3004 */ updateImsCallStatus(@onNull List<ImsCallInfo> imsCallInfo, Message result)3005 default void updateImsCallStatus(@NonNull List<ImsCallInfo> imsCallInfo, Message result) {} 3006 3007 /** 3008 * Enables or disables N1 mode (access to 5G core network) in accordance with 3009 * 3GPP TS 24.501 4.9. 3010 * @param enable {@code true} to enable N1 mode, {@code false} to disable N1 mode. 3011 * @param result Callback message to receive the result. 3012 */ setN1ModeEnabled(boolean enable, Message result)3013 default void setN1ModeEnabled(boolean enable, Message result) {} 3014 3015 /** 3016 * Check whether N1 mode (access to 5G core network) is enabled or not. 3017 * @param result Callback message to receive the result. 3018 */ isN1ModeEnabled(Message result)3019 default void isN1ModeEnabled(Message result) {} 3020 3021 /** 3022 * Get feature capabilities supported by satellite. 3023 * 3024 * @param result Message that will be sent back to the requester 3025 */ getSatelliteCapabilities(Message result)3026 default void getSatelliteCapabilities(Message result) {} 3027 3028 /** 3029 * Turn satellite modem on/off. 3030 * 3031 * @param result Message that will be sent back to the requester 3032 * @param on {@code true} for turning on. 3033 * {@code false} for turning off. 3034 */ setSatellitePower(Message result, boolean on)3035 default void setSatellitePower(Message result, boolean on) {} 3036 3037 /** 3038 * Get satellite modem state. 3039 * 3040 * @param result Message that will be sent back to the requester 3041 */ getSatellitePowerState(Message result)3042 default void getSatellitePowerState(Message result) {} 3043 3044 /** 3045 * Get satellite provision state. 3046 * 3047 * @param result Message that will be sent back to the requester 3048 */ getSatelliteProvisionState(Message result)3049 default void getSatelliteProvisionState(Message result) {} 3050 3051 /** 3052 * Check whether satellite modem is supported by the device. 3053 * 3054 * @param result Message that will be sent back to the requester 3055 */ isSatelliteSupported(Message result)3056 default void isSatelliteSupported(Message result) {} 3057 3058 /** 3059 * Provision the subscription with a satellite provider. This is needed to register the 3060 * subscription if the provider allows dynamic registration. 3061 * 3062 * @param result Message that will be sent back to the requester. 3063 * @param imei IMEI of the SIM associated with the satellite modem. 3064 * @param msisdn MSISDN of the SIM associated with the satellite modem. 3065 * @param imsi IMSI of the SIM associated with the satellite modem. 3066 * @param features List of features to be provisioned. 3067 */ provisionSatelliteService( Message result, String imei, String msisdn, String imsi, int[] features)3068 default void provisionSatelliteService( 3069 Message result, String imei, String msisdn, String imsi, int[] features) {} 3070 3071 /** 3072 * Add contacts that are allowed to be used for satellite communication. This is applicable for 3073 * incoming messages as well. 3074 * 3075 * @param result Message that will be sent back to the requester. 3076 * @param contacts List of allowed contacts to be added. 3077 */ addAllowedSatelliteContacts(Message result, String[] contacts)3078 default void addAllowedSatelliteContacts(Message result, String[] contacts) {} 3079 3080 /** 3081 * Remove contacts that are allowed to be used for satellite communication. This is applicable 3082 * for incoming messages as well. 3083 * 3084 * @param result Message that will be sent back to the requester. 3085 * @param contacts List of allowed contacts to be removed. 3086 */ removeAllowedSatelliteContacts(Message result, String[] contacts)3087 default void removeAllowedSatelliteContacts(Message result, String[] contacts) {} 3088 3089 /** 3090 * Send text messages. 3091 * 3092 * @param result Message that will be sent back to the requester. 3093 * @param messages List of messages in text format to be sent. 3094 * @param destination The recipient of the message. 3095 * @param latitude The current latitude of the device. 3096 * @param longitude The current longitude of the device. The location (i.e., latitude and 3097 * longitude) of the device will be filled for emergency messages. 3098 */ sendSatelliteMessages(Message result, String[] messages, String destination, double latitude, double longitude)3099 default void sendSatelliteMessages(Message result, String[] messages, String destination, 3100 double latitude, double longitude) {} 3101 3102 /** 3103 * Get pending messages. 3104 * 3105 * @param result Message that will be sent back to the requester. 3106 */ getPendingSatelliteMessages(Message result)3107 default void getPendingSatelliteMessages(Message result) {} 3108 3109 /** 3110 * Get current satellite registration mode. 3111 * 3112 * @param result Message that will be sent back to the requester. 3113 */ getSatelliteMode(Message result)3114 default void getSatelliteMode(Message result) {} 3115 3116 /** 3117 * Set the filter for what type of indication framework want to receive from modem. 3118 * 3119 * @param result Message that will be sent back to the requester. 3120 * @param filterBitmask The filter bitmask identifying what type of indication Telephony 3121 * framework wants to receive from modem. 3122 */ setSatelliteIndicationFilter(Message result, int filterBitmask)3123 default void setSatelliteIndicationFilter(Message result, int filterBitmask) {} 3124 3125 /** 3126 * User started pointing to the satellite. Modem should continue to update the ponting input 3127 * as user moves device. 3128 * 3129 * @param result Message that will be sent back to the requester. 3130 */ startSendingSatellitePointingInfo(Message result)3131 default void startSendingSatellitePointingInfo(Message result) {} 3132 3133 /** 3134 * Stop sending satellite pointing info to the framework. 3135 * 3136 * @param result Message that will be sent back to the requester. 3137 */ stopSendingSatellitePointingInfo(Message result)3138 default void stopSendingSatellitePointingInfo(Message result) {} 3139 3140 /** 3141 * Get max number of characters per text message. 3142 * 3143 * @param result Message that will be sent back to the requester. 3144 */ getMaxCharactersPerSatelliteTextMessage(Message result)3145 default void getMaxCharactersPerSatelliteTextMessage(Message result) {} 3146 3147 /** 3148 * Get whether satellite communication is allowed for the current location. 3149 * 3150 * @param result Message that will be sent back to the requester. 3151 */ isSatelliteCommunicationAllowedForCurrentLocation(Message result)3152 default void isSatelliteCommunicationAllowedForCurrentLocation(Message result) {} 3153 3154 /** 3155 * Get the time after which the satellite will be visible. 3156 * 3157 * @param result Message that will be sent back to the requester. 3158 */ getTimeForNextSatelliteVisibility(Message result)3159 default void getTimeForNextSatelliteVisibility(Message result) {} 3160 3161 /** 3162 * Registers for pending message count from satellite modem. 3163 * 3164 * @param h Handler for notification message. 3165 * @param what User-defined message code. 3166 * @param obj User object. 3167 */ registerForPendingSatelliteMessageCount(@onNull Handler h, int what, @Nullable Object obj)3168 default void registerForPendingSatelliteMessageCount(@NonNull Handler h, 3169 int what, @Nullable Object obj) {} 3170 3171 /** 3172 * Unregisters for pending message count from satellite modem. 3173 * 3174 * @param h Handler to be removed from the registrant list. 3175 */ unregisterForPendingSatelliteMessageCount(@onNull Handler h)3176 default void unregisterForPendingSatelliteMessageCount(@NonNull Handler h) {} 3177 3178 /** 3179 * Registers for new messages from satellite modem. 3180 * 3181 * @param h Handler for notification message. 3182 * @param what User-defined message code. 3183 * @param obj User object. 3184 */ registerForNewSatelliteMessages(@onNull Handler h, int what, @Nullable Object obj)3185 default void registerForNewSatelliteMessages(@NonNull Handler h, 3186 int what, @Nullable Object obj) {} 3187 3188 /** 3189 * Unregisters for new messages from satellite modem. 3190 * 3191 * @param h Handler to be removed from the registrant list. 3192 */ unregisterForNewSatelliteMessages(@onNull Handler h)3193 default void unregisterForNewSatelliteMessages(@NonNull Handler h) {} 3194 3195 /** 3196 * Registers for messages transfer complete from satellite modem. 3197 * 3198 * @param h Handler for notification message. 3199 * @param what User-defined message code. 3200 * @param obj User object. 3201 */ registerForSatelliteMessagesTransferComplete(@onNull Handler h, int what, @Nullable Object obj)3202 default void registerForSatelliteMessagesTransferComplete(@NonNull Handler h, 3203 int what, @Nullable Object obj) {} 3204 3205 /** 3206 * Unregisters for messages transfer complete from satellite modem. 3207 * 3208 * @param h Handler to be removed from the registrant list. 3209 */ unregisterForSatelliteMessagesTransferComplete(@onNull Handler h)3210 default void unregisterForSatelliteMessagesTransferComplete(@NonNull Handler h) {} 3211 3212 /** 3213 * Registers for pointing info changed from satellite modem. 3214 * 3215 * @param h Handler for notification message. 3216 * @param what User-defined message code. 3217 * @param obj User object. 3218 */ registerForSatellitePointingInfoChanged(@onNull Handler h, int what, @Nullable Object obj)3219 default void registerForSatellitePointingInfoChanged(@NonNull Handler h, 3220 int what, @Nullable Object obj) {} 3221 3222 /** 3223 * Unregisters for pointing info changed from satellite modem. 3224 * 3225 * @param h Handler to be removed from the registrant list. 3226 */ unregisterForSatellitePointingInfoChanged(@onNull Handler h)3227 default void unregisterForSatellitePointingInfoChanged(@NonNull Handler h) {} 3228 3229 /** 3230 * Registers for mode changed from satellite modem. 3231 * 3232 * @param h Handler for notification message. 3233 * @param what User-defined message code. 3234 * @param obj User object. 3235 */ registerForSatelliteModeChanged(@onNull Handler h, int what, @Nullable Object obj)3236 default void registerForSatelliteModeChanged(@NonNull Handler h, 3237 int what, @Nullable Object obj) {} 3238 3239 /** 3240 * Unregisters for mode changed from satellite modem. 3241 * 3242 * @param h Handler to be removed from the registrant list. 3243 */ unregisterForSatelliteModeChanged(@onNull Handler h)3244 default void unregisterForSatelliteModeChanged(@NonNull Handler h) {} 3245 3246 /** 3247 * Registers for radio technology changed from satellite modem. 3248 * 3249 * @param h Handler for notification message. 3250 * @param what User-defined message code. 3251 * @param obj User object. 3252 */ registerForSatelliteRadioTechnologyChanged(@onNull Handler h, int what, @Nullable Object obj)3253 default void registerForSatelliteRadioTechnologyChanged(@NonNull Handler h, 3254 int what, @Nullable Object obj) {} 3255 3256 /** 3257 * Unregisters for radio technology changed from satellite modem. 3258 * 3259 * @param h Handler to be removed from the registrant list. 3260 */ unregisterForSatelliteRadioTechnologyChanged(@onNull Handler h)3261 default void unregisterForSatelliteRadioTechnologyChanged(@NonNull Handler h) {} 3262 3263 /** 3264 * Registers for provision state changed from satellite modem. 3265 * 3266 * @param h Handler for notification message. 3267 * @param what User-defined message code. 3268 * @param obj User object. 3269 */ registerForSatelliteProvisionStateChanged(@onNull Handler h, int what, @Nullable Object obj)3270 default void registerForSatelliteProvisionStateChanged(@NonNull Handler h, 3271 int what, @Nullable Object obj) {} 3272 3273 /** 3274 * Unregisters for provision state changed from satellite modem. 3275 * 3276 * @param h Handler to be removed from the registrant list. 3277 */ unregisterForSatelliteProvisionStateChanged(@onNull Handler h)3278 default void unregisterForSatelliteProvisionStateChanged(@NonNull Handler h) {} 3279 } 3280