1 /* 2 * Copyright (C) 2007 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.app.PendingIntent; 20 import android.content.ComponentName; 21 import android.content.Intent; 22 import android.content.IntentSender; 23 import android.os.Bundle; 24 import android.os.ICancellationSignal; 25 import android.os.IBinder; 26 import android.os.Messenger; 27 import android.os.ParcelFileDescriptor; 28 import android.os.ResultReceiver; 29 import android.os.WorkSource; 30 import android.net.NetworkStats; 31 import android.net.Uri; 32 import android.service.carrier.CarrierIdentifier; 33 import android.telecom.PhoneAccount; 34 import android.telecom.PhoneAccountHandle; 35 import android.telephony.CallForwardingInfo; 36 import android.telephony.CarrierRestrictionRules; 37 import android.telephony.CellIdentity; 38 import android.telephony.CellInfo; 39 import android.telephony.CellBroadcastIdRange; 40 import android.telephony.ClientRequestStats; 41 import android.telephony.ThermalMitigationRequest; 42 import android.telephony.gba.UaSecurityProtocolIdentifier; 43 import android.telephony.IBootstrapAuthenticationCallback; 44 import android.telephony.IccOpenLogicalChannelResponse; 45 import android.telephony.ICellInfoCallback; 46 import android.telephony.ModemActivityInfo; 47 import android.telephony.NeighboringCellInfo; 48 import android.telephony.NetworkScanRequest; 49 import android.telephony.PhoneCapability; 50 import android.telephony.PhoneNumberRange; 51 import android.telephony.RadioAccessFamily; 52 import android.telephony.RadioAccessSpecifier; 53 import android.telephony.ServiceState; 54 import android.telephony.SignalStrength; 55 import android.telephony.SignalStrengthUpdateRequest; 56 import android.telephony.TelephonyHistogram; 57 import android.telephony.VisualVoicemailSmsFilterSettings; 58 import android.telephony.emergency.EmergencyNumber; 59 import android.telephony.ims.RcsClientConfiguration; 60 import android.telephony.ims.RcsContactUceCapability; 61 import android.telephony.ims.aidl.IFeatureProvisioningCallback; 62 import android.telephony.ims.aidl.IImsCapabilityCallback; 63 import android.telephony.ims.aidl.IImsConfig; 64 import android.telephony.ims.aidl.IImsConfigCallback; 65 import android.telephony.ims.aidl.IImsMmTelFeature; 66 import android.telephony.ims.aidl.IImsRcsFeature; 67 import android.telephony.ims.aidl.IImsRegistration; 68 import android.telephony.ims.aidl.IImsRegistrationCallback; 69 import android.telephony.ims.aidl.IRcsConfigCallback; 70 import android.telephony.satellite.INtnSignalStrengthCallback; 71 import android.telephony.satellite.ISatelliteCapabilitiesCallback; 72 import android.telephony.satellite.ISatelliteCommunicationAccessStateCallback; 73 import android.telephony.satellite.ISatelliteDatagramCallback; 74 import android.telephony.satellite.ISatelliteDisallowedReasonsCallback; 75 import android.telephony.satellite.ISatelliteTransmissionUpdateCallback; 76 import android.telephony.satellite.ISatelliteProvisionStateCallback; 77 import android.telephony.satellite.ISatelliteModemStateCallback; 78 import android.telephony.satellite.ISelectedNbIotSatelliteSubscriptionCallback; 79 import android.telephony.satellite.NtnSignalStrength; 80 import android.telephony.satellite.SatelliteCapabilities; 81 import android.telephony.satellite.SatelliteDatagram; 82 import android.telephony.satellite.SatelliteSubscriberInfo; 83 import com.android.ims.internal.IImsServiceFeatureCallback; 84 import com.android.internal.telephony.CellNetworkScanResult; 85 import com.android.internal.telephony.IBooleanConsumer; 86 import com.android.internal.telephony.ICallForwardingInfoCallback; 87 import com.android.internal.telephony.IccLogicalChannelRequest; 88 import com.android.internal.telephony.IImsStateCallback; 89 import com.android.internal.telephony.IIntegerConsumer; 90 import com.android.internal.telephony.INumberVerificationCallback; 91 import com.android.internal.telephony.OperatorInfo; 92 93 import java.util.List; 94 import java.util.Map; 95 96 import android.telephony.UiccCardInfo; 97 import android.telephony.UiccSlotInfo; 98 import android.telephony.UiccSlotMapping; 99 100 /** 101 * Interface used to interact with the phone. Mostly this is used by the 102 * TelephonyManager class. A few places are still using this directly. 103 * Please clean them up if possible and use TelephonyManager instead. 104 * 105 * {@hide} 106 */ 107 interface ITelephony { 108 109 /** 110 * Dial a number. This doesn't place the call. It displays 111 * the Dialer screen. 112 * @param number the number to be dialed. If null, this 113 * would display the Dialer screen with no number pre-filled. 114 */ 115 @UnsupportedAppUsage dial(String number)116 void dial(String number); 117 118 /** 119 * Place a call to the specified number. 120 * @param callingPackage The package making the call. 121 * @param number the number to be called. 122 */ 123 @UnsupportedAppUsage call(String callingPackage, String number)124 void call(String callingPackage, String number); 125 126 /** @deprecated Use {@link #isRadioOnWithFeature(String, String) instead */ 127 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) isRadioOn(String callingPackage)128 boolean isRadioOn(String callingPackage); 129 130 /** 131 * Check to see if the radio is on or not. 132 * @param callingPackage the name of the package making the call. 133 * @param callingFeatureId The feature in the package. 134 * @return returns true if the radio is on. 135 */ isRadioOnWithFeature(String callingPackage, String callingFeatureId)136 boolean isRadioOnWithFeature(String callingPackage, String callingFeatureId); 137 138 /** 139 * @deprecated Use {@link #isRadioOnForSubscriberWithFeature(int, String, String) instead 140 */ 141 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) isRadioOnForSubscriber(int subId, String callingPackage)142 boolean isRadioOnForSubscriber(int subId, String callingPackage); 143 144 /** 145 * Check to see if the radio is on or not on particular subId. 146 * @param subId user preferred subId. 147 * @param callingPackage the name of the package making the call. 148 * @param callingFeatureId The feature in the package. 149 * @return returns true if the radio is on. 150 */ isRadioOnForSubscriberWithFeature(int subId, String callingPackage, String callingFeatureId)151 boolean isRadioOnForSubscriberWithFeature(int subId, String callingPackage, String callingFeatureId); 152 153 /** 154 * Set the user-set status for enriched calling with call composer. 155 */ setCallComposerStatus(int subId, int status)156 void setCallComposerStatus(int subId, int status); 157 158 /** 159 * Get the user-set status for enriched calling with call composer. 160 */ getCallComposerStatus(int subId)161 int getCallComposerStatus(int subId); 162 163 /** 164 * Supply a pin to unlock the SIM for particular subId. 165 * Blocks until a result is determined. 166 * @param pin The pin to check. 167 * @param subId user preferred subId. 168 * @return whether the operation was a success. 169 */ supplyPinForSubscriber(int subId, String pin)170 boolean supplyPinForSubscriber(int subId, String pin); 171 172 /** 173 * Supply puk to unlock the SIM and set SIM pin to new pin. 174 * Blocks until a result is determined. 175 * @param puk The puk to check. 176 * pin The new pin to be set in SIM 177 * @param subId user preferred subId. 178 * @return whether the operation was a success. 179 */ supplyPukForSubscriber(int subId, String puk, String pin)180 boolean supplyPukForSubscriber(int subId, String puk, String pin); 181 182 /** 183 * Supply a pin to unlock the SIM. Blocks until a result is determined. 184 * Returns a specific success/error code. 185 * @param pin The pin to check. 186 * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code 187 * retValue[1] = number of attempts remaining if known otherwise -1 188 */ supplyPinReportResultForSubscriber(int subId, String pin)189 int[] supplyPinReportResultForSubscriber(int subId, String pin); 190 191 /** 192 * Supply puk to unlock the SIM and set SIM pin to new pin. 193 * Blocks until a result is determined. 194 * Returns a specific success/error code 195 * @param puk The puk to check 196 * pin The pin to check. 197 * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code 198 * retValue[1] = number of attempts remaining if known otherwise -1 199 */ supplyPukReportResultForSubscriber(int subId, String puk, String pin)200 int[] supplyPukReportResultForSubscriber(int subId, String puk, String pin); 201 202 /** 203 * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated 204 * without SEND (so <code>dial</code> is not appropriate). 205 * 206 * @param dialString the MMI command to be executed. 207 * @return true if MMI command is executed. 208 */ 209 @UnsupportedAppUsage handlePinMmi(String dialString)210 boolean handlePinMmi(String dialString); 211 212 213 /** 214 * Handles USSD commands. 215 * 216 * @param subId The subscription to use. 217 * @param ussdRequest the USSD command to be executed. 218 * @param wrappedCallback receives a callback result. 219 */ handleUssdRequest(int subId, String ussdRequest, in ResultReceiver wrappedCallback)220 void handleUssdRequest(int subId, String ussdRequest, in ResultReceiver wrappedCallback); 221 222 /** 223 * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated 224 * without SEND (so <code>dial</code> is not appropriate) for 225 * a particular subId. 226 * @param dialString the MMI command to be executed. 227 * @param subId user preferred subId. 228 * @return true if MMI command is executed. 229 */ 230 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) handlePinMmiForSubscriber(int subId, String dialString)231 boolean handlePinMmiForSubscriber(int subId, String dialString); 232 233 /** 234 * Toggles the radio on or off. 235 */ 236 @UnsupportedAppUsage toggleRadioOnOff()237 void toggleRadioOnOff(); 238 239 /** 240 * Toggles the radio on or off on particular subId. 241 * @param subId user preferred subId. 242 */ toggleRadioOnOffForSubscriber(int subId)243 void toggleRadioOnOffForSubscriber(int subId); 244 245 /** 246 * Set the radio to on or off 247 */ 248 @UnsupportedAppUsage setRadio(boolean turnOn)249 boolean setRadio(boolean turnOn); 250 251 /** 252 * Set the radio to on or off on particular subId. 253 * @param subId user preferred subId. 254 */ setRadioForSubscriber(int subId, boolean turnOn)255 boolean setRadioForSubscriber(int subId, boolean turnOn); 256 257 /** 258 * Set the radio to on or off unconditionally 259 */ setRadioPower(boolean turnOn)260 boolean setRadioPower(boolean turnOn); 261 262 /** 263 * Vote on powering off the radio for a reason. The radio will be turned on only when there is 264 * no reason to power it off. When any of the voters want to power it off, it will be turned 265 * off. In case of emergency, the radio will be turned on even if there are some reasons for 266 * powering it off, and these radio off votes will be cleared. 267 * Multiple apps can vote for the same reason and the last vote will take effect. Each app is 268 * responsible for its vote. A powering-off vote of a reason will be maintained until it is 269 * cleared by calling {@link clearRadioPowerOffForReason} for that reason, or an emergency call 270 * is made, or the device is rebooted. When an app comes backup from a crash, it needs to make 271 * sure if its vote is as expected. An app can use the API {@link getRadioPowerOffReasons} to 272 * check its vote. 273 * 274 * @param subId The subscription ID. 275 * @param reason The reason for powering off radio. 276 * @return true on success and false on failure. 277 */ requestRadioPowerOffForReason(int subId, int reason)278 boolean requestRadioPowerOffForReason(int subId, int reason); 279 280 /** 281 * Remove the vote on powering off the radio for a reasonas, requested by 282 * {@link requestRadioPowerOffForReason}. 283 * 284 * @param subId The subscription ID. 285 * @param reason The reason for powering off radio. 286 * @return true on success and false on failure. 287 */ clearRadioPowerOffForReason(int subId, int reason)288 boolean clearRadioPowerOffForReason(int subId, int reason); 289 290 /** 291 * Get reasons for powering off radio, as requested by {@link requestRadioPowerOffForReason}. 292 * 293 * @param subId The subscription ID. 294 * @param callingPackage The package making the call. 295 * @param callingFeatureId The feature in the package. 296 * @return List of reasons for powering off radio. 297 */ getRadioPowerOffReasons(int subId, String callingPackage, String callingFeatureId)298 List getRadioPowerOffReasons(int subId, String callingPackage, String callingFeatureId); 299 300 /** 301 * This method has been removed due to security and stability issues. 302 */ 303 @UnsupportedAppUsage updateServiceLocation()304 void updateServiceLocation(); 305 306 /** 307 * Version of updateServiceLocation that records the caller and validates permissions. 308 */ updateServiceLocationWithPackageName(String callingPkg)309 void updateServiceLocationWithPackageName(String callingPkg); 310 311 /** 312 * This method has been removed due to security and stability issues. 313 */ 314 @UnsupportedAppUsage enableLocationUpdates()315 void enableLocationUpdates(); 316 317 /** 318 * This method has been removed due to security and stability issues. 319 */ 320 @UnsupportedAppUsage disableLocationUpdates()321 void disableLocationUpdates(); 322 323 /** 324 * Allow mobile data connections. 325 */ 326 @UnsupportedAppUsage enableDataConnectivity(String callingPackage)327 boolean enableDataConnectivity(String callingPackage); 328 329 /** 330 * Disallow mobile data connections. 331 */ 332 @UnsupportedAppUsage disableDataConnectivity(String callingPackage)333 boolean disableDataConnectivity(String callingPackage); 334 335 /** 336 * Report whether data connectivity is possible. 337 */ isDataConnectivityPossible(int subId)338 boolean isDataConnectivityPossible(int subId); 339 340 // Uses CellIdentity which is Parcelable here; will convert to CellLocation in client. getCellLocation(String callingPkg, String callingFeatureId)341 CellIdentity getCellLocation(String callingPkg, String callingFeatureId); 342 343 /** 344 * Returns the ISO country code equivalent of the current registered 345 * operator's MCC (Mobile Country Code). 346 * @see android.telephony.TelephonyManager#getNetworkCountryIso 347 */ getNetworkCountryIsoForPhone(int phoneId)348 String getNetworkCountryIsoForPhone(int phoneId); 349 350 /** 351 * Returns the neighboring cell information of the device. 352 */ getNeighboringCellInfo(String callingPkg, String callingFeatureId)353 List<NeighboringCellInfo> getNeighboringCellInfo(String callingPkg, String callingFeatureId); 354 355 @UnsupportedAppUsage getCallState()356 int getCallState(); 357 358 /** 359 * Returns the call state for a specific subscriiption. 360 */ getCallStateForSubscription(int subId, String callingPackage, String featureId)361 int getCallStateForSubscription(int subId, String callingPackage, String featureId); 362 363 /** 364 * Replaced by getDataActivityForSubId. 365 */ 366 @UnsupportedAppUsage(maxTargetSdk = 28) getDataActivity()367 int getDataActivity(); 368 369 /** 370 * Returns a constant indicating the type of activity on a data connection 371 * (cellular). 372 * 373 * @see #DATA_ACTIVITY_NONE 374 * @see #DATA_ACTIVITY_IN 375 * @see #DATA_ACTIVITY_OUT 376 * @see #DATA_ACTIVITY_INOUT 377 * @see #DATA_ACTIVITY_DORMANT 378 */ getDataActivityForSubId(int subId)379 int getDataActivityForSubId(int subId); 380 381 /** 382 * Replaced by getDataStateForSubId. 383 */ 384 @UnsupportedAppUsage(maxTargetSdk = 28) getDataState()385 int getDataState(); 386 387 /** 388 * Returns a constant indicating the current data connection state 389 * (cellular). 390 * 391 * @see #DATA_DISCONNECTED 392 * @see #DATA_CONNECTING 393 * @see #DATA_CONNECTED 394 * @see #DATA_SUSPENDED 395 */ getDataStateForSubId(int subId)396 int getDataStateForSubId(int subId); 397 398 /** 399 * Returns the current active phone type as integer. 400 * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE 401 * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE 402 */ 403 @UnsupportedAppUsage getActivePhoneType()404 int getActivePhoneType(); 405 406 /** 407 * Returns the current active phone type as integer for particular slot. 408 * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE 409 * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE 410 * @param slotIndex - slot to query. 411 */ getActivePhoneTypeForSlot(int slotIndex)412 int getActivePhoneTypeForSlot(int slotIndex); 413 414 /** 415 * Returns the CDMA ERI icon index to display 416 * @param callingPackage package making the call. 417 * @param callingFeatureId The feature in the package. 418 * 419 * @deprecated Legacy CDMA is unsupported. 420 */ getCdmaEriIconIndex(String callingPackage, String callingFeatureId)421 int getCdmaEriIconIndex(String callingPackage, String callingFeatureId); 422 423 /** 424 * Returns the CDMA ERI icon index to display on particular subId. 425 * @param subId user preferred subId. 426 * @param callingPackage package making the call. 427 * @param callingFeatureId The feature in the package. 428 * 429 * @deprecated Legacy CDMA is unsupported. 430 */ getCdmaEriIconIndexForSubscriber(int subId, String callingPackage, String callingFeatureId)431 int getCdmaEriIconIndexForSubscriber(int subId, String callingPackage, 432 String callingFeatureId); 433 434 /** 435 * Returns the CDMA ERI icon mode, 436 * 0 - ON 437 * 1 - FLASHING 438 * @param callingPackage package making the call. 439 * @param callingFeatureId The feature in the package. 440 * 441 * @deprecated Legacy CDMA is unsupported. 442 */ getCdmaEriIconMode(String callingPackage, String callingFeatureId)443 int getCdmaEriIconMode(String callingPackage, String callingFeatureId); 444 445 /** 446 * Returns the CDMA ERI icon mode on particular subId, 447 * 0 - ON 448 * 1 - FLASHING 449 * @param subId user preferred subId. 450 * @param callingPackage package making the call. 451 * @param callingFeatureId The feature in the package. 452 * 453 * @deprecated Legacy CDMA is unsupported. 454 */ getCdmaEriIconModeForSubscriber(int subId, String callingPackage, String callingFeatureId)455 int getCdmaEriIconModeForSubscriber(int subId, String callingPackage, 456 String callingFeatureId); 457 458 /** 459 * Returns the CDMA ERI text, 460 * @param callingPackage package making the call. 461 * @param callingFeatureId The feature in the package. 462 * 463 * @deprecated Legacy CDMA is unsupported. 464 */ getCdmaEriText(String callingPackage, String callingFeatureId)465 String getCdmaEriText(String callingPackage, String callingFeatureId); 466 467 /** 468 * Returns the CDMA ERI text for particular subId, 469 * @param subId user preferred subId. 470 * @param callingPackage package making the call. 471 * @param callingFeatureId The feature in the package. 472 * 473 * @deprecated Legacy CDMA is unsupported. 474 */ getCdmaEriTextForSubscriber(int subId, String callingPackage, String callingFeatureId)475 String getCdmaEriTextForSubscriber(int subId, String callingPackage, String callingFeatureId); 476 477 /** 478 * Returns true if OTA service provisioning needs to run. 479 * Only relevant on some technologies, others will always 480 * return false. 481 */ needsOtaServiceProvisioning()482 boolean needsOtaServiceProvisioning(); 483 484 /** 485 * Sets the voicemail number for a particular subscriber. 486 */ setVoiceMailNumber(int subId, String alphaTag, String number)487 boolean setVoiceMailNumber(int subId, String alphaTag, String number); 488 489 /** 490 * Sets the voice activation state for a particular subscriber. 491 */ setVoiceActivationState(int subId, int activationState)492 void setVoiceActivationState(int subId, int activationState); 493 494 /** 495 * Sets the data activation state for a particular subscriber. 496 */ setDataActivationState(int subId, int activationState)497 void setDataActivationState(int subId, int activationState); 498 499 /** 500 * Returns the voice activation state for a particular subscriber. 501 * @param subId user preferred sub 502 * @param callingPackage package queries voice activation state 503 */ getVoiceActivationState(int subId, String callingPackage)504 int getVoiceActivationState(int subId, String callingPackage); 505 506 /** 507 * Returns the data activation state for a particular subscriber. 508 * @param subId user preferred sub 509 * @param callingPackage package queris data activation state 510 */ getDataActivationState(int subId, String callingPackage)511 int getDataActivationState(int subId, String callingPackage); 512 513 /** 514 * Returns the unread count of voicemails for a subId. 515 * @param subId user preferred subId. 516 * Returns the unread count of voicemails 517 */ getVoiceMessageCountForSubscriber(int subId, String callingPackage, String callingFeatureId)518 int getVoiceMessageCountForSubscriber(int subId, String callingPackage, 519 String callingFeatureId); 520 521 /** 522 * Returns true if current state supports both voice and data 523 * simultaneously. This can change based on location or network condition. 524 */ isConcurrentVoiceAndDataAllowed(int subId)525 boolean isConcurrentVoiceAndDataAllowed(int subId); 526 getVisualVoicemailSettings(String callingPackage, int subId)527 Bundle getVisualVoicemailSettings(String callingPackage, int subId); 528 getVisualVoicemailPackageName(String callingPackage, String callingFeatureId, int subId)529 String getVisualVoicemailPackageName(String callingPackage, String callingFeatureId, int subId); 530 531 // Not oneway, caller needs to make sure the vaule is set before receiving a SMS enableVisualVoicemailSmsFilter(String callingPackage, int subId, in VisualVoicemailSmsFilterSettings settings)532 void enableVisualVoicemailSmsFilter(String callingPackage, int subId, 533 in VisualVoicemailSmsFilterSettings settings); 534 disableVisualVoicemailSmsFilter(String callingPackage, int subId)535 oneway void disableVisualVoicemailSmsFilter(String callingPackage, int subId); 536 537 // Get settings set by the calling package getVisualVoicemailSmsFilterSettings(String callingPackage, int subId)538 VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings(String callingPackage, 539 int subId); 540 541 /** 542 * Get settings set by the current default dialer, Internal use only. 543 * Requires READ_PRIVILEGED_PHONE_STATE permission. 544 */ getActiveVisualVoicemailSmsFilterSettings(int subId)545 VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings(int subId); 546 547 /** 548 * Send a visual voicemail SMS. Internal use only. 549 * Requires caller to be the default dialer and have SEND_SMS permission 550 */ sendVisualVoicemailSmsForSubscriber(in String callingPackage, String callingAttributeTag, in int subId, in String number, in int port, in String text, in PendingIntent sentIntent)551 void sendVisualVoicemailSmsForSubscriber(in String callingPackage, String callingAttributeTag, 552 in int subId, in String number, in int port, in String text, in PendingIntent sentIntent); 553 554 // Send the special dialer code. The IPC caller must be the current default dialer. sendDialerSpecialCode(String callingPackageName, String inputCode)555 void sendDialerSpecialCode(String callingPackageName, String inputCode); 556 557 /** 558 * Returns the network type of a subId. 559 * @param subId user preferred subId. 560 * @param callingPackage package making the call. 561 * @param callingFeatureId The feature in the package. 562 */ getNetworkTypeForSubscriber(int subId, String callingPackage, String callingFeatureId)563 int getNetworkTypeForSubscriber(int subId, String callingPackage, String callingFeatureId); 564 565 /** 566 * Returns the network type for data transmission 567 * @param callingPackage package making the call. 568 * @param callingFeatureId The feature in the package. 569 */ getDataNetworkType(String callingPackage, String callingFeatureId)570 int getDataNetworkType(String callingPackage, String callingFeatureId); 571 572 /** 573 * Returns the data network type of a subId 574 * @param subId user preferred subId. 575 * @param callingPackage package making the call. 576 * @param callingFeatureId The feature in the package. 577 */ getDataNetworkTypeForSubscriber(int subId, String callingPackage, String callingFeatureId)578 int getDataNetworkTypeForSubscriber(int subId, String callingPackage, 579 String callingFeatureId); 580 581 /** 582 * Returns the voice network type of a subId 583 * @param subId user preferred subId. 584 * @param callingPackage package making the call.getLteOnCdmaMode 585 * @param callingFeatureId The feature in the package. 586 * Returns the network type 587 */ getVoiceNetworkTypeForSubscriber(int subId, String callingPackage, String callingFeatureId)588 int getVoiceNetworkTypeForSubscriber(int subId, String callingPackage, 589 String callingFeatureId); 590 591 /** 592 * Return true if an ICC card is present 593 */ 594 @UnsupportedAppUsage hasIccCard()595 boolean hasIccCard(); 596 597 /** 598 * Return true if an ICC card is present for a subId. 599 * @param slotIndex user preferred slotIndex. 600 * Return true if an ICC card is present 601 */ hasIccCardUsingSlotIndex(int slotIndex)602 boolean hasIccCardUsingSlotIndex(int slotIndex); 603 604 /** 605 * Return if the current radio is LTE on CDMA. This 606 * is a tri-state return value as for a period of time 607 * the mode may be unknown. 608 * 609 * @param callingPackage the name of the calling package 610 * @param callingFeatureId The feature in the package. 611 * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE} 612 * or {@link PHone#LTE_ON_CDMA_TRUE} 613 */ getLteOnCdmaMode(String callingPackage, String callingFeatureId)614 int getLteOnCdmaMode(String callingPackage, String callingFeatureId); 615 616 /** 617 * Return if the current radio is LTE on CDMA. This 618 * is a tri-state return value as for a period of time 619 * the mode may be unknown. 620 * 621 * @param callingPackage the name of the calling package 622 * @param callingFeatureId The feature in the package. 623 * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE} 624 * or {@link PHone#LTE_ON_CDMA_TRUE} 625 */ getLteOnCdmaModeForSubscriber(int subId, String callingPackage, String callingFeatureId)626 int getLteOnCdmaModeForSubscriber(int subId, String callingPackage, String callingFeatureId); 627 628 /** 629 * Returns all observed cell information of the device. 630 */ getAllCellInfo(String callingPkg, String callingFeatureId)631 List<CellInfo> getAllCellInfo(String callingPkg, String callingFeatureId); 632 633 /** 634 * Request a cell information update for the specified subscription, 635 * reported via the CellInfoCallback. 636 */ requestCellInfoUpdate(int subId, in ICellInfoCallback cb, String callingPkg, String callingFeatureId)637 void requestCellInfoUpdate(int subId, in ICellInfoCallback cb, String callingPkg, 638 String callingFeatureId); 639 640 /** 641 * Request a cell information update for the specified subscription, 642 * reported via the CellInfoCallback. 643 * 644 * @param workSource the requestor to whom the power consumption for this should be attributed. 645 */ requestCellInfoUpdateWithWorkSource(int subId, in ICellInfoCallback cb, in String callingPkg, String callingFeatureId, in WorkSource ws)646 void requestCellInfoUpdateWithWorkSource(int subId, in ICellInfoCallback cb, 647 in String callingPkg, String callingFeatureId, in WorkSource ws); 648 649 /** 650 * Sets minimum time in milli-seconds between onCellInfoChanged 651 */ setCellInfoListRate(int rateInMillis, int subId)652 void setCellInfoListRate(int rateInMillis, int subId); 653 654 /** 655 * Opens a logical channel to the ICC card. 656 * 657 * Input parameters equivalent to TS 27.007 AT+CCHO command. 658 * 659 * @param request the parcelable used to indicate how to open the logical channel. 660 * @return an IccOpenLogicalChannelResponse object. 661 */ iccOpenLogicalChannel(in IccLogicalChannelRequest request)662 IccOpenLogicalChannelResponse iccOpenLogicalChannel(in IccLogicalChannelRequest request); 663 664 /** 665 * Closes a previously opened logical channel to the ICC card. 666 * 667 * Input parameters equivalent to TS 27.007 AT+CCHC command. 668 * 669 * @param request the parcelable used to indicate how to close the logical channel. 670 * @return true if the channel was closed successfully. 671 */ iccCloseLogicalChannel(in IccLogicalChannelRequest request)672 boolean iccCloseLogicalChannel(in IccLogicalChannelRequest request); 673 674 /** 675 * Transmit an APDU to the ICC card over a logical channel using the physical slot index and port index. 676 * 677 * Input parameters equivalent to TS 27.007 AT+CGLA command. 678 * 679 * @param slotIndex The physical slot index of the target ICC card 680 * @param portIndex The unique index referring to a port belonging to the SIM slot 681 * @param channel is the channel id to be closed as returned by a 682 * successful iccOpenLogicalChannel. 683 * @param cla Class of the APDU command. 684 * @param instruction Instruction of the APDU command. 685 * @param p1 P1 value of the APDU command. 686 * @param p2 P2 value of the APDU command. 687 * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 688 * is sent to the SIM. 689 * @param data Data to be sent with the APDU. 690 * @return The APDU response from the ICC card with the status appended at 691 * the end. 692 */ iccTransmitApduLogicalChannelByPort(int slotIndex, int portIndex, int channel, int cla, int instruction, int p1, int p2, int p3, String data)693 String iccTransmitApduLogicalChannelByPort(int slotIndex, int portIndex, int channel, int cla, int instruction, 694 int p1, int p2, int p3, String data); 695 696 /** 697 * Transmit an APDU to the ICC card over a logical channel. 698 * 699 * Input parameters equivalent to TS 27.007 AT+CGLA command. 700 * 701 * @param subId The subscription to use. 702 * @param channel is the channel id to be closed as returned by a 703 * successful iccOpenLogicalChannel. 704 * @param cla Class of the APDU command. 705 * @param instruction Instruction of the APDU command. 706 * @param p1 P1 value of the APDU command. 707 * @param p2 P2 value of the APDU command. 708 * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 709 * is sent to the SIM. 710 * @param data Data to be sent with the APDU. 711 * @return The APDU response from the ICC card with the status appended at 712 * the end. 713 */ 714 @UnsupportedAppUsage(trackingBug = 171933273) iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction, int p1, int p2, int p3, String data)715 String iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction, 716 int p1, int p2, int p3, String data); 717 718 /** 719 * Transmit an APDU to the ICC card over the basic channel using the physical slot index and port index. 720 * 721 * Input parameters equivalent to TS 27.007 AT+CSIM command. 722 * 723 * @param slotIndex The physical slot index of the target ICC card 724 * @param portIndex The unique index referring to a port belonging to the SIM slot 725 * @param callingPackage the name of the package making the call. 726 * @param cla Class of the APDU command. 727 * @param instruction Instruction of the APDU command. 728 * @param p1 P1 value of the APDU command. 729 * @param p2 P2 value of the APDU command. 730 * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 731 * is sent to the SIM. 732 * @param data Data to be sent with the APDU. 733 * @return The APDU response from the ICC card with the status appended at 734 * the end. 735 */ iccTransmitApduBasicChannelByPort(int slotIndex, int portIndex, String callingPackage, int cla, int instruction, int p1, int p2, int p3, String data)736 String iccTransmitApduBasicChannelByPort(int slotIndex, int portIndex, String callingPackage, int cla, 737 int instruction, int p1, int p2, int p3, String data); 738 739 /** 740 * Transmit an APDU to the ICC card over the basic channel. 741 * 742 * Input parameters equivalent to TS 27.007 AT+CSIM command. 743 * 744 * @param subId The subscription to use. 745 * @param callingPackage the name of the package making the call. 746 * @param cla Class of the APDU command. 747 * @param instruction Instruction of the APDU command. 748 * @param p1 P1 value of the APDU command. 749 * @param p2 P2 value of the APDU command. 750 * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 751 * is sent to the SIM. 752 * @param data Data to be sent with the APDU. 753 * @return The APDU response from the ICC card with the status appended at 754 * the end. 755 */ iccTransmitApduBasicChannel(int subId, String callingPackage, int cla, int instruction, int p1, int p2, int p3, String data)756 String iccTransmitApduBasicChannel(int subId, String callingPackage, int cla, int instruction, 757 int p1, int p2, int p3, String data); 758 759 /** 760 * Returns the response APDU for a command APDU sent through SIM_IO. 761 * 762 * @param subId The subscription to use. 763 * @param fileID 764 * @param command 765 * @param p1 P1 value of the APDU command. 766 * @param p2 P2 value of the APDU command. 767 * @param p3 P3 value of the APDU command. 768 * @param filePath 769 * @return The APDU response. 770 */ iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2, int p3, String filePath)771 byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2, int p3, 772 String filePath); 773 774 /** 775 * Send ENVELOPE to the SIM and returns the response. 776 * 777 * @param subId The subscription to use. 778 * @param contents String containing SAT/USAT response in hexadecimal 779 * format starting with command tag. See TS 102 223 for 780 * details. 781 * @return The APDU response from the ICC card, with the last 4 bytes 782 * being the status word. If the command fails, returns an empty 783 * string. 784 */ sendEnvelopeWithStatus(int subId, String content)785 String sendEnvelopeWithStatus(int subId, String content); 786 787 /** 788 * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 789 * Used for device configuration by some CDMA operators. 790 * 791 * @param itemID the ID of the item to read. 792 * @return the NV item as a String, or null on any failure. 793 * 794 * @deprecated Legacy CDMA is unsupported. 795 */ nvReadItem(int itemID)796 String nvReadItem(int itemID); 797 798 /** 799 * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 800 * Used for device configuration by some CDMA operators. 801 * 802 * @param itemID the ID of the item to read. 803 * @param itemValue the value to write, as a String. 804 * @return true on success; false on any failure. 805 * 806 * @deprecated Legacy CDMA is unsupported. 807 */ nvWriteItem(int itemID, String itemValue)808 boolean nvWriteItem(int itemID, String itemValue); 809 810 /** 811 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. 812 * Used for device configuration by some CDMA operators. 813 * 814 * @param preferredRoamingList byte array containing the new PRL. 815 * @return true on success; false on any failure. 816 * 817 * @deprecated Legacy CDMA is unsupported. 818 */ nvWriteCdmaPrl(in byte[] preferredRoamingList)819 boolean nvWriteCdmaPrl(in byte[] preferredRoamingList); 820 821 /** 822 * Rollback modem configurations to factory default except some config which are in whitelist. 823 * Used for device configuration by some CDMA operators. 824 * 825 * <p>Requires Permission: 826 * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling 827 * app has carrier privileges (see {@link #hasCarrierPrivileges}). 828 * 829 * @param slotIndex - device slot. 830 * @return {@code true} on success; {@code false} on any failure. 831 * 832 * @deprecated Legacy CDMA is unsupported. 833 */ resetModemConfig(int slotIndex)834 boolean resetModemConfig(int slotIndex); 835 836 /** 837 * Generate a radio modem reset. Used for device configuration by some CDMA operators. 838 * Different than {@link #setRadioPower(boolean)}, modem reboot will power down sim card. 839 * 840 * <p>Requires Permission: 841 * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} or that the calling 842 * app has carrier privileges (see {@link #hasCarrierPrivileges}). 843 * 844 * @param slotIndex - device slot. 845 * @return {@code true} on success; {@code false} on any failure. 846 */ rebootModem(int slotIndex)847 boolean rebootModem(int slotIndex); 848 849 /* 850 * Get the allowed network type. 851 * Used for device configuration by some CDMA operators. 852 * 853 * @param subId the id of the subscription to query. 854 * @return the allowed network type bitmask, defined in RILConstants.java. 855 */ getAllowedNetworkTypesBitmask(int subId)856 int getAllowedNetworkTypesBitmask(int subId); 857 858 /** 859 * Check whether DUN APN is required for tethering with subId. 860 * 861 * @param subId the id of the subscription to require tethering. 862 * @return {@code true} if DUN APN is required for tethering. 863 * @hide 864 */ isTetheringApnRequiredForSubscriber(int subId)865 boolean isTetheringApnRequiredForSubscriber(int subId); 866 867 /** 868 * Enables framework IMS and triggers IMS Registration. 869 */ enableIms(int slotId)870 void enableIms(int slotId); 871 872 /** 873 * Disables framework IMS and triggers IMS deregistration. 874 */ disableIms(int slotId)875 void disableIms(int slotId); 876 877 /** 878 * Toggle framework IMS disables and enables. 879 */ resetIms(int slotIndex)880 void resetIms(int slotIndex); 881 882 /** 883 * Get IImsMmTelFeature binder from ImsResolver that corresponds to the subId and MMTel feature 884 * as well as registering the MmTelFeature for callbacks using the IImsServiceFeatureCallback 885 * interface. 886 */ registerMmTelFeatureCallback(int slotId, in IImsServiceFeatureCallback callback)887 void registerMmTelFeatureCallback(int slotId, in IImsServiceFeatureCallback callback); 888 889 /** 890 * Unregister a callback that was previously registered through 891 * {@link #registerMmTelFeatureCallback}. This should always be called when the callback is no 892 * longer being used. 893 */ unregisterImsFeatureCallback(in IImsServiceFeatureCallback callback)894 void unregisterImsFeatureCallback(in IImsServiceFeatureCallback callback); 895 896 /** 897 * Returns the IImsRegistration associated with the slot and feature specified. 898 */ getImsRegistration(int slotId, int feature)899 IImsRegistration getImsRegistration(int slotId, int feature); 900 901 /** 902 * Returns the IImsConfig associated with the slot and feature specified. 903 */ getImsConfig(int slotId, int feature)904 IImsConfig getImsConfig(int slotId, int feature); 905 906 /** 907 * @return true if the ImsService to bind to for the slot id specified was set, false otherwise. 908 */ setBoundImsServiceOverride(int slotIndex, int userId, boolean isCarrierService, in int[] featureTypes, in String packageName)909 boolean setBoundImsServiceOverride(int slotIndex, int userId, boolean isCarrierService, 910 in int[] featureTypes, in String packageName); 911 912 /** 913 * @return true if the ImsService cleared any carrier ImsService overrides, false otherwise. 914 */ clearCarrierImsServiceOverride(int slotIndex)915 boolean clearCarrierImsServiceOverride(int slotIndex); 916 917 /** 918 * @return the package name of the carrier/device ImsService associated with this slot. 919 */ getBoundImsServicePackage(int slotIndex, boolean isCarrierImsService, int featureType)920 String getBoundImsServicePackage(int slotIndex, boolean isCarrierImsService, int featureType); 921 922 /** 923 * Get the MmTelFeature state attached to this subscription id. 924 */ getImsMmTelFeatureState(int subId, IIntegerConsumer callback)925 void getImsMmTelFeatureState(int subId, IIntegerConsumer callback); 926 927 /** 928 * Set the network selection mode to automatic. 929 * 930 * @param subId the id of the subscription to update. 931 */ setNetworkSelectionModeAutomatic(int subId)932 void setNetworkSelectionModeAutomatic(int subId); 933 934 /** 935 * Perform a radio scan and return the list of avialble networks. 936 * 937 * @param subId the id of the subscription. 938 * @param callingPackage the calling package 939 * @param callingFeatureId The feature in the package 940 * @return CellNetworkScanResult containing status of scan and networks. 941 */ getCellNetworkScanResults(int subId, String callingPackage, String callingFeatureId)942 CellNetworkScanResult getCellNetworkScanResults(int subId, String callingPackage, 943 String callingFeatureId); 944 945 /** 946 * Perform a radio network scan and return the id of this scan. 947 * 948 * @param subId the id of the subscription. 949 * @param renounceFineLocationAccess Set this to true if the caller would not like to 950 * receive fine location related information 951 * @param request Defines all the configs for network scan. 952 * @param messenger Callback messages will be sent using this messenger. 953 * @param binder the binder object instantiated in TelephonyManager. 954 * @param callingPackage the calling package 955 * @param callingFeatureId The feature in the package 956 * @return An id for this scan. 957 */ requestNetworkScan(int subId, in boolean renounceFineLocationAccess, in NetworkScanRequest request, in Messenger messenger, in IBinder binder, in String callingPackage, String callingFeatureId)958 int requestNetworkScan(int subId, in boolean renounceFineLocationAccess, 959 in NetworkScanRequest request, in Messenger messenger, in IBinder binder, 960 in String callingPackage, String callingFeatureId); 961 962 /** 963 * Stop an existing radio network scan. 964 * 965 * @param subId the id of the subscription. 966 * @param scanId The id of the scan that is going to be stopped. 967 */ stopNetworkScan(int subId, int scanId)968 void stopNetworkScan(int subId, int scanId); 969 970 /** 971 * Ask the radio to connect to the input network and change selection mode to manual. 972 * 973 * @param subId the id of the subscription. 974 * @param operatorInfo the operator inforamtion, included the PLMN, long name and short name of 975 * the operator to attach to. 976 * @param persistSelection whether the selection will persist until reboot. If true, only allows 977 * attaching to the selected PLMN until reboot; otherwise, attach to the chosen PLMN and resume 978 * normal network selection next time. 979 * @return {@code true} on success; {@code true} on any failure. 980 */ setNetworkSelectionModeManual( int subId, in OperatorInfo operatorInfo, boolean persisSelection)981 boolean setNetworkSelectionModeManual( 982 int subId, in OperatorInfo operatorInfo, boolean persisSelection); 983 984 /** 985 * Get the allowed network types for certain reason. 986 * 987 * @param subId the id of the subscription. 988 * @param reason the reason the allowed network type change is taking place 989 * @return allowedNetworkTypes the allowed network types. 990 */ getAllowedNetworkTypesForReason(int subId, int reason)991 long getAllowedNetworkTypesForReason(int subId, int reason); 992 993 /** 994 * Set the allowed network types and provide the reason triggering the allowed network change. 995 * 996 * @param subId the id of the subscription. 997 * @param reason the reason the allowed network type change is taking place 998 * @param allowedNetworkTypes the allowed network types. 999 * @return true on success; false on any failure. 1000 */ setAllowedNetworkTypesForReason(int subId, int reason, long allowedNetworkTypes)1001 boolean setAllowedNetworkTypesForReason(int subId, int reason, long allowedNetworkTypes); 1002 1003 /** 1004 * Get the user enabled state of Mobile Data. 1005 * 1006 * TODO: remove and use isUserDataEnabled. 1007 * This can't be removed now because some vendor codes 1008 * calls through ITelephony directly while they should 1009 * use TelephonyManager. 1010 * 1011 * @return true on enabled 1012 */ 1013 @UnsupportedAppUsage getDataEnabled(int subId)1014 boolean getDataEnabled(int subId); 1015 1016 /** 1017 * Get the user enabled state of Mobile Data. 1018 * 1019 * @return true on enabled 1020 */ isUserDataEnabled(int subId)1021 boolean isUserDataEnabled(int subId); 1022 1023 /** 1024 * Check if data is enabled on the device. It can be disabled by 1025 * user, carrier, policy or thermal. 1026 * @return true on enabled 1027 */ isDataEnabled(int subId)1028 boolean isDataEnabled(int subId); 1029 1030 /** 1031 * Control of data connection and provide the reason triggering the data connection control. 1032 * 1033 * @param subId user preferred subId. 1034 * @param reason the reason the data enable change is taking place 1035 * @param enable true to turn on, else false 1036 * @param callingPackage the package that changed the data enabled state 1037 */ setDataEnabledForReason(int subId, int reason, boolean enable, String callingPackage)1038 void setDataEnabledForReason(int subId, int reason, boolean enable, String callingPackage); 1039 1040 /** 1041 * Return whether data is enabled for certain reason 1042 * @param subId user preferred subId. . 1043 * @param reason the reason the data enable change is taking place 1044 * @return true on enabled 1045 */ isDataEnabledForReason(int subId, int reason)1046 boolean isDataEnabledForReason(int subId, int reason); 1047 1048 /** 1049 * Checks if manual network selection is allowed. 1050 * 1051 * @return {@code true} if manual network selection is allowed, otherwise return {@code false}. 1052 */ isManualNetworkSelectionAllowed(int subId)1053 boolean isManualNetworkSelectionAllowed(int subId); 1054 1055 /** 1056 * Set IMS registration state 1057 */ setImsRegistrationState(boolean registered)1058 void setImsRegistrationState(boolean registered); 1059 1060 /** 1061 * Return MDN string for CDMA phone. 1062 * @param subId user preferred subId. 1063 * 1064 * @deprecated Legacy CDMA is unsupported. 1065 */ getCdmaMdn(int subId)1066 String getCdmaMdn(int subId); 1067 1068 /** 1069 * Return MIN string for CDMA phone. 1070 * @param subId user preferred subId. 1071 * 1072 * @deprecated Legacy CDMA is unsupported. 1073 */ getCdmaMin(int subId)1074 String getCdmaMin(int subId); 1075 1076 /** 1077 * Request that the next incoming call from a number matching {@code range} be intercepted. 1078 * @param range The range of phone numbers the caller expects a phone call from. 1079 * @param timeoutMillis The amount of time to wait for such a call, or 1080 * {@link #MAX_NUMBER_VERIFICATION_TIMEOUT_MILLIS}, whichever is lesser. 1081 * @param callback the callback aidl 1082 * @param callingPackage the calling package name. 1083 */ requestNumberVerification(in PhoneNumberRange range, long timeoutMillis, in INumberVerificationCallback callback, String callingPackage)1084 void requestNumberVerification(in PhoneNumberRange range, long timeoutMillis, 1085 in INumberVerificationCallback callback, String callingPackage); 1086 1087 /** 1088 * Has the calling application been granted special privileges by the carrier. 1089 * 1090 * If any of the packages in the calling UID has carrier privileges, the 1091 * call will return true. This access is granted by the owner of the UICC 1092 * card and does not depend on the registered carrier. 1093 * 1094 * TODO: Add a link to documentation. 1095 * 1096 * @param subId The subscription to use. 1097 * @return carrier privilege status defined in TelephonyManager. 1098 */ getCarrierPrivilegeStatus(int subId)1099 int getCarrierPrivilegeStatus(int subId); 1100 1101 /** 1102 * Similar to above, but check for the given uid. 1103 */ getCarrierPrivilegeStatusForUid(int subId, int uid)1104 int getCarrierPrivilegeStatusForUid(int subId, int uid); 1105 1106 /** 1107 * Similar to above, but check for the package whose name is pkgName. 1108 * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission 1109 */ checkCarrierPrivilegesForPackage(int subId, String pkgName)1110 int checkCarrierPrivilegesForPackage(int subId, String pkgName); 1111 1112 /** 1113 * Similar to above, but check across all phones. 1114 * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission 1115 */ checkCarrierPrivilegesForPackageAnyPhone(String pkgName)1116 int checkCarrierPrivilegesForPackageAnyPhone(String pkgName); 1117 1118 /** 1119 * Returns list of the package names of the carrier apps that should handle the input intent 1120 * and have carrier privileges for the given phoneId. 1121 * 1122 * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission 1123 * 1124 * @param intent Intent that will be sent. 1125 * @param phoneId The phoneId on which the carrier app has carrier privileges. 1126 * @return list of carrier app package names that can handle the intent on phoneId. 1127 * Returns null if there is an error and an empty list if there 1128 * are no matching packages. 1129 */ getCarrierPackageNamesForIntentAndPhone(in Intent intent, int phoneId)1130 List<String> getCarrierPackageNamesForIntentAndPhone(in Intent intent, int phoneId); 1131 1132 /** 1133 * Set the line 1 phone number string and its alphatag for the current ICCID 1134 * for display purpose only, for example, displayed in Phone Status. It won't 1135 * change the actual MSISDN/MDN. To unset alphatag or number, pass in a null 1136 * value. 1137 * 1138 * @param subId the subscriber that the alphatag and dialing number belongs to. 1139 * @param alphaTag alpha-tagging of the dailing nubmer 1140 * @param number The dialing number 1141 * @return true if the operation was executed correctly. 1142 */ setLine1NumberForDisplayForSubscriber(int subId, String alphaTag, String number)1143 boolean setLine1NumberForDisplayForSubscriber(int subId, String alphaTag, String number); 1144 1145 /** 1146 * Returns the displayed dialing number string if it was set previously via 1147 * {@link #setLine1NumberForDisplay}. Otherwise returns null. 1148 * 1149 * @param subId whose dialing number for line 1 is returned. 1150 * @param callingPackage The package making the call. 1151 * @param callingFeatureId The feature in the package. 1152 * @return the displayed dialing number if set, or null if not set. 1153 */ getLine1NumberForDisplay(int subId, String callingPackage, String callingFeatureId)1154 String getLine1NumberForDisplay(int subId, String callingPackage, String callingFeatureId); 1155 1156 /** 1157 * Returns the displayed alphatag of the dialing number if it was set 1158 * previously via {@link #setLine1NumberForDisplay}. Otherwise returns null. 1159 * 1160 * @param subId whose alphatag associated with line 1 is returned. 1161 * @param callingPackage The package making the call. 1162 * @param callingFeatureId The feature in the package. 1163 * @return the displayed alphatag of the dialing number if set, or null if 1164 * not set. 1165 */ getLine1AlphaTagForDisplay(int subId, String callingPackage, String callingFeatureId)1166 String getLine1AlphaTagForDisplay(int subId, String callingPackage, String callingFeatureId); 1167 1168 /** 1169 * Return the set of subscriber IDs that should be considered "merged together" for data usage 1170 * purposes. This is commonly {@code null} to indicate no merging is required. Any returned 1171 * subscribers are sorted in a deterministic order. 1172 * <p> 1173 * The returned set of subscriber IDs will include the subscriber ID corresponding to this 1174 * TelephonyManager's subId. 1175 * 1176 * @hide 1177 */ getMergedSubscriberIds(int subId, String callingPackage, String callingFeatureId)1178 String[] getMergedSubscriberIds(int subId, String callingPackage, String callingFeatureId); 1179 1180 /** 1181 * @hide 1182 */ getMergedImsisFromGroup(int subId, String callingPackage)1183 String[] getMergedImsisFromGroup(int subId, String callingPackage); 1184 1185 /** 1186 * Override the operator branding for the current ICCID. 1187 * 1188 * Once set, whenever the SIM is present in the device, the service 1189 * provider name (SPN) and the operator name will both be replaced by the 1190 * brand value input. To unset the value, the same function should be 1191 * called with a null brand value. 1192 * 1193 * <p>Requires Permission: 1194 * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} 1195 * or has to be carrier app - see #hasCarrierPrivileges. 1196 * 1197 * @param subId The subscription to use. 1198 * @param brand The brand name to display/set. 1199 * @return true if the operation was executed correctly. 1200 */ setOperatorBrandOverride(int subId, String brand)1201 boolean setOperatorBrandOverride(int subId, String brand); 1202 1203 /** 1204 * Override the roaming indicator for the current ICCID. 1205 * 1206 * Using this call, the carrier app (see #hasCarrierPrivileges) can override 1207 * the platform's notion of a network operator being considered roaming or not. 1208 * The change only affects the ICCID that was active when this call was made. 1209 * 1210 * If null is passed as any of the input, the corresponding value is deleted. 1211 * 1212 * <p>Requires that the caller have carrier privilege. See #hasCarrierPrivileges. 1213 * 1214 * @param subId for which the roaming overrides apply. 1215 * @param gsmRoamingList - List of MCCMNCs to be considered roaming for 3GPP RATs. 1216 * @param gsmNonRoamingList - List of MCCMNCs to be considered not roaming for 3GPP RATs. 1217 * @param cdmaRoamingList - List of SIDs to be considered roaming for 3GPP2 RATs. 1218 * @param cdmaNonRoamingList - List of SIDs to be considered not roaming for 3GPP2 RATs. 1219 * @return true if the operation was executed correctly. 1220 */ setRoamingOverride(int subId, in List<String> gsmRoamingList, in List<String> gsmNonRoamingList, in List<String> cdmaRoamingList, in List<String> cdmaNonRoamingList)1221 boolean setRoamingOverride(int subId, in List<String> gsmRoamingList, 1222 in List<String> gsmNonRoamingList, in List<String> cdmaRoamingList, 1223 in List<String> cdmaNonRoamingList); 1224 1225 /** 1226 * Check if any mobile Radios need to be shutdown. 1227 * 1228 * @return true is any mobile radio needs to be shutdown 1229 */ needMobileRadioShutdown()1230 boolean needMobileRadioShutdown(); 1231 1232 /** 1233 * Shutdown Mobile Radios 1234 */ shutdownMobileRadios()1235 void shutdownMobileRadios(); 1236 1237 /** 1238 * Get phone radio type and access technology. 1239 * 1240 * @param phoneId which phone you want to get 1241 * @param callingPackage the name of the package making the call 1242 * @return phone radio type and access technology 1243 */ getRadioAccessFamily(in int phoneId, String callingPackage)1244 int getRadioAccessFamily(in int phoneId, String callingPackage); 1245 uploadCallComposerPicture(int subscriptionId, String callingPackage, String contentType, in ParcelFileDescriptor fd, in ResultReceiver callback)1246 void uploadCallComposerPicture(int subscriptionId, String callingPackage, 1247 String contentType, in ParcelFileDescriptor fd, in ResultReceiver callback); 1248 1249 /** 1250 * Enables or disables video calling. 1251 * 1252 * @param enable Whether to enable video calling. 1253 */ enableVideoCalling(boolean enable)1254 void enableVideoCalling(boolean enable); 1255 1256 /** 1257 * Whether video calling has been enabled by the user. 1258 * 1259 * @param callingPackage The package making the call. 1260 * @param callingFeatureId The feature in the package. 1261 * @return {@code true} if the user has enabled video calling, {@code false} otherwise. 1262 */ isVideoCallingEnabled(String callingPackage, String callingFeatureId)1263 boolean isVideoCallingEnabled(String callingPackage, String callingFeatureId); 1264 1265 /** 1266 * Whether the DTMF tone length can be changed. 1267 * 1268 * @param subId The subscription to use. 1269 * @param callingPackage The package making the call. 1270 * @param callingFeatureId The feature in the package. 1271 * @return {@code true} if the DTMF tone length can be changed. 1272 */ canChangeDtmfToneLength(int subId, String callingPackage, String callingFeatureId)1273 boolean canChangeDtmfToneLength(int subId, String callingPackage, String callingFeatureId); 1274 1275 /** 1276 * Whether the device is a world phone. 1277 * 1278 * @param callingPackage The package making the call. 1279 * @param callingFeatureId The feature in the package. 1280 * @return {@code true} if the devices is a world phone. 1281 */ isWorldPhone(int subId, String callingPackage, String callingFeatureId)1282 boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId); 1283 1284 /** 1285 * Whether the phone supports TTY mode. 1286 * 1287 * @return {@code true} if the device supports TTY mode. 1288 */ isTtyModeSupported()1289 boolean isTtyModeSupported(); 1290 isRttSupported(int subscriptionId)1291 boolean isRttSupported(int subscriptionId); 1292 1293 /** 1294 * Whether the phone supports hearing aid compatibility. 1295 * 1296 * @return {@code true} if the device supports hearing aid compatibility. 1297 */ isHearingAidCompatibilitySupported()1298 boolean isHearingAidCompatibilitySupported(); 1299 1300 /** 1301 * Get IMS Registration Status on a particular subid. 1302 * 1303 * @param subId user preferred subId. 1304 * 1305 * @return {@code true} if the IMS status is registered. 1306 */ isImsRegistered(int subId)1307 boolean isImsRegistered(int subId); 1308 1309 /** 1310 * Returns the Status of Wi-Fi Calling for the subscription id specified. 1311 */ isWifiCallingAvailable(int subId)1312 boolean isWifiCallingAvailable(int subId); 1313 1314 /** 1315 * Returns the Status of VT (video telephony) for the subscription ID specified. 1316 */ isVideoTelephonyAvailable(int subId)1317 boolean isVideoTelephonyAvailable(int subId); 1318 1319 /** 1320 * Returns the MMTEL IMS registration technology for the subsciption ID specified. 1321 */ getImsRegTechnologyForMmTel(int subId)1322 int getImsRegTechnologyForMmTel(int subId); 1323 1324 /** @deprecated Use {@link #getDeviceIdWithFeature(String, String) instead */ 1325 @UnsupportedAppUsage getDeviceId(String callingPackage)1326 String getDeviceId(String callingPackage); 1327 1328 /** 1329 * Returns the unique device ID of phone, for example, the IMEI for 1330 * GSM and the MEID for CDMA phones. Return null if device ID is not available. 1331 * 1332 * @param callingPackage The package making the call. 1333 * @param callingFeatureId The feature in the package 1334 * <p>Requires Permission: 1335 * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} 1336 */ getDeviceIdWithFeature(String callingPackage, String callingFeatureId)1337 String getDeviceIdWithFeature(String callingPackage, String callingFeatureId); 1338 1339 /** 1340 * Returns the IMEI for the given slot. 1341 * 1342 * @param slotIndex - device slot. 1343 * @param callingPackage The package making the call. 1344 * @param callingFeatureId The feature in the package 1345 * <p>Requires Permission: 1346 * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} 1347 */ getImeiForSlot(int slotIndex, String callingPackage, String callingFeatureId)1348 String getImeiForSlot(int slotIndex, String callingPackage, String callingFeatureId); 1349 1350 /** 1351 * Returns the primary IMEI of the device 1352 * 1353 * @param callingPackage The package name of the caller 1354 * @param callingFeatureId The feature Id of the calling package 1355 * @throws UnsupportedOperationException if the radio doesn't support this feature. 1356 * @throws SecurityException if the caller does not have the required permission/privileges 1357 */ getPrimaryImei(String callingPackage, String callingFeatureId)1358 String getPrimaryImei(String callingPackage, String callingFeatureId); 1359 1360 /** 1361 * Returns the Type Allocation Code from the IMEI for the given slot. 1362 * 1363 * @param slotIndex - Which slot to retrieve the Type Allocation Code from. 1364 */ getTypeAllocationCodeForSlot(int slotIndex)1365 String getTypeAllocationCodeForSlot(int slotIndex); 1366 1367 /** 1368 * Returns the MEID for the given slot. 1369 * 1370 * @param slotIndex - device slot. 1371 * @param callingPackage The package making the call. 1372 * @param callingFeatureId The feature in the package 1373 * <p>Requires Permission: 1374 * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} 1375 */ getMeidForSlot(int slotIndex, String callingPackage, String callingFeatureId)1376 String getMeidForSlot(int slotIndex, String callingPackage, String callingFeatureId); 1377 1378 /** 1379 * Returns the Manufacturer Code from the MEID for the given slot. 1380 * 1381 * @param slotIndex - Which slot to retrieve the Manufacturer Code from. 1382 */ getManufacturerCodeForSlot(int slotIndex)1383 String getManufacturerCodeForSlot(int slotIndex); 1384 1385 /** 1386 * Returns the device software version. 1387 * 1388 * @param slotIndex - device slot. 1389 * @param callingPackage The package making the call. 1390 * @param callingFeatureId The feature in the package. 1391 * <p>Requires Permission: 1392 * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} 1393 */ getDeviceSoftwareVersionForSlot(int slotIndex, String callingPackage, String callingFeatureId)1394 String getDeviceSoftwareVersionForSlot(int slotIndex, String callingPackage, 1395 String callingFeatureId); 1396 1397 /** 1398 * Returns the subscription ID associated with the specified PhoneAccountHandle. 1399 */ getSubIdForPhoneAccountHandle(in PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId)1400 int getSubIdForPhoneAccountHandle(in PhoneAccountHandle phoneAccountHandle, 1401 String callingPackage, String callingFeatureId); 1402 1403 /** 1404 * Returns the PhoneAccountHandle associated with a subscription ID. 1405 */ getPhoneAccountHandleForSubscriptionId(int subscriptionId)1406 PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId); 1407 factoryReset(int subId, String callingPackage)1408 void factoryReset(int subId, String callingPackage); 1409 1410 /** 1411 * Returns users's current locale based on the SIM. 1412 * 1413 * The returned string will be a well formed BCP-47 language tag, or {@code null} 1414 * if no locale could be derived. 1415 */ getSimLocaleForSubscriber(int subId)1416 String getSimLocaleForSubscriber(int subId); 1417 1418 /** 1419 * Requests the modem activity info asynchronously. 1420 * The implementor is expected to reply with the 1421 * {@link android.telephony.ModemActivityInfo} object placed into the Bundle with the key 1422 * {@link android.telephony.TelephonyManager#MODEM_ACTIVITY_RESULT_KEY}. 1423 * The result code is ignored. 1424 */ requestModemActivityInfo(in ResultReceiver result)1425 oneway void requestModemActivityInfo(in ResultReceiver result); 1426 1427 /** 1428 * Get the service state on specified SIM slot. 1429 * @param slotIndex of phone whose service state is returned 1430 * @param renounceFineLocationAccess Set this to true if the caller would not like to 1431 * receive fine location related information 1432 * @param renounceCoarseLocationAccess Set this to true if the caller would not like to 1433 * receive coarse location related information 1434 * @param callingPackage The package making the call 1435 * @param callingFeatureId The feature in the package 1436 * @return Service state on specified SIM slot. 1437 */ getServiceStateForSlot(int slotIndex, boolean renounceFineLocationAccess, boolean renounceCoarseLocationAccess, String callingPackage, String callingFeatureId)1438 ServiceState getServiceStateForSlot(int slotIndex, boolean renounceFineLocationAccess, 1439 boolean renounceCoarseLocationAccess, String callingPackage, String callingFeatureId); 1440 1441 /** 1442 * Returns the URI for the per-account voicemail ringtone set in Phone settings. 1443 * 1444 * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the 1445 * voicemail ringtone. 1446 * @return The URI for the ringtone to play when receiving a voicemail from a specific 1447 * PhoneAccount. 1448 */ getVoicemailRingtoneUri(in PhoneAccountHandle accountHandle)1449 Uri getVoicemailRingtoneUri(in PhoneAccountHandle accountHandle); 1450 1451 /** 1452 * Sets the per-account voicemail ringtone. 1453 * 1454 * <p>Requires that the calling app is the default dialer, or has carrier privileges, or 1455 * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}. 1456 * 1457 * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the 1458 * voicemail ringtone. 1459 * @param uri The URI for the ringtone to play when receiving a voicemail from a specific 1460 * PhoneAccount. 1461 */ setVoicemailRingtoneUri(String callingPackage, in PhoneAccountHandle phoneAccountHandle, in Uri uri)1462 void setVoicemailRingtoneUri(String callingPackage, 1463 in PhoneAccountHandle phoneAccountHandle, in Uri uri); 1464 1465 /** 1466 * Returns whether vibration is set for voicemail notification in Phone settings. 1467 * 1468 * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the 1469 * voicemail vibration setting. 1470 * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise. 1471 */ isVoicemailVibrationEnabled(in PhoneAccountHandle accountHandle)1472 boolean isVoicemailVibrationEnabled(in PhoneAccountHandle accountHandle); 1473 1474 /** 1475 * Sets the per-account preference whether vibration is enabled for voicemail notifications. 1476 * 1477 * <p>Requires that the calling app is the default dialer, or has carrier privileges, or 1478 * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}. 1479 * 1480 * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the 1481 * voicemail vibration setting. 1482 * @param enabled Whether to enable or disable vibration for voicemail notifications from a 1483 * specific PhoneAccount. 1484 */ setVoicemailVibrationEnabled(String callingPackage, in PhoneAccountHandle phoneAccountHandle, boolean enabled)1485 void setVoicemailVibrationEnabled(String callingPackage, 1486 in PhoneAccountHandle phoneAccountHandle, boolean enabled); 1487 1488 /** 1489 * Returns a list of packages that have carrier privileges for the specific phone. 1490 * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission 1491 */ getPackagesWithCarrierPrivileges(int phoneId)1492 List<String> getPackagesWithCarrierPrivileges(int phoneId); 1493 1494 /** 1495 * Returns a list of packages that have carrier privileges. 1496 * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission 1497 */ getPackagesWithCarrierPrivilegesForAllPhones()1498 List<String> getPackagesWithCarrierPrivilegesForAllPhones(); 1499 1500 /** 1501 * Return the application ID for the app type. 1502 * 1503 * @param subId the subscription ID that this request applies to. 1504 * @param appType the uicc app type, 1505 * @return Application ID for specificied app type or null if no uicc or error. 1506 */ getAidForAppType(int subId, int appType)1507 String getAidForAppType(int subId, int appType); 1508 1509 /** 1510 * Return the Electronic Serial Number. 1511 * 1512 * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission 1513 * 1514 * @param subId the subscription ID that this request applies to. 1515 * @return ESN or null if error. 1516 * @hide 1517 */ getEsn(int subId)1518 String getEsn(int subId); 1519 1520 /** 1521 * Return the Preferred Roaming List Version 1522 * 1523 * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission 1524 * @param subId the subscription ID that this request applies to. 1525 * @return PRLVersion or null if error. 1526 * @hide 1527 * @deprecated Legacy CDMA is unsupported. 1528 */ getCdmaPrlVersion(int subId)1529 String getCdmaPrlVersion(int subId); 1530 1531 /** 1532 * Get snapshot of Telephony histograms 1533 * @return List of Telephony histograms 1534 * Requires Permission: 1535 * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} 1536 * Or the calling app has carrier privileges. 1537 */ getTelephonyHistograms()1538 List<TelephonyHistogram> getTelephonyHistograms(); 1539 1540 /** 1541 * Set the allowed carrier list and the excluded carrier list, indicating the priority between 1542 * the two lists. 1543 * 1544 * <p>Requires system privileges. In the future we may add this to carrier APIs. 1545 * 1546 * @return {@link #SET_CARRIER_RESTRICTION_SUCCESS} in case of success. 1547 * {@link #SET_CARRIER_RESTRICTION_NOT_SUPPORTED} if the modem does not support the 1548 * configuration. {@link #SET_CARRIER_RESTRICTION_ERROR} in all other error cases. 1549 */ setAllowedCarriers(in CarrierRestrictionRules carrierRestrictionRules)1550 int setAllowedCarriers(in CarrierRestrictionRules carrierRestrictionRules); 1551 1552 /** 1553 * Get the allowed carrier list and the excluded carrier list indicating the priority between 1554 * the two lists. 1555 * 1556 * <p>Requires system privileges. In the future we may add this to carrier APIs. 1557 * 1558 * @return {@link CarrierRestrictionRules}; empty lists mean all carriers are allowed. It 1559 * returns null in case of error. 1560 */ getAllowedCarriers()1561 CarrierRestrictionRules getAllowedCarriers(); 1562 1563 /** 1564 * Returns carrier id of the given subscription. 1565 * <p>To recognize carrier as a first class identity, assign each carrier with a canonical 1566 * integer a.k.a carrier id. 1567 * 1568 * @param subId The subscription id 1569 * @return Carrier id of given subscription id. return {@link #UNKNOWN_CARRIER_ID} if 1570 * subscription is unavailable or carrier cannot be identified. 1571 * @throws IllegalStateException if telephony service is unavailable. 1572 * @hide 1573 */ getSubscriptionCarrierId(int subId)1574 int getSubscriptionCarrierId(int subId); 1575 1576 /** 1577 * Returns carrier name of the given subscription. 1578 * <p>Carrier name is a user-facing name of carrier id {@link #getSimCarrierId(int)}, 1579 * usually the brand name of the subsidiary (e.g. T-Mobile). Each carrier could configure 1580 * multiple {@link #getSimOperatorName() SPN} but should have a single carrier name. 1581 * Carrier name is not canonical identity, use {@link #getSimCarrierId(int)} instead. 1582 * <p>Returned carrier name is unlocalized. 1583 * 1584 * @return Carrier name of given subscription id. return {@code null} if subscription is 1585 * unavailable or carrier cannot be identified. 1586 * @throws IllegalStateException if telephony service is unavailable. 1587 * @hide 1588 */ getSubscriptionCarrierName(int subId)1589 String getSubscriptionCarrierName(int subId); 1590 1591 /** 1592 * Returns fine-grained carrier id of the current subscription. 1593 * 1594 * <p>The specific carrier id can be used to further differentiate a carrier by different 1595 * networks, by prepaid v.s.postpaid or even by 4G v.s.3G plan. Each carrier has a unique 1596 * carrier id {@link #getSimCarrierId()} but can have multiple precise carrier id. e.g, 1597 * {@link #getSimCarrierId()} will always return Tracfone (id 2022) for a Tracfone SIM, while 1598 * {@link #getSimPreciseCarrierId()} can return Tracfone AT&T or Tracfone T-Mobile based on the 1599 * current underlying network. 1600 * 1601 * <p>For carriers without any fine-grained carrier ids, return {@link #getSimCarrierId()} 1602 * 1603 * @return Returns fine-grained carrier id of the current subscription. 1604 * Return {@link #UNKNOWN_CARRIER_ID} if the subscription is unavailable or the carrier cannot 1605 * be identified. 1606 * @hide 1607 */ getSubscriptionSpecificCarrierId(int subId)1608 int getSubscriptionSpecificCarrierId(int subId); 1609 1610 /** 1611 * Similar like {@link #getSimCarrierIdName()}, returns user-facing name of the 1612 * specific carrier id {@link #getSimSpecificCarrierId()} 1613 * 1614 * <p>The returned name is unlocalized. 1615 * 1616 * @return user-facing name of the subscription specific carrier id. Return {@code null} if the 1617 * subscription is unavailable or the carrier cannot be identified. 1618 * @hide 1619 */ getSubscriptionSpecificCarrierName(int subId)1620 String getSubscriptionSpecificCarrierName(int subId); 1621 1622 /** 1623 * Returns carrier id based on MCCMNC only. This will return a MNO carrier id used for fallback 1624 * check when exact carrier id {@link #getSimCarrierId()} configurations are not found 1625 * 1626 * @param isSubscriptionMccMnc. If {@true} it means this is a query for subscription mccmnc 1627 * {@false} otherwise. 1628 * 1629 * @return carrier id from passing mccmnc. 1630 * @hide 1631 */ getCarrierIdFromMccMnc(int slotIndex, String mccmnc, boolean isSubscriptionMccMnc)1632 int getCarrierIdFromMccMnc(int slotIndex, String mccmnc, boolean isSubscriptionMccMnc); 1633 1634 /** 1635 * Action set from carrier signalling broadcast receivers to enable/disable radio 1636 * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required 1637 * @param subId the subscription ID that this action applies to. 1638 * @param enabled control enable or disable radio. 1639 * @hide 1640 */ carrierActionSetRadioEnabled(int subId, boolean enabled)1641 void carrierActionSetRadioEnabled(int subId, boolean enabled); 1642 1643 /** 1644 * Action set from carrier signalling broadcast receivers to start/stop reporting default 1645 * network conditions. 1646 * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required 1647 * @param subId the subscription ID that this action applies to. 1648 * @param report control start/stop reporting default network events. 1649 * @hide 1650 */ carrierActionReportDefaultNetworkStatus(int subId, boolean report)1651 void carrierActionReportDefaultNetworkStatus(int subId, boolean report); 1652 1653 /** 1654 * Action set from carrier signalling broadcast receivers to reset all carrier actions. 1655 * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required 1656 * @param subId the subscription ID that this action applies to. 1657 * @hide 1658 */ carrierActionResetAll(int subId)1659 void carrierActionResetAll(int subId); 1660 getCallForwarding(int subId, int callForwardingReason, ICallForwardingInfoCallback callback)1661 void getCallForwarding(int subId, int callForwardingReason, 1662 ICallForwardingInfoCallback callback); 1663 setCallForwarding(int subId, in CallForwardingInfo callForwardingInfo, IIntegerConsumer callback)1664 void setCallForwarding(int subId, in CallForwardingInfo callForwardingInfo, 1665 IIntegerConsumer callback); 1666 getCallWaitingStatus(int subId, IIntegerConsumer callback)1667 void getCallWaitingStatus(int subId, IIntegerConsumer callback); 1668 setCallWaitingStatus(int subId, boolean enabled, IIntegerConsumer callback)1669 void setCallWaitingStatus(int subId, boolean enabled, IIntegerConsumer callback); 1670 1671 /** 1672 * Get Client request stats which will contain statistical information 1673 * on each request made by client. 1674 * @param callingPackage package making the call. 1675 * @param callingFeatureId The feature in the package. 1676 * @param subId Subscription index 1677 * @hide 1678 */ getClientRequestStats(String callingPackage, String callingFeatureId, int subid)1679 List<ClientRequestStats> getClientRequestStats(String callingPackage, String callingFeatureId, 1680 int subid); 1681 1682 /** 1683 * Set SIM card power state. 1684 * @param slotIndex SIM slot id 1685 * @param state State of SIM (power down, power up, pass through) 1686 * @hide 1687 */ setSimPowerStateForSlot(int slotIndex, int state)1688 void setSimPowerStateForSlot(int slotIndex, int state); 1689 1690 /** 1691 * Set SIM card power state. 1692 * @param slotIndex SIM slot id 1693 * @param state State of SIM (power down, power up, pass through) 1694 * @param callback callback to receive result info 1695 * @hide 1696 */ setSimPowerStateForSlotWithCallback(int slotIndex, int state, IIntegerConsumer callback)1697 void setSimPowerStateForSlotWithCallback(int slotIndex, int state, IIntegerConsumer callback); 1698 1699 /** 1700 * Returns a list of Forbidden PLMNs from the specified SIM App 1701 * Returns null if the query fails. 1702 * 1703 * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE 1704 * 1705 * @param subId subscription ID used for authentication 1706 * @param appType the icc application type, like {@link #APPTYPE_USIM} 1707 */ getForbiddenPlmns(int subId, int appType, String callingPackage, String callingFeatureId)1708 String[] getForbiddenPlmns(int subId, int appType, String callingPackage, 1709 String callingFeatureId); 1710 1711 /** 1712 * Set the forbidden PLMN list from the givven app type (ex APPTYPE_USIM) on a particular 1713 * subscription. 1714 * 1715 * @param subId subId the id of the subscription 1716 * @param appType appType the uicc app type, must be USIM or SIM. 1717 * @param fplmns plmns the Forbiden plmns list that needed to be written to the SIM. 1718 * @param callingPackage the op Package name. 1719 * @param callingFeatureId the feature in the package. 1720 * @return number of fplmns that is successfully written to the SIM 1721 */ setForbiddenPlmns(int subId, int appType, in List<String> fplmns, String callingPackage, String callingFeatureId)1722 int setForbiddenPlmns(int subId, int appType, in List<String> fplmns, String callingPackage, 1723 String callingFeatureId); 1724 1725 /** 1726 * Check if phone is in emergency callback mode 1727 * @return true if phone is in emergency callback mode 1728 * @param subId the subscription ID that this action applies to. 1729 * @hide 1730 */ getEmergencyCallbackMode(int subId)1731 boolean getEmergencyCallbackMode(int subId); 1732 1733 /** 1734 * Get the most recently available signal strength information. 1735 * 1736 * Get the most recent SignalStrength information reported by the modem. Due 1737 * to power saving this information may not always be current. 1738 * @param subId Subscription index 1739 * @return the most recent cached signal strength info from the modem 1740 * @hide 1741 */ getSignalStrength(int subId)1742 SignalStrength getSignalStrength(int subId); 1743 1744 /** 1745 * Get the card ID of the default eUICC card. If there is no eUICC, returns 1746 * {@link #INVALID_CARD_ID}. 1747 * 1748 * @param subId subscription ID used for authentication 1749 * @param callingPackage package making the call 1750 * @return card ID of the default eUICC card. 1751 */ getCardIdForDefaultEuicc(int subId, String callingPackage)1752 int getCardIdForDefaultEuicc(int subId, String callingPackage); 1753 1754 /** 1755 * Gets information about currently inserted UICCs and eUICCs. 1756 * <p> 1757 * Requires that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}). 1758 * <p> 1759 * If the caller has carrier priviliges on any active subscription, then they have permission to 1760 * get simple information like the card ID ({@link UiccCardInfo#getCardId()}), whether the card 1761 * is an eUICC ({@link UiccCardInfo#isEuicc()}), and the slot index where the card is inserted 1762 * ({@link UiccCardInfo#getSlotIndex()}). 1763 * <p> 1764 * To get private information such as the EID ({@link UiccCardInfo#getEid()}) or ICCID 1765 * ({@link UiccCardInfo#getIccId()}), the caller must have carrier priviliges on that specific 1766 * UICC or eUICC card. 1767 * <p> 1768 * See {@link UiccCardInfo} for more details on the kind of information available. 1769 * 1770 * @param callingPackage package making the call, used to evaluate carrier privileges 1771 * @return a list of UiccCardInfo objects, representing information on the currently inserted 1772 * UICCs and eUICCs. Each UiccCardInfo in the list will have private information filtered out if 1773 * the caller does not have adequate permissions for that card. 1774 */ getUiccCardsInfo(String callingPackage)1775 List<UiccCardInfo> getUiccCardsInfo(String callingPackage); 1776 1777 /** 1778 * Get slot info for all the UICC slots. 1779 * @return UiccSlotInfo array. 1780 * @hide 1781 */ getUiccSlotsInfo(String callingPackage)1782 UiccSlotInfo[] getUiccSlotsInfo(String callingPackage); 1783 1784 /** 1785 * Map logicalSlot to physicalSlot, and activate the physicalSlot if it is inactive. 1786 * @param physicalSlots Index i in the array representing physical slot for phone i. The array 1787 * size should be same as getPhoneCount(). 1788 * @deprecated Use {@link #setSimSlotMapping(in List<UiccSlotMapping> slotMapping)} instead. 1789 * @return boolean Return true if the switch succeeds, false if the switch fails. 1790 */ switchSlots(in int[] physicalSlots)1791 boolean switchSlots(in int[] physicalSlots); 1792 1793 /** 1794 * Maps the logical slots to the SlotPortMapping which consist of both physical slot index and 1795 * port index. Logical slot is the slot that is seen by modem. Physical slot is the actual 1796 * physical slot. Port index is the index (enumerated value) for the associated port available 1797 * on the SIM. Each physical slot can have multiple ports which enables multi-enabled profile 1798 * (MEP). If eUICC physical slot supports 2 ports, then the port index is numbered 0,1 and if 1799 * eUICC2 supports 4 ports then the port index is numbered 0,1,2,3. Each portId is unique within 1800 * a UICC physical slot but not necessarily unique across UICC’s. SEP(Single enabled profile) 1801 * eUICC and non-eUICC will only have port Index 0. 1802 * 1803 * Logical slots that are already mapped to the requested SlotPortMapping are not impacted. 1804 * @param slotMapping Index i in the list representing slot mapping for phone i. 1805 * 1806 * @return {@code true} if the switch succeeds, {@code false} if the switch fails. 1807 */ setSimSlotMapping(in List<UiccSlotMapping> slotMapping)1808 boolean setSimSlotMapping(in List<UiccSlotMapping> slotMapping); 1809 1810 /** 1811 * Returns whether mobile data roaming is enabled on the subscription with id {@code subId}. 1812 * 1813 * @param subId the subscription id 1814 * @return {@code true} if the data roaming is enabled on this subscription. 1815 */ isDataRoamingEnabled(int subId)1816 boolean isDataRoamingEnabled(int subId); 1817 1818 /** 1819 * Enables/Disables the data roaming on the subscription with id {@code subId}. 1820 * 1821 * @param subId the subscription id 1822 * @param isEnabled {@code true} to enable mobile data roaming, otherwise disable it. 1823 */ setDataRoamingEnabled(int subId, boolean isEnabled)1824 void setDataRoamingEnabled(int subId, boolean isEnabled); 1825 1826 /** 1827 * Gets the roaming mode for the CDMA phone with the subscription id {@code subId}. 1828 * 1829 * @param the subscription id. 1830 * @return the roaming mode for CDMA phone. 1831 * 1832 * @deprecated Legacy CDMA is unsupported. 1833 */ getCdmaRoamingMode(int subId)1834 int getCdmaRoamingMode(int subId); 1835 1836 /** 1837 * Sets the roaming mode on the CDMA phone with the subscription {@code subId} to the given 1838 * roaming mode {@code mode}. 1839 * 1840 * @param subId the subscription id. 1841 * @param mode the roaming mode should be set. 1842 * @return {@code true} if successed. 1843 * 1844 * @deprecated Legacy CDMA is unsupported. 1845 */ setCdmaRoamingMode(int subId, int mode)1846 boolean setCdmaRoamingMode(int subId, int mode); 1847 1848 /** 1849 * Gets the subscription mode for the CDMA phone with the subscription id {@code subId}. 1850 * 1851 * @param the subscription id. 1852 * @return the subscription mode for CDMA phone. 1853 * 1854 * @deprecated Legacy CDMA is unsupported. 1855 */ getCdmaSubscriptionMode(int subId)1856 int getCdmaSubscriptionMode(int subId); 1857 1858 /** 1859 * Sets the subscription mode for CDMA phone with the subscription {@code subId} to the given 1860 * subscription mode {@code mode}. 1861 * 1862 * @param subId the subscription id. 1863 * @param mode the subscription mode should be set. 1864 * @return {@code true} if successed. 1865 * 1866 * @deprecated Legacy CDMA is unsupported. 1867 */ setCdmaSubscriptionMode(int subId, int mode)1868 boolean setCdmaSubscriptionMode(int subId, int mode); 1869 1870 /** 1871 * A test API to override carrier information including mccmnc, imsi, iccid, gid1, gid2, 1872 * plmn and spn. This would be handy for, eg, forcing a particular carrier id, carrier's config 1873 * (also any country or carrier overlays) to be loaded when using a test SIM with a call box. 1874 */ setCarrierTestOverride(int subId, String mccmnc, String imsi, String iccid, String gid1, String gid2, String plmn, String spn, String carrierPrivilegeRules, String apn)1875 void setCarrierTestOverride(int subId, String mccmnc, String imsi, String iccid, String gid1, 1876 String gid2, String plmn, String spn, String carrierPrivilegeRules, String apn); 1877 1878 /** 1879 * Forcibly sets a package as a carrier provisioning package. 1880 * 1881 * This override is ephemeral, and will disappear upon phone process restart (including 1882 * device reboot). 1883 * 1884 * WARNING: This API is meant for testing purposes only. This enables automated testing for 1885 * cases where the carrier service package is used as a permissioning gate for features such as 1886 * restricted carrier network access (restricted APNs and Merged Carrier Wifi) 1887 * 1888 * @param carrierServicePackage The package that should be marked as the carrier service 1889 * package, or {@code null} to disable the override. 1890 */ setCarrierServicePackageOverride(int subId, String carrierServicePackage, String callingPackage)1891 void setCarrierServicePackageOverride(int subId, String carrierServicePackage, 1892 String callingPackage); 1893 1894 /** 1895 * A test API to return installed carrier id list version. 1896 */ getCarrierIdListVersion(int subId)1897 int getCarrierIdListVersion(int subId); 1898 1899 /** 1900 * A test API to reload the UICC profile. 1901 * @hide 1902 */ refreshUiccProfile(int subId)1903 void refreshUiccProfile(int subId); 1904 1905 /** 1906 * How many modems can have simultaneous data connections. 1907 * @hide 1908 */ getNumberOfModemsWithSimultaneousDataConnections(int subId, String callingPackage, String callingFeatureId)1909 int getNumberOfModemsWithSimultaneousDataConnections(int subId, String callingPackage, 1910 String callingFeatureId); 1911 1912 /** 1913 * Return the network selection mode on the subscription with id {@code subId}. 1914 */ getNetworkSelectionMode(int subId)1915 int getNetworkSelectionMode(int subId); 1916 1917 /** 1918 * Return true if the device is in emergency sms mode, false otherwise. 1919 */ isInEmergencySmsMode()1920 boolean isInEmergencySmsMode(); 1921 1922 /** 1923 * Return the modem radio power state for slot index. 1924 * 1925 */ getRadioPowerState(int slotIndex, String callingPackage, String callingFeatureId)1926 int getRadioPowerState(int slotIndex, String callingPackage, String callingFeatureId); 1927 1928 // IMS specific AIDL commands, see ImsMmTelManager.java 1929 1930 /** 1931 * Adds an IMS registration status callback for the subscription id specified. 1932 */ registerImsRegistrationCallback(int subId, IImsRegistrationCallback c)1933 void registerImsRegistrationCallback(int subId, IImsRegistrationCallback c); 1934 /** 1935 * Removes an existing IMS registration status callback for the subscription specified. 1936 */ unregisterImsRegistrationCallback(int subId, IImsRegistrationCallback c)1937 void unregisterImsRegistrationCallback(int subId, IImsRegistrationCallback c); 1938 1939 /** 1940 * Adds an IMS emergency registration status callback for the subscription id specified. 1941 */ registerImsEmergencyRegistrationCallback(int subId, IImsRegistrationCallback c)1942 void registerImsEmergencyRegistrationCallback(int subId, IImsRegistrationCallback c); 1943 /** 1944 * Removes an existing IMS emergency registration status callback for the subscription 1945 * id specified. 1946 */ unregisterImsEmergencyRegistrationCallback(int subId, IImsRegistrationCallback c)1947 void unregisterImsEmergencyRegistrationCallback(int subId, IImsRegistrationCallback c); 1948 1949 /** 1950 * Get the IMS service registration state for the MmTelFeature associated with this sub id. 1951 */ getImsMmTelRegistrationState(int subId, IIntegerConsumer consumer)1952 void getImsMmTelRegistrationState(int subId, IIntegerConsumer consumer); 1953 1954 /** 1955 * Get the transport type for the IMS service registration state. 1956 */ getImsMmTelRegistrationTransportType(int subId, IIntegerConsumer consumer)1957 void getImsMmTelRegistrationTransportType(int subId, IIntegerConsumer consumer); 1958 1959 /** 1960 * Adds an IMS MmTel capabilities callback for the subscription specified. 1961 */ registerMmTelCapabilityCallback(int subId, IImsCapabilityCallback c)1962 void registerMmTelCapabilityCallback(int subId, IImsCapabilityCallback c); 1963 1964 /** 1965 * Removes an existing IMS MmTel capabilities callback for the subscription specified. 1966 */ unregisterMmTelCapabilityCallback(int subId, IImsCapabilityCallback c)1967 void unregisterMmTelCapabilityCallback(int subId, IImsCapabilityCallback c); 1968 1969 /** 1970 * return true if the IMS MmTel capability for the given registration tech is capable. 1971 */ isCapable(int subId, int capability, int regTech)1972 boolean isCapable(int subId, int capability, int regTech); 1973 1974 /** 1975 * return true if the IMS MmTel capability for the given registration tech is available. 1976 */ isAvailable(int subId, int capability, int regTech)1977 boolean isAvailable(int subId, int capability, int regTech); 1978 1979 /** 1980 * Return whether or not the MmTel capability is supported for the requested transport type. 1981 */ isMmTelCapabilitySupported(int subId, IIntegerConsumer callback, int capability, int transportType)1982 void isMmTelCapabilitySupported(int subId, IIntegerConsumer callback, int capability, 1983 int transportType); 1984 1985 /** 1986 * Returns true if the user's setting for 4G LTE is enabled, for the subscription specified. 1987 */ isAdvancedCallingSettingEnabled(int subId)1988 boolean isAdvancedCallingSettingEnabled(int subId); 1989 1990 /** 1991 * Modify the user's setting for whether or not 4G LTE is enabled. 1992 */ setAdvancedCallingSettingEnabled(int subId, boolean isEnabled)1993 void setAdvancedCallingSettingEnabled(int subId, boolean isEnabled); 1994 1995 /** 1996 * return true if the user's setting for VT is enabled for the subscription. 1997 */ isVtSettingEnabled(int subId)1998 boolean isVtSettingEnabled(int subId); 1999 2000 /** 2001 * Modify the user's setting for whether or not VT is available for the subscrption specified. 2002 */ setVtSettingEnabled(int subId, boolean isEnabled)2003 void setVtSettingEnabled(int subId, boolean isEnabled); 2004 2005 /** 2006 * return true if the user's setting for whether or not Voice over WiFi is currently enabled. 2007 */ isVoWiFiSettingEnabled(int subId)2008 boolean isVoWiFiSettingEnabled(int subId); 2009 2010 /** 2011 * sets the user's setting for Voice over WiFi enabled state. 2012 */ setVoWiFiSettingEnabled(int subId, boolean isEnabled)2013 void setVoWiFiSettingEnabled(int subId, boolean isEnabled); 2014 2015 /** 2016 * return true if the user's setting for Voice over Cross SIM is enabled and false if it is not 2017 */ isCrossSimCallingEnabledByUser(int subId)2018 boolean isCrossSimCallingEnabledByUser(int subId); 2019 2020 /** 2021 * Sets the user's setting for whether or not Voice over Cross SIM is enabled. 2022 */ setCrossSimCallingEnabled(int subId, boolean isEnabled)2023 void setCrossSimCallingEnabled(int subId, boolean isEnabled); 2024 2025 /** 2026 * return true if the user's setting for Voice over WiFi while roaming is enabled. 2027 */ isVoWiFiRoamingSettingEnabled(int subId)2028 boolean isVoWiFiRoamingSettingEnabled(int subId); 2029 2030 /** 2031 * Sets the user's preference for whether or not Voice over WiFi is enabled for the current 2032 * subscription while roaming. 2033 */ setVoWiFiRoamingSettingEnabled(int subId, boolean isEnabled)2034 void setVoWiFiRoamingSettingEnabled(int subId, boolean isEnabled); 2035 2036 /** 2037 * Set the Voice over WiFi enabled state, but do not persist the setting. 2038 */ setVoWiFiNonPersistent(int subId, boolean isCapable, int mode)2039 void setVoWiFiNonPersistent(int subId, boolean isCapable, int mode); 2040 2041 /** 2042 * return the Voice over WiFi mode preference set by the user for the subscription specified. 2043 */ getVoWiFiModeSetting(int subId)2044 int getVoWiFiModeSetting(int subId); 2045 2046 /** 2047 * sets the user's preference for the Voice over WiFi mode for the subscription specified. 2048 */ setVoWiFiModeSetting(int subId, int mode)2049 void setVoWiFiModeSetting(int subId, int mode); 2050 2051 /** 2052 * return the Voice over WiFi mode preference set by the user for the subscription specified 2053 * while roaming. 2054 */ getVoWiFiRoamingModeSetting(int subId)2055 int getVoWiFiRoamingModeSetting(int subId); 2056 2057 /** 2058 * sets the user's preference for the Voice over WiFi mode for the subscription specified 2059 * while roaming. 2060 */ setVoWiFiRoamingModeSetting(int subId, int mode)2061 void setVoWiFiRoamingModeSetting(int subId, int mode); 2062 2063 /** 2064 * Modify the user's setting for whether or not RTT is enabled for the subscrption specified. 2065 */ setRttCapabilitySetting(int subId, boolean isEnabled)2066 void setRttCapabilitySetting(int subId, boolean isEnabled); 2067 2068 /** 2069 * return true if TTY over VoLTE is enabled for the subscription specified. 2070 */ isTtyOverVolteEnabled(int subId)2071 boolean isTtyOverVolteEnabled(int subId); 2072 2073 /** 2074 * Return the emergency number list from all the active subscriptions. 2075 */ 2076 @SuppressWarnings(value={"untyped-collection"}) getEmergencyNumberList(String callingPackage, String callingFeatureId)2077 Map getEmergencyNumberList(String callingPackage, String callingFeatureId); 2078 2079 /** 2080 * Identify if the number is emergency number, based on all the active subscriptions. 2081 */ isEmergencyNumber(String number, boolean exactMatch)2082 boolean isEmergencyNumber(String number, boolean exactMatch); 2083 2084 /** 2085 * Return a list of certs in hex string from loaded carrier privileges access rules. 2086 */ getCertsFromCarrierPrivilegeAccessRules(int subId)2087 List<String> getCertsFromCarrierPrivilegeAccessRules(int subId); 2088 2089 /** 2090 * Register an IMS provisioning change callback with Telephony. 2091 */ registerImsProvisioningChangedCallback(int subId, IImsConfigCallback callback)2092 void registerImsProvisioningChangedCallback(int subId, IImsConfigCallback callback); 2093 2094 /** 2095 * unregister an existing IMS provisioning change callback. 2096 */ unregisterImsProvisioningChangedCallback(int subId, IImsConfigCallback callback)2097 void unregisterImsProvisioningChangedCallback(int subId, IImsConfigCallback callback); 2098 2099 /** 2100 * Register an IMS provisioning change callback with Telephony. 2101 */ registerFeatureProvisioningChangedCallback(int subId, IFeatureProvisioningCallback callback)2102 void registerFeatureProvisioningChangedCallback(int subId, 2103 IFeatureProvisioningCallback callback); 2104 2105 /** 2106 * unregister an existing IMS provisioning change callback. 2107 */ unregisterFeatureProvisioningChangedCallback(int subId, IFeatureProvisioningCallback callback)2108 void unregisterFeatureProvisioningChangedCallback(int subId, 2109 IFeatureProvisioningCallback callback); 2110 2111 /** 2112 * Set the provisioning status for the IMS MmTel capability using the specified subscription. 2113 */ setImsProvisioningStatusForCapability(int subId, int capability, int tech, boolean isProvisioned)2114 void setImsProvisioningStatusForCapability(int subId, int capability, int tech, 2115 boolean isProvisioned); 2116 2117 /** 2118 * Get the provisioning status for the IMS MmTel capability specified. 2119 */ getImsProvisioningStatusForCapability(int subId, int capability, int tech)2120 boolean getImsProvisioningStatusForCapability(int subId, int capability, int tech); 2121 2122 /** 2123 * Get the provisioning status for the IMS Rcs capability specified. 2124 */ getRcsProvisioningStatusForCapability(int subId, int capability, int tech)2125 boolean getRcsProvisioningStatusForCapability(int subId, int capability, int tech); 2126 2127 /** 2128 * Set the provisioning status for the IMS Rcs capability using the specified subscription. 2129 */ setRcsProvisioningStatusForCapability(int subId, int capability, int tech, boolean isProvisioned)2130 void setRcsProvisioningStatusForCapability(int subId, int capability, int tech, 2131 boolean isProvisioned); 2132 2133 /** 2134 * Return an integer containing the provisioning value for the specified provisioning key. 2135 */ getImsProvisioningInt(int subId, int key)2136 int getImsProvisioningInt(int subId, int key); 2137 2138 /** 2139 * return a String containing the provisioning value for the provisioning key specified. 2140 */ getImsProvisioningString(int subId, int key)2141 String getImsProvisioningString(int subId, int key); 2142 2143 /** 2144 * Set the integer provisioning value for the provisioning key specified. 2145 */ setImsProvisioningInt(int subId, int key, int value)2146 int setImsProvisioningInt(int subId, int key, int value); 2147 2148 /** 2149 * Set the String provisioning value for the provisioning key specified. 2150 */ setImsProvisioningString(int subId, int key, String value)2151 int setImsProvisioningString(int subId, int key, String value); 2152 2153 /** 2154 * Start emergency callback mode for testing. 2155 */ startEmergencyCallbackMode()2156 void startEmergencyCallbackMode(); 2157 2158 /** 2159 * Update Emergency Number List for Test Mode. 2160 */ updateEmergencyNumberListTestMode(int action, in EmergencyNumber num)2161 void updateEmergencyNumberListTestMode(int action, in EmergencyNumber num); 2162 2163 /** 2164 * Get the full emergency number list for Test Mode. 2165 */ getEmergencyNumberListTestMode()2166 List<String> getEmergencyNumberListTestMode(); 2167 2168 /** 2169 * A test API to return the emergency number db version. 2170 */ getEmergencyNumberDbVersion(int subId)2171 int getEmergencyNumberDbVersion(int subId); 2172 2173 /** 2174 * Notify Telephony for OTA emergency number database installation complete. 2175 */ notifyOtaEmergencyNumberDbInstalled()2176 void notifyOtaEmergencyNumberDbInstalled(); 2177 2178 /** 2179 * Override a customized file partition name for OTA emergency number database. 2180 */ updateOtaEmergencyNumberDbFilePath(in ParcelFileDescriptor otaParcelFileDescriptor)2181 void updateOtaEmergencyNumberDbFilePath(in ParcelFileDescriptor otaParcelFileDescriptor); 2182 2183 /** 2184 * Reset file partition to default for OTA emergency number database. 2185 */ resetOtaEmergencyNumberDbFilePath()2186 void resetOtaEmergencyNumberDbFilePath(); 2187 2188 /** 2189 * Enable or disable a logical modem stack associated with the slotIndex. 2190 */ enableModemForSlot(int slotIndex, boolean enable)2191 boolean enableModemForSlot(int slotIndex, boolean enable); 2192 2193 /** 2194 * Indicate if the enablement of multi SIM functionality is restricted. 2195 * @hide 2196 */ setMultiSimCarrierRestriction(boolean isMultiSimCarrierRestricted)2197 void setMultiSimCarrierRestriction(boolean isMultiSimCarrierRestricted); 2198 2199 /** 2200 * Returns if the usage of multiple SIM cards at the same time is supported. 2201 * 2202 * @param callingPackage The package making the call. 2203 * @param callingFeatureId The feature in the package. 2204 * @return {@link #MULTISIM_ALLOWED} if the device supports multiple SIMs. 2205 * {@link #MULTISIM_NOT_SUPPORTED_BY_HARDWARE} if the device does not support multiple SIMs. 2206 * {@link #MULTISIM_NOT_SUPPORTED_BY_CARRIER} in the device supports multiple SIMs, but the 2207 * functionality is restricted by the carrier. 2208 */ isMultiSimSupported(String callingPackage, String callingFeatureId)2209 int isMultiSimSupported(String callingPackage, String callingFeatureId); 2210 2211 /** 2212 * Switch configs to enable multi-sim or switch back to single-sim 2213 * @hide 2214 */ switchMultiSimConfig(int numOfSims)2215 void switchMultiSimConfig(int numOfSims); 2216 2217 /** 2218 * Get if altering modems configurations will trigger reboot. 2219 * @hide 2220 */ doesSwitchMultiSimConfigTriggerReboot(int subId, String callingPackage, String callingFeatureId)2221 boolean doesSwitchMultiSimConfigTriggerReboot(int subId, String callingPackage, 2222 String callingFeatureId); 2223 2224 /** 2225 * Get the mapping from logical slots to port index. 2226 */ getSlotsMapping(String callingPackage)2227 List<UiccSlotMapping> getSlotsMapping(String callingPackage); 2228 2229 /** 2230 * Get the IRadio HAL Version encoded as 100 * MAJOR_VERSION + MINOR_VERSION or -1 if unknown 2231 */ getRadioHalVersion()2232 int getRadioHalVersion(); 2233 2234 /** 2235 * Get the HAL Version of a specific service 2236 * encoded as 100 * MAJOR_VERSION + MINOR_VERSION or -1 if unknown 2237 */ getHalVersion(int service)2238 int getHalVersion(int service); 2239 2240 /** 2241 * Get the current calling package name. 2242 */ getCurrentPackageName()2243 String getCurrentPackageName(); 2244 2245 /** 2246 * Returns true if the specified type of application (e.g. {@link #APPTYPE_CSIM} is present 2247 * on the UICC card. 2248 * @hide 2249 */ isApplicationOnUicc(int subId, int appType)2250 boolean isApplicationOnUicc(int subId, int appType); 2251 isModemEnabledForSlot(int slotIndex, String callingPackage, String callingFeatureId)2252 boolean isModemEnabledForSlot(int slotIndex, String callingPackage, String callingFeatureId); 2253 isDataEnabledForApn(int apnType, int subId, String callingPackage)2254 boolean isDataEnabledForApn(int apnType, int subId, String callingPackage); 2255 isApnMetered(int apnType, int subId)2256 boolean isApnMetered(int apnType, int subId); 2257 setSystemSelectionChannels(in List<RadioAccessSpecifier> specifiers, int subId, IBooleanConsumer resultCallback)2258 oneway void setSystemSelectionChannels(in List<RadioAccessSpecifier> specifiers, 2259 int subId, IBooleanConsumer resultCallback); 2260 getSystemSelectionChannels(int subId)2261 List<RadioAccessSpecifier> getSystemSelectionChannels(int subId); 2262 isMvnoMatched(int slotIndex, int mvnoType, String mvnoMatchData)2263 boolean isMvnoMatched(int slotIndex, int mvnoType, String mvnoMatchData); 2264 2265 /** 2266 * Enqueue a pending sms Consumer, which will answer with the user specified selection for an 2267 * outgoing SmsManager operation. 2268 */ enqueueSmsPickResult(String callingPackage, String callingAttributeTag, IIntegerConsumer subIdResult)2269 oneway void enqueueSmsPickResult(String callingPackage, String callingAttributeTag, 2270 IIntegerConsumer subIdResult); 2271 2272 /** 2273 * Show error dialog to switch to managed profile. 2274 */ showSwitchToManagedProfileDialog()2275 oneway void showSwitchToManagedProfileDialog(); 2276 2277 /** 2278 * Returns the MMS user agent. 2279 */ getMmsUserAgent(int subId)2280 String getMmsUserAgent(int subId); 2281 2282 /** 2283 * Returns the MMS user agent profile URL. 2284 */ getMmsUAProfUrl(int subId)2285 String getMmsUAProfUrl(int subId); 2286 setMobileDataPolicyEnabled(int subscriptionId, int policy, boolean enabled)2287 void setMobileDataPolicyEnabled(int subscriptionId, int policy, boolean enabled); 2288 isMobileDataPolicyEnabled(int subscriptionId, int policy)2289 boolean isMobileDataPolicyEnabled(int subscriptionId, int policy); 2290 2291 /** 2292 * Command line command to enable or disable handling of CEP data for test purposes. 2293 */ setCepEnabled(boolean isCepEnabled)2294 oneway void setCepEnabled(boolean isCepEnabled); 2295 2296 /** 2297 * Notify Rcs auto config received. 2298 */ notifyRcsAutoConfigurationReceived(int subId, in byte[] config, boolean isCompressed)2299 void notifyRcsAutoConfigurationReceived(int subId, in byte[] config, boolean isCompressed); 2300 isIccLockEnabled(int subId)2301 boolean isIccLockEnabled(int subId); 2302 setIccLockEnabled(int subId, boolean enabled, String password)2303 int setIccLockEnabled(int subId, boolean enabled, String password); 2304 changeIccLockPassword(int subId, String oldPassword, String newPassword)2305 int changeIccLockPassword(int subId, String oldPassword, String newPassword); 2306 2307 /** 2308 * Request for receiving user activity notification 2309 */ requestUserActivityNotification()2310 oneway void requestUserActivityNotification(); 2311 2312 /** 2313 * Called when userActivity is signalled in the power manager. 2314 * This is safe to call from any thread, with any window manager locks held or not. 2315 */ userActivity()2316 oneway void userActivity(); 2317 2318 /** 2319 * Get the user manual network selection. 2320 * Return null if inactive or phone process is down. 2321 * 2322 * @param subId the id of the subscription 2323 * @return operatorinfo on success 2324 */ getManualNetworkSelectionPlmn(int subId)2325 String getManualNetworkSelectionPlmn(int subId); 2326 2327 /** 2328 * Whether device can connect to 5G network when two SIMs are active. 2329 */ canConnectTo5GInDsdsMode()2330 boolean canConnectTo5GInDsdsMode(); 2331 2332 /** 2333 * Returns a list of the equivalent home PLMNs (EF_EHPLMN) from the USIM app. 2334 * 2335 * @return A list of equivalent home PLMNs. Returns an empty list if EF_EHPLMN is empty or 2336 * does not exist on the SIM card. 2337 */ getEquivalentHomePlmns(int subId, String callingPackage, String callingFeatureId)2338 List<String> getEquivalentHomePlmns(int subId, String callingPackage, String callingFeatureId); 2339 2340 /** 2341 * Enable or disable Voice over NR (VoNR) 2342 * @param subId the subscription ID that this action applies to. 2343 * @param enabled enable or disable VoNR. 2344 * @return operation result. 2345 */ setVoNrEnabled(int subId, boolean enabled)2346 int setVoNrEnabled(int subId, boolean enabled); 2347 2348 /** 2349 * Is voice over NR enabled 2350 * @return true if VoNR is enabled else false 2351 */ isVoNrEnabled(int subId)2352 boolean isVoNrEnabled(int subId); 2353 2354 /** 2355 * Enable/Disable E-UTRA-NR Dual Connectivity 2356 * @return operation result. See TelephonyManager.EnableNrDualConnectivityResult for 2357 * details 2358 * @param subId the id of the subscription 2359 * @param enable enable/disable dual connectivity 2360 */ setNrDualConnectivityState(int subId, int nrDualConnectivityState)2361 int setNrDualConnectivityState(int subId, int nrDualConnectivityState); 2362 2363 /** 2364 * Is E-UTRA-NR Dual Connectivity enabled 2365 * @param subId the id of the subscription 2366 * @return true if dual connectivity is enabled else false 2367 */ isNrDualConnectivityEnabled(int subId)2368 boolean isNrDualConnectivityEnabled(int subId); 2369 2370 /** 2371 * Checks whether the device supports the given capability on the radio interface. 2372 * 2373 * @param capability the name of the capability 2374 * @return the availability of the capability 2375 */ isRadioInterfaceCapabilitySupported(String capability)2376 boolean isRadioInterfaceCapabilitySupported(String capability); 2377 2378 /** 2379 * Thermal mitigation request to control functionalities at modem. 2380 * 2381 * @param subId the id of the subscription 2382 * @param thermalMitigationRequest holds the parameters necessary for the request. 2383 * @param callingPackage the package name of the calling package. 2384 * @throws InvalidThermalMitigationRequestException if the parametes are invalid. 2385 */ sendThermalMitigationRequest(int subId, in ThermalMitigationRequest thermalMitigationRequest, String callingPackage)2386 int sendThermalMitigationRequest(int subId, 2387 in ThermalMitigationRequest thermalMitigationRequest, 2388 String callingPackage); 2389 2390 /** 2391 * get the Generic Bootstrapping Architecture authentication keys 2392 */ bootstrapAuthenticationRequest(int subId, int appType, in Uri nafUrl, in UaSecurityProtocolIdentifier securityProtocol, boolean forceBootStrapping, IBootstrapAuthenticationCallback callback)2393 void bootstrapAuthenticationRequest(int subId, int appType, in Uri nafUrl, 2394 in UaSecurityProtocolIdentifier securityProtocol, 2395 boolean forceBootStrapping, IBootstrapAuthenticationCallback callback); 2396 2397 /** 2398 * Set the GbaService Package Name that Telephony will bind to. 2399 */ setBoundGbaServiceOverride(int subId, String packageName)2400 boolean setBoundGbaServiceOverride(int subId, String packageName); 2401 2402 /** 2403 * Return the package name of the currently bound GbaService. 2404 */ getBoundGbaService(int subId)2405 String getBoundGbaService(int subId); 2406 2407 /** 2408 * Set the release time for telephony to unbind GbaService. 2409 */ setGbaReleaseTimeOverride(int subId, int interval)2410 boolean setGbaReleaseTimeOverride(int subId, int interval); 2411 2412 /** 2413 * Return the release time for telephony to unbind GbaService. 2414 */ getGbaReleaseTime(int subId)2415 int getGbaReleaseTime(int subId); 2416 2417 /** 2418 * Provide the client configuration parameters of the RCS application. 2419 */ setRcsClientConfiguration(int subId, in RcsClientConfiguration rcc)2420 void setRcsClientConfiguration(int subId, in RcsClientConfiguration rcc); 2421 2422 /** 2423 * return value to indicate whether the device and the carrier can support RCS VoLTE 2424 * single registration. 2425 */ isRcsVolteSingleRegistrationCapable(int subId)2426 boolean isRcsVolteSingleRegistrationCapable(int subId); 2427 2428 /** 2429 * Register RCS provisioning callback. 2430 */ registerRcsProvisioningCallback(int subId, IRcsConfigCallback callback)2431 void registerRcsProvisioningCallback(int subId, IRcsConfigCallback callback); 2432 2433 /** 2434 * Unregister RCS provisioning callback. 2435 */ unregisterRcsProvisioningCallback(int subId, IRcsConfigCallback callback)2436 void unregisterRcsProvisioningCallback(int subId, IRcsConfigCallback callback); 2437 2438 /** 2439 * trigger RCS reconfiguration. 2440 */ triggerRcsReconfiguration(int subId)2441 void triggerRcsReconfiguration(int subId); 2442 2443 /** 2444 * Enables or disables the test mode for RCS VoLTE single registration. 2445 */ setRcsSingleRegistrationTestModeEnabled(boolean enabled)2446 void setRcsSingleRegistrationTestModeEnabled(boolean enabled); 2447 2448 /** 2449 * Gets the test mode for RCS VoLTE single registration. 2450 */ getRcsSingleRegistrationTestModeEnabled()2451 boolean getRcsSingleRegistrationTestModeEnabled(); 2452 2453 /** 2454 * Overrides the config of RCS VoLTE single registration enabled for the device. 2455 */ setDeviceSingleRegistrationEnabledOverride(String enabled)2456 void setDeviceSingleRegistrationEnabledOverride(String enabled); 2457 2458 /** 2459 * Gets the config of RCS VoLTE single registration enabled for the device. 2460 */ getDeviceSingleRegistrationEnabled()2461 boolean getDeviceSingleRegistrationEnabled(); 2462 2463 /** 2464 * Overrides the config of RCS VoLTE single registration enabled for the carrier/subscription. 2465 */ setCarrierSingleRegistrationEnabledOverride(int subId, String enabled)2466 boolean setCarrierSingleRegistrationEnabledOverride(int subId, String enabled); 2467 2468 /** 2469 * Sends a device to device message; only for use through shell. 2470 */ sendDeviceToDeviceMessage(int message, int value)2471 void sendDeviceToDeviceMessage(int message, int value); 2472 2473 /** 2474 * Sets the specified transport active; only for use through shell. 2475 */ setActiveDeviceToDeviceTransport(String transport)2476 void setActiveDeviceToDeviceTransport(String transport); 2477 2478 /** 2479 * Forces Device to Device communication to be enabled, even if the device config has it 2480 * disabled. 2481 */ setDeviceToDeviceForceEnabled(boolean isForceEnabled)2482 void setDeviceToDeviceForceEnabled(boolean isForceEnabled); 2483 2484 /** 2485 * Gets the config of RCS VoLTE single registration enabled for the carrier/subscription. 2486 */ getCarrierSingleRegistrationEnabled(int subId)2487 boolean getCarrierSingleRegistrationEnabled(int subId); 2488 2489 /** 2490 * Overrides the ims feature validation result 2491 */ setImsFeatureValidationOverride(int subId, String enabled)2492 boolean setImsFeatureValidationOverride(int subId, String enabled); 2493 2494 /** 2495 * Gets the ims feature validation override value 2496 */ getImsFeatureValidationOverride(int subId)2497 boolean getImsFeatureValidationOverride(int subId); 2498 2499 /** 2500 * Return the mobile provisioning url that is used to launch a browser to allow users to manage 2501 * their mobile plan. 2502 */ getMobileProvisioningUrl()2503 String getMobileProvisioningUrl(); 2504 2505 /* 2506 * Remove the EAB contacts from the EAB database. 2507 */ removeContactFromEab(int subId, String contacts)2508 int removeContactFromEab(int subId, String contacts); 2509 2510 /** 2511 * Get the EAB contact from the EAB database. 2512 */ getContactFromEab(String contact)2513 String getContactFromEab(String contact); 2514 2515 /** 2516 * Get the EAB capability from the EAB database. 2517 */ getCapabilityFromEab(String contact)2518 String getCapabilityFromEab(String contact); 2519 2520 /* 2521 * Check whether the device supports RCS User Capability Exchange or not. 2522 */ getDeviceUceEnabled()2523 boolean getDeviceUceEnabled(); 2524 2525 /* 2526 * Set the device supports RCS User Capability Exchange. 2527 */ setDeviceUceEnabled(boolean isEnabled)2528 void setDeviceUceEnabled(boolean isEnabled); 2529 2530 /** 2531 * Add feature tags to the IMS registration being tracked by UCE and potentially 2532 * generate a new PUBLISH to the network. 2533 * Note: This is designed for a SHELL command only. 2534 */ addUceRegistrationOverrideShell(int subId, in List<String> featureTags)2535 RcsContactUceCapability addUceRegistrationOverrideShell(int subId, in List<String> featureTags); 2536 2537 /** 2538 * Remove feature tags from the IMS registration being tracked by UCE and potentially 2539 * generate a new PUBLISH to the network. 2540 * Note: This is designed for a SHELL command only. 2541 */ removeUceRegistrationOverrideShell(int subId, in List<String> featureTags)2542 RcsContactUceCapability removeUceRegistrationOverrideShell(int subId, 2543 in List<String> featureTags); 2544 2545 /** 2546 * Clear overridden feature tags in the IMS registration being tracked by UCE and potentially 2547 * generate a new PUBLISH to the network. 2548 * Note: This is designed for a SHELL command only. 2549 */ clearUceRegistrationOverrideShell(int subId)2550 RcsContactUceCapability clearUceRegistrationOverrideShell(int subId); 2551 2552 /** 2553 * Get the latest RcsContactUceCapability structure that is used in SIP PUBLISH procedures. 2554 * Note: This is designed for a SHELL command only. 2555 */ getLatestRcsContactUceCapabilityShell(int subId)2556 RcsContactUceCapability getLatestRcsContactUceCapabilityShell(int subId); 2557 2558 /** 2559 * Returns the last PIDF XML sent to the network during the last PUBLISH or "none" if the 2560 * device does not have an active PUBLISH. 2561 * Note: This is designed for a SHELL command only. 2562 */ getLastUcePidfXmlShell(int subId)2563 String getLastUcePidfXmlShell(int subId); 2564 2565 /** 2566 * Remove UCE requests cannot be sent to the network status. 2567 * Note: This is designed for a SHELL command only. 2568 */ removeUceRequestDisallowedStatus(int subId)2569 boolean removeUceRequestDisallowedStatus(int subId); 2570 2571 /** 2572 * Set the timeout for contact capabilities request. 2573 * Note: This is designed for a SHELL command only. 2574 */ setCapabilitiesRequestTimeout(int subId, long timeoutAfterMs)2575 boolean setCapabilitiesRequestTimeout(int subId, long timeoutAfterMs); 2576 2577 /** 2578 * Set a SignalStrengthUpdateRequest to receive notification when Signal Strength breach the 2579 * specified thresholds. 2580 */ setSignalStrengthUpdateRequest(int subId, in SignalStrengthUpdateRequest request, String callingPackage)2581 void setSignalStrengthUpdateRequest(int subId, in SignalStrengthUpdateRequest request, 2582 String callingPackage); 2583 2584 /** 2585 * Clear a SignalStrengthUpdateRequest from system. 2586 */ clearSignalStrengthUpdateRequest(int subId, in SignalStrengthUpdateRequest request, String callingPackage)2587 void clearSignalStrengthUpdateRequest(int subId, in SignalStrengthUpdateRequest request, 2588 String callingPackage); 2589 2590 /** 2591 * Gets the current phone capability. 2592 */ getPhoneCapability()2593 PhoneCapability getPhoneCapability(); 2594 2595 /** 2596 * Prepare TelephonyManager for an unattended reboot. The reboot is 2597 * required to be done shortly after the API is invoked. 2598 * 2599 * Requires system privileges. 2600 * 2601 * @return {@link #PREPARE_UNATTENDED_REBOOT_SUCCESS} in case of success. 2602 * {@link #PREPARE_UNATTENDED_REBOOT_PIN_REQUIRED} if the device contains 2603 * at least one SIM card for which the user needs to manually enter the PIN 2604 * code after the reboot. {@link #PREPARE_UNATTENDED_REBOOT_ERROR} in case 2605 * of error. 2606 */ prepareForUnattendedReboot()2607 int prepareForUnattendedReboot(); 2608 2609 /** 2610 * Request to get the current slicing configuration including URSP rules and 2611 * NSSAIs (configured, allowed and rejected). 2612 */ getSlicingConfig(in ResultReceiver callback)2613 void getSlicingConfig(in ResultReceiver callback); 2614 2615 /** 2616 * Check whether the given premium capability is available for purchase from the carrier. 2617 */ isPremiumCapabilityAvailableForPurchase(int capability, int subId)2618 boolean isPremiumCapabilityAvailableForPurchase(int capability, int subId); 2619 2620 /** 2621 * Purchase the given premium capability from the carrier. 2622 */ purchasePremiumCapability(int capability, IIntegerConsumer callback, int subId)2623 void purchasePremiumCapability(int capability, IIntegerConsumer callback, int subId); 2624 2625 /** 2626 * Register an IMS connection state callback 2627 */ registerImsStateCallback(int subId, int feature, in IImsStateCallback cb, in String callingPackage)2628 void registerImsStateCallback(int subId, int feature, in IImsStateCallback cb, 2629 in String callingPackage); 2630 2631 /** 2632 * Unregister an IMS connection state callback 2633 */ unregisterImsStateCallback(in IImsStateCallback cb)2634 void unregisterImsStateCallback(in IImsStateCallback cb); 2635 2636 /** 2637 * return last known cell identity 2638 * @param subId user preferred subId. 2639 * @param callingPackage the name of the package making the call. 2640 * @param callingFeatureId The feature in the package. 2641 */ getLastKnownCellIdentity(int subId, String callingPackage, String callingFeatureId)2642 CellIdentity getLastKnownCellIdentity(int subId, String callingPackage, 2643 String callingFeatureId); 2644 2645 /** 2646 * @return true if the modem service is set successfully, false otherwise. 2647 */ setModemService(in String serviceName)2648 boolean setModemService(in String serviceName); 2649 2650 /** 2651 * @return the service name of the modem service which bind to. 2652 */ getModemService()2653 String getModemService(); 2654 2655 /** 2656 * Is Provisioning required for capability 2657 * @return true if provisioning is required for the MMTEL capability and IMS 2658 * registration technology specified, false if it is not required. 2659 */ isProvisioningRequiredForCapability(int subId, int capability, int tech)2660 boolean isProvisioningRequiredForCapability(int subId, int capability, int tech); 2661 2662 /** 2663 * Is RCS Provisioning required for capability 2664 * @return true if provisioning is required for the RCS capability and IMS 2665 * registration technology specified, false if it is not required. 2666 */ isRcsProvisioningRequiredForCapability(int subId, int capability, int tech)2667 boolean isRcsProvisioningRequiredForCapability(int subId, int capability, int tech); 2668 2669 /** 2670 * Sets a voice service state from telecom based on the current PhoneAccounts registered. See 2671 * PhoneAccount#CAPABILITY_VOICE_CALLING_AVAILABLE. 2672 */ setVoiceServiceStateOverride(int subId, boolean hasService, String callingPackage)2673 void setVoiceServiceStateOverride(int subId, boolean hasService, String callingPackage); 2674 2675 /** 2676 * Returns the package name that provides the {@link CarrierService} implementation for the 2677 * specified {@code logicalSlotIndex}, or {@code null} if no package with carrier privileges 2678 * declares one. 2679 * 2680 * @param logicalSlotIndex The slot index to fetch the {@link CarrierService} package for 2681 * @return The system-selected package that provides the {@link CarrierService} implementation 2682 * for the slot, or {@code null} if none is resolved 2683 */ getCarrierServicePackageNameForLogicalSlot(int logicalSlotIndex)2684 String getCarrierServicePackageNameForLogicalSlot(int logicalSlotIndex); 2685 2686 /** 2687 * set removable eSIM as default eUICC. 2688 * 2689 * @hide 2690 */ setRemovableEsimAsDefaultEuicc(boolean isDefault, String callingPackage)2691 void setRemovableEsimAsDefaultEuicc(boolean isDefault, String callingPackage); 2692 2693 /** 2694 * Returns whether the removable eSIM is default eUICC or not. 2695 * 2696 * @hide 2697 */ isRemovableEsimDefaultEuicc(String callingPackage)2698 boolean isRemovableEsimDefaultEuicc(String callingPackage); 2699 2700 /** 2701 * Get the component name of the default app to direct respond-via-message intent for the 2702 * user associated with this subscription, update the cache if there is no respond-via-message 2703 * application currently configured for this user. 2704 * @return component name of the app and class to direct Respond Via Message intent to, or 2705 * {@code null} if the functionality is not supported. 2706 * @hide 2707 */ getDefaultRespondViaMessageApplication(int subId, boolean updateIfNeeded)2708 ComponentName getDefaultRespondViaMessageApplication(int subId, boolean updateIfNeeded); 2709 2710 /** 2711 * Get the SIM state for the logical SIM slot index. 2712 * 2713 * @param slotIndex Logical SIM slot index. 2714 */ getSimStateForSlotIndex(int slotIndex)2715 int getSimStateForSlotIndex(int slotIndex); 2716 2717 /** 2718 * Request telephony to persist state for debugging emergency call failures. 2719 * 2720 * @param dropBoxTag Tag to use when persisting data to dropbox service. 2721 * @param enableLogcat whether to collect logcat output 2722 * @param logcatStartTimestampMillis timestamp from when logcat buffers would be persisted 2723 * @param enableTelecomDump whether to collect telecom dumpsys 2724 * @param enableTelephonyDump whether to collect telephony dumpsys 2725 * 2726 * @hide 2727 */ 2728 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2729 + "android.Manifest.permission.DUMP)") persistEmergencyCallDiagnosticData(String dropboxTag, boolean enableLogcat, long logcatStartTimestampMillis, boolean enableTelecomDump, boolean enableTelephonyDump)2730 void persistEmergencyCallDiagnosticData(String dropboxTag, boolean enableLogcat, 2731 long logcatStartTimestampMillis, boolean enableTelecomDump, boolean enableTelephonyDump); 2732 /** 2733 * Set whether the radio is able to connect with null ciphering or integrity 2734 * algorithms. This is a global setting and will apply to all active subscriptions 2735 * and all new subscriptions after this. 2736 * 2737 * <p>Requires Permission: 2738 * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} 2739 * 2740 * @param enabled when true, null cipher and integrity algorithms are allowed. 2741 * @hide 2742 */ setNullCipherAndIntegrityEnabled(boolean enabled)2743 void setNullCipherAndIntegrityEnabled(boolean enabled); 2744 2745 /** 2746 * Get whether the radio is able to connect with null ciphering or integrity 2747 * algorithms. Note that this retrieves the phone-global preference and not 2748 * the state of the radio. 2749 * 2750 * @hide 2751 */ isNullCipherAndIntegrityPreferenceEnabled()2752 boolean isNullCipherAndIntegrityPreferenceEnabled(); 2753 2754 /** 2755 * Get current broadcast ranges. 2756 */ getCellBroadcastIdRanges(int subId)2757 List<CellBroadcastIdRange> getCellBroadcastIdRanges(int subId); 2758 2759 /** 2760 * Set reception of cell broadcast messages with the list of the given ranges 2761 */ setCellBroadcastIdRanges(int subId, in List<CellBroadcastIdRange> ranges, IIntegerConsumer callback)2762 void setCellBroadcastIdRanges(int subId, in List<CellBroadcastIdRange> ranges, 2763 IIntegerConsumer callback); 2764 2765 /** 2766 * Returns whether the domain selection service is supported. 2767 * 2768 * @return {@code true} if the domain selection service is supported. 2769 */ isDomainSelectionSupported()2770 boolean isDomainSelectionSupported(); 2771 2772 /** 2773 * Get the carrier restriction status of the device. 2774 */ getCarrierRestrictionStatus(IIntegerConsumer internalCallback, String packageName)2775 void getCarrierRestrictionStatus(IIntegerConsumer internalCallback, String packageName); 2776 2777 /** 2778 * Request to enable or disable the satellite modem. 2779 * 2780 * @param enableSatellite True to enable the satellite modem and false to disable. 2781 * @param enableDemoMode True if demo mode is enabled and false otherwise. When 2782 * disabling satellite, {@code enableDemoMode} is always considered as 2783 * {@code false} by Telephony. 2784 * @param isEmergency {@code true} means satellite is enabled for emergency mode, {@code false} 2785 * otherwise. When disabling satellite, {@code isEmergency} is always 2786 * considered as {@code false} by Telephony. 2787 * @param callback The callback to get the result of the request. 2788 */ 2789 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2790 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestSatelliteEnabled(boolean enableSatellite, boolean enableDemoMode, boolean isEmergency, in IIntegerConsumer callback)2791 void requestSatelliteEnabled(boolean enableSatellite, boolean enableDemoMode, 2792 boolean isEmergency, in IIntegerConsumer callback); 2793 2794 /** 2795 * Request to get whether the satellite modem is enabled. 2796 * 2797 * @param receiver Result receiver to get the error code of the request and whether the 2798 * satellite modem is enabled. 2799 */ 2800 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2801 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestIsSatelliteEnabled(in ResultReceiver receiver)2802 void requestIsSatelliteEnabled(in ResultReceiver receiver); 2803 2804 /** 2805 * Request to get whether the satellite service demo mode is enabled. 2806 * 2807 * @param receiver Result receiver to get the error code of the request and whether the 2808 * satellite demo mode is enabled. 2809 */ 2810 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2811 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestIsDemoModeEnabled(in ResultReceiver receiver)2812 void requestIsDemoModeEnabled(in ResultReceiver receiver); 2813 2814 /** 2815 * Request to get whether the satellite service is enabled with emergency mode. 2816 * 2817 * @param receiver Result receiver to get the error code of the request and whether the 2818 * satellite is enabled with emergency mode. 2819 */ 2820 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2821 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestIsEmergencyModeEnabled(in ResultReceiver receiver)2822 void requestIsEmergencyModeEnabled(in ResultReceiver receiver); 2823 2824 /** 2825 * Request to get whether the satellite service is supported on the device. 2826 * 2827 * @param receiver Result receiver to get the error code of the request and whether the 2828 * satellite service is supported on the device. 2829 */ requestIsSatelliteSupported(in ResultReceiver receiver)2830 void requestIsSatelliteSupported(in ResultReceiver receiver); 2831 2832 /** 2833 * Request to get the capabilities of the satellite service. 2834 * 2835 * @param receiver Result receiver to get the error code of the request and the requested 2836 * capabilities of the satellite service. 2837 */ 2838 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2839 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestSatelliteCapabilities(in ResultReceiver receiver)2840 void requestSatelliteCapabilities(in ResultReceiver receiver); 2841 2842 /** 2843 * Start receiving satellite transmission updates. 2844 * 2845 * @param resultCallback The callback to get the result of the request. 2846 * @param callback The callback to handle transmission updates. 2847 */ 2848 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2849 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") startSatelliteTransmissionUpdates(in IIntegerConsumer resultCallback, in ISatelliteTransmissionUpdateCallback callback)2850 void startSatelliteTransmissionUpdates(in IIntegerConsumer resultCallback, 2851 in ISatelliteTransmissionUpdateCallback callback); 2852 2853 /** 2854 * Stop receiving satellite transmission updates. 2855 * 2856 * @param resultCallback The callback to get the result of the request. 2857 * @param callback The callback that was passed to startSatelliteTransmissionUpdates. 2858 */ 2859 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2860 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") stopSatelliteTransmissionUpdates(in IIntegerConsumer resultCallback, in ISatelliteTransmissionUpdateCallback callback)2861 void stopSatelliteTransmissionUpdates(in IIntegerConsumer resultCallback, 2862 in ISatelliteTransmissionUpdateCallback callback); 2863 2864 /** 2865 * Register the subscription with a satellite provider. 2866 * This is needed to register the subscription if the provider allows dynamic registration. 2867 * 2868 * @param token The token to be used as a unique identifier for provisioning with satellite 2869 * gateway. 2870 * @provisionData Data from the provisioning app that can be used by provisioning server 2871 * @param callback The callback to get the result of the request. 2872 * 2873 * @return The signal transport used by callers to cancel the provision request. 2874 */ 2875 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2876 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") provisionSatelliteService(in String token, in byte[] provisionData, in IIntegerConsumer callback)2877 ICancellationSignal provisionSatelliteService(in String token, 2878 in byte[] provisionData, in IIntegerConsumer callback); 2879 2880 /** 2881 * Unregister the subscription with the satellite provider. 2882 * This is needed to unregister the subscription if the provider allows dynamic registration. 2883 * Once deprovisioned, 2884 * {@link SatelliteCallback.SatelliteProvisionStateListener#onSatelliteProvisionStateChanged} 2885 * should report as deprovisioned. 2886 * 2887 * @param token The token of the device/subscription to be deprovisioned. 2888 * @param callback The callback to get the result of the request. 2889 */ 2890 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2891 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") deprovisionSatelliteService(in String token, in IIntegerConsumer callback)2892 void deprovisionSatelliteService(in String token, in IIntegerConsumer callback); 2893 2894 /** 2895 * Registers for provision state changed from satellite modem. 2896 * 2897 * @param callback The callback to handle the satellite provision state changed event. 2898 * 2899 * @return The {@link SatelliteError} result of the operation. 2900 */ 2901 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2902 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") registerForSatelliteProvisionStateChanged(in ISatelliteProvisionStateCallback callback)2903 int registerForSatelliteProvisionStateChanged(in ISatelliteProvisionStateCallback callback); 2904 2905 /** 2906 * Unregisters for provision state changed from satellite modem. 2907 * If callback was not registered before, the request will be ignored. 2908 * 2909 * @param callback The callback that was passed to registerForSatelliteProvisionStateChanged. 2910 */ 2911 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2912 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") unregisterForSatelliteProvisionStateChanged( in ISatelliteProvisionStateCallback callback)2913 void unregisterForSatelliteProvisionStateChanged( 2914 in ISatelliteProvisionStateCallback callback); 2915 2916 /** 2917 * Request to get whether the device is provisioned with a satellite provider. 2918 * 2919 * @param receiver Result receiver to get the error code of the request and whether the 2920 * device is provisioned with a satellite provider. 2921 */ 2922 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2923 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestIsSatelliteProvisioned(in ResultReceiver receiver)2924 void requestIsSatelliteProvisioned(in ResultReceiver receiver); 2925 2926 /** 2927 * Registers for modem state changed from satellite modem. 2928 * 2929 * @param callback The callback to handle the satellite modem state changed event. 2930 * 2931 * @return The {@link SatelliteError} result of the operation. 2932 */ 2933 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2934 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") registerForSatelliteModemStateChanged(ISatelliteModemStateCallback callback)2935 int registerForSatelliteModemStateChanged(ISatelliteModemStateCallback callback); 2936 2937 /** 2938 * Unregisters for modem state changed from satellite modem. 2939 * If callback was not registered before, the request will be ignored. 2940 * 2941 * @param callback The callback that was passed to registerForSatelliteStateChanged. 2942 */ 2943 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2944 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") unregisterForModemStateChanged(ISatelliteModemStateCallback callback)2945 void unregisterForModemStateChanged(ISatelliteModemStateCallback callback); 2946 2947 /** 2948 * Register to receive incoming datagrams over satellite. 2949 * 2950 * @param callback The callback to handle the incoming datagrams. 2951 * 2952 * @return The {@link SatelliteError} result of the operation. 2953 */ 2954 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2955 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") registerForIncomingDatagram(ISatelliteDatagramCallback callback)2956 int registerForIncomingDatagram(ISatelliteDatagramCallback callback); 2957 2958 /** 2959 * Unregister to stop receiving incoming datagrams over satellite. 2960 * If callback was not registered before, the request will be ignored. 2961 * 2962 * @param callback The callback that was passed to registerForIncomingDatagram. 2963 */ 2964 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2965 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") unregisterForIncomingDatagram(ISatelliteDatagramCallback callback)2966 void unregisterForIncomingDatagram(ISatelliteDatagramCallback callback); 2967 2968 /** 2969 * Poll pending satellite datagrams over satellite. 2970 * 2971 * @param callback The callback to get the result of the request. 2972 */ 2973 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2974 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") pollPendingDatagrams(IIntegerConsumer callback)2975 void pollPendingDatagrams(IIntegerConsumer callback); 2976 2977 /** 2978 * Send datagram over satellite. 2979 * 2980 * @param datagramType Type of datagram. 2981 * @param datagram Datagram to send over satellite. 2982 * @param needFullScreenPointingUI this is used to indicate pointingUI app to open in 2983 * full screen mode. 2984 * @param callback The callback to get the result of the request. 2985 */ 2986 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2987 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") sendDatagram(int datagramType, in SatelliteDatagram datagram, in boolean needFullScreenPointingUI, IIntegerConsumer callback)2988 void sendDatagram(int datagramType, in SatelliteDatagram datagram, 2989 in boolean needFullScreenPointingUI, IIntegerConsumer callback); 2990 2991 /** 2992 * Returns integer array of disallowed reasons of satellite. 2993 * 2994 * @return Integer array of disallowed reasons of satellite. 2995 */ 2996 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 2997 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") getSatelliteDisallowedReasons()2998 int[] getSatelliteDisallowedReasons(); 2999 3000 /** 3001 * Registers for disallowed reasons change event from satellite service. 3002 * 3003 * @param callback The callback to handle disallowed reasons changed event. 3004 * 3005 */ 3006 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3007 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") registerForSatelliteDisallowedReasonsChanged( ISatelliteDisallowedReasonsCallback callback)3008 void registerForSatelliteDisallowedReasonsChanged( 3009 ISatelliteDisallowedReasonsCallback callback); 3010 3011 /** 3012 * Unregisters for disallowed reasons change event from satellite service. 3013 * If callback was not registered before, the request will be ignored. 3014 * 3015 * @param callback The callback to handle disallowed reasons changed event. 3016 */ 3017 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3018 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") unregisterForSatelliteDisallowedReasonsChanged( ISatelliteDisallowedReasonsCallback callback)3019 void unregisterForSatelliteDisallowedReasonsChanged( 3020 ISatelliteDisallowedReasonsCallback callback); 3021 3022 /** 3023 * Request to get whether satellite communication is allowed for the current location. 3024 * 3025 * @param subId The subId of the subscription to get whether satellite communication is allowed 3026 * for the current location for. 3027 * @param receiver Result receiver to get the error code of the request and whether satellite 3028 * communication is allowed for the current location. 3029 */ 3030 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3031 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestIsCommunicationAllowedForCurrentLocation(int subId, in ResultReceiver receiver)3032 void requestIsCommunicationAllowedForCurrentLocation(int subId, in ResultReceiver receiver); 3033 3034 /** 3035 * Request to get satellite access configuration for the current location. 3036 * 3037 * @param receiver Result receiver to get the error code of the request 3038 * and satellite access configuration for the current location. 3039 */ 3040 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3041 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestSatelliteAccessConfigurationForCurrentLocation(in ResultReceiver receiver)3042 void requestSatelliteAccessConfigurationForCurrentLocation(in ResultReceiver receiver); 3043 3044 /** 3045 * Request to get the time after which the satellite will be visible. 3046 * 3047 * @param receiver Result receiver to get the error code of the request and the requested 3048 * time after which the satellite will be visible. 3049 */ 3050 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3051 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestTimeForNextSatelliteVisibility(in ResultReceiver receiver)3052 void requestTimeForNextSatelliteVisibility(in ResultReceiver receiver); 3053 3054 3055 /** 3056 * Request to get the currently selected satellite subscription id. 3057 * 3058 * @param receiver Result receiver to get the error code of the request and the currently 3059 * selected satellite subscription id. 3060 */ 3061 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3062 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestSelectedNbIotSatelliteSubscriptionId(in ResultReceiver receiver)3063 void requestSelectedNbIotSatelliteSubscriptionId(in ResultReceiver receiver); 3064 3065 /** 3066 * Registers for selected satellite subscription changed event from the satellite service. 3067 * 3068 * @param executor The executor on which the callback will be called. 3069 * @param callback The callback to handle the satellite subscription changed event. 3070 */ 3071 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3072 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") registerForSelectedNbIotSatelliteSubscriptionChanged( in ISelectedNbIotSatelliteSubscriptionCallback callback)3073 int registerForSelectedNbIotSatelliteSubscriptionChanged( 3074 in ISelectedNbIotSatelliteSubscriptionCallback callback); 3075 3076 /** 3077 * Unregisters for selected satellite subscription changed event from the satellite service. If 3078 * callback was not registered before, the request will be ignored. 3079 * 3080 * @param callback The callback that was passed to {@link 3081 * #registerForSelectedNbIotSatelliteSubscriptionChanged(Executor, 3082 * SelectedNbIotSatelliteSubscriptionCallback)}. 3083 */ 3084 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3085 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") unregisterForSelectedNbIotSatelliteSubscriptionChanged( in ISelectedNbIotSatelliteSubscriptionCallback callback)3086 void unregisterForSelectedNbIotSatelliteSubscriptionChanged( 3087 in ISelectedNbIotSatelliteSubscriptionCallback callback); 3088 3089 /** 3090 * Inform whether the device is aligned with the satellite in both real and demo mode. 3091 * 3092 * @param isAligned {@true} Device is aligned with the satellite. 3093 * {@false} Device is not aligned with the satellite. 3094 */ 3095 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3096 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") setDeviceAlignedWithSatellite(boolean isAligned)3097 void setDeviceAlignedWithSatellite(boolean isAligned); 3098 3099 /** 3100 * This API can be used by only CTS to update satellite vendor service package name. 3101 * 3102 * @param servicePackageName The package name of the satellite vendor service. 3103 * @param provisioned Whether satellite should be provisioned or not. 3104 * 3105 * @return {@code true} if the satellite vendor service is set successfully, 3106 * {@code false} otherwise. 3107 */ setSatelliteServicePackageName(in String servicePackageName, in String provisioned)3108 boolean setSatelliteServicePackageName(in String servicePackageName, in String provisioned); 3109 3110 /** 3111 * This API can be used by only CTS to update satellite gateway service package name. 3112 * 3113 * @param servicePackageName The package name of the satellite gateway service. 3114 * @return {@code true} if the satellite gateway service is set successfully, 3115 * {@code false} otherwise. 3116 */ setSatelliteGatewayServicePackageName(in String servicePackageName)3117 boolean setSatelliteGatewayServicePackageName(in String servicePackageName); 3118 3119 /** 3120 * This API can be used by only CTS to update the timeout duration in milliseconds that 3121 * satellite should stay at listening mode to wait for the next incoming page before disabling 3122 * listening mode. 3123 * 3124 * @param timeoutMillis The timeout duration in millisecond. 3125 * @return {@code true} if the timeout duration is set successfully, {@code false} otherwise. 3126 */ setSatelliteListeningTimeoutDuration(in long timeoutMillis)3127 boolean setSatelliteListeningTimeoutDuration(in long timeoutMillis); 3128 3129 /** 3130 * This API can be used by only CTS to control ingoring cellular service state event. 3131 * 3132 * @param enabled Whether to enable boolean config. 3133 * @return {@code true} if the value is set successfully, {@code false} otherwise. 3134 */ setSatelliteIgnoreCellularServiceState(in boolean enabled)3135 boolean setSatelliteIgnoreCellularServiceState(in boolean enabled); 3136 3137 /** 3138 * This API can be used by only CTS to control the feature 3139 * {@code config_support_disable_satellite_while_enable_in_progress}. 3140 * 3141 * @param reset Whether to reset the override. 3142 * @param supported Whether to support the feature. 3143 * @return {@code true} if the value is set successfully, {@code false} otherwise. 3144 */ setSupportDisableSatelliteWhileEnableInProgress(boolean reset, boolean supported)3145 boolean setSupportDisableSatelliteWhileEnableInProgress(boolean reset, boolean supported); 3146 3147 /** 3148 * This API can be used by only CTS to update satellite pointing UI app package and class names. 3149 * 3150 * @param packageName The package name of the satellite pointing UI app. 3151 * @param className The class name of the satellite pointing UI app. 3152 * @return {@code true} if the satellite pointing UI app package and class is set successfully, 3153 * {@code false} otherwise. 3154 */ setSatellitePointingUiClassName(in String packageName, in String className)3155 boolean setSatellitePointingUiClassName(in String packageName, in String className); 3156 3157 /** 3158 * This API can be used by only CTS to override the timeout durations used by the 3159 * DatagramController module. 3160 * 3161 * @param timeoutMillis The timeout duration in millisecond. 3162 * @return {@code true} if the timeout duration is set successfully, {@code false} otherwise. 3163 */ setDatagramControllerTimeoutDuration( boolean reset, int timeoutType, long timeoutMillis)3164 boolean setDatagramControllerTimeoutDuration( 3165 boolean reset, int timeoutType, long timeoutMillis); 3166 3167 /** 3168 * This API can be used by only CTS to override the timeout durations used by the 3169 * SatelliteController module. 3170 * 3171 * @param timeoutMillis The timeout duration in millisecond. 3172 * @return {@code true} if the timeout duration is set successfully, {@code false} otherwise. 3173 */ setSatelliteControllerTimeoutDuration( boolean reset, int timeoutType, long timeoutMillis)3174 boolean setSatelliteControllerTimeoutDuration( 3175 boolean reset, int timeoutType, long timeoutMillis); 3176 3177 /** 3178 * This API can be used in only testing to override connectivity status in monitoring emergency 3179 * calls and sending EVENT_DISPLAY_EMERGENCY_MESSAGE to Dialer. 3180 * 3181 * @param handoverType The type of handover from emergency call to satellite messaging. Use one 3182 * of the following values to enable the override: 3183 * 1 - EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_SOS 3184 * 2 - EMERGENCY_CALL_TO_SATELLITE_HANDOVER_TYPE_T911 3185 * To disable the override, use -1 for handoverType. 3186 * @param delaySeconds The event EVENT_DISPLAY_EMERGENCY_MESSAGE will be sent to Dialer 3187 * delaySeconds after the emergency call starts. 3188 * @return {@code true} if the handover type is set successfully, {@code false} otherwise. 3189 */ setEmergencyCallToSatelliteHandoverType(int handoverType, int delaySeconds)3190 boolean setEmergencyCallToSatelliteHandoverType(int handoverType, int delaySeconds); 3191 3192 /** 3193 * This API should be used by only CTS tests to forcefully set the country codes. 3194 * 3195 * @param reset {@code true} mean the overridden country codes should not be used, {@code false} 3196 * otherwise. 3197 * @return {@code true} if the country code is set successfully, {@code false} otherwise. 3198 */ setCountryCodes(in boolean reset, in List<String> currentNetworkCountryCodes, in Map cachedNetworkCountryCodes, in String locationCountryCode, in long locationCountryCodeTimestampNanos)3199 boolean setCountryCodes(in boolean reset, in List<String> currentNetworkCountryCodes, 3200 in Map cachedNetworkCountryCodes, in String locationCountryCode, 3201 in long locationCountryCodeTimestampNanos); 3202 3203 /** 3204 * This API should be used by only CTS tests to override the overlay configs of satellite 3205 * access controller. 3206 * 3207 * @param reset {@code true} mean the overridden configs should not be used, {@code false} 3208 * otherwise. 3209 * @return {@code true} if the overlay configs are set successfully, {@code false} otherwise. 3210 */ setSatelliteAccessControlOverlayConfigs(in boolean reset, in boolean isAllowed, in String s2CellFile, in long locationFreshDurationNanos, in List<String> satelliteCountryCodes, String satelliteAccessConfigurationFile)3211 boolean setSatelliteAccessControlOverlayConfigs(in boolean reset, in boolean isAllowed, 3212 in String s2CellFile, in long locationFreshDurationNanos, 3213 in List<String> satelliteCountryCodes, String satelliteAccessConfigurationFile); 3214 3215 /** 3216 * This API can be used by only CTS to override the satellite access allowed state for 3217 * a list of subscription IDs. 3218 * 3219 * @param subIdListStr The string representation of the list of subscription IDs, 3220 * which are numbers separated by comma. 3221 * @return {@code true} if the satellite access allowed state is set successfully, 3222 * {@code false} otherwise. 3223 */ setSatelliteAccessAllowedForSubscriptions(in String subIdListStr)3224 boolean setSatelliteAccessAllowedForSubscriptions(in String subIdListStr); 3225 3226 /** 3227 * This API can be used by only CTS to override satellite TN scanning support. 3228 * 3229 * @param reset {@code true} mean the overridden configs should not be used, {@code false} 3230 * otherwise. 3231 * @param concurrentTnScanningSupported Whether concurrent TN scanning is supported. 3232 * @param tnScanningDuringSatelliteSessionAllowed Whether TN scanning is allowed during 3233 * a satellite session. 3234 * @return {@code true} if the TN scanning support is set successfully, 3235 * {@code false} otherwise. 3236 */ setTnScanningSupport(in boolean reset, in boolean concurrentTnScanningSupported, in boolean tnScanningDuringSatelliteSessionAllowed)3237 boolean setTnScanningSupport(in boolean reset, in boolean concurrentTnScanningSupported, 3238 in boolean tnScanningDuringSatelliteSessionAllowed); 3239 3240 /** 3241 * This API can be used in only testing to override oem-enabled satellite provision status. 3242 * 3243 * @param reset {@code true} mean the overriding status should not be used, {@code false} 3244 * otherwise. 3245 * @param isProvisioned The overriding provision status. 3246 * @return {@code true} if the provision status is set successfully, {@code false} otherwise. 3247 */ setOemEnabledSatelliteProvisionStatus(in boolean reset, in boolean isProvisioned)3248 boolean setOemEnabledSatelliteProvisionStatus(in boolean reset, in boolean isProvisioned); 3249 3250 /** 3251 * This API is used by CTS to override the version of the config data 3252 * 3253 * @param reset Whether to restore the original version 3254 * @param version The overriding version 3255 * @return {@code true} if successful, {@code false} otherwise 3256 */ overrideConfigDataVersion(in boolean reset, in int version)3257 boolean overrideConfigDataVersion(in boolean reset, in int version); 3258 3259 /** 3260 * Test method to confirm the file contents are not altered. 3261 */ 3262 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3263 + "android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)") getShaIdFromAllowList(String pkgName, int carrierId)3264 List<String> getShaIdFromAllowList(String pkgName, int carrierId); 3265 3266 /** 3267 * Add a restriction reason for disallowing satellite communication. 3268 * 3269 * @param subId The subId of the subscription to request for. 3270 * @param reason Reason for disallowing satellite communication for carrier. 3271 * @param callback Listener for the {@link SatelliteManager.SatelliteError} result of the 3272 * operation. 3273 */ 3274 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3275 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") addAttachRestrictionForCarrier(int subId, int reason, in IIntegerConsumer callback)3276 void addAttachRestrictionForCarrier(int subId, int reason, in IIntegerConsumer callback); 3277 3278 /** 3279 * Remove a restriction reason for disallowing satellite communication. 3280 * 3281 * @param subId The subId of the subscription to request for. 3282 * @param reason Reason for disallowing satellite communication. 3283 * @param callback Listener for the {@link SatelliteManager.SatelliteError} result of the 3284 * operation. 3285 */ 3286 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3287 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") removeAttachRestrictionForCarrier(int subId, int reason, in IIntegerConsumer callback)3288 void removeAttachRestrictionForCarrier(int subId, int reason, in IIntegerConsumer callback); 3289 3290 /** 3291 * Get reasons for disallowing satellite communication, as requested by 3292 * {@link #addAttachRestrictionForCarrier(int, int)}. 3293 * 3294 * @param subId The subId of the subscription to request for. 3295 * 3296 * @return Set of reasons for disallowing satellite communication. 3297 */ 3298 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3299 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") getAttachRestrictionReasonsForCarrier(int subId)3300 int[] getAttachRestrictionReasonsForCarrier(int subId); 3301 3302 /** 3303 * Request to get the signal strength of the satellite connection. 3304 * 3305 * @param receiver Result receiver to get the error code of the request and the current signal 3306 * strength of the satellite connection. 3307 */ 3308 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3309 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestNtnSignalStrength(in ResultReceiver receiver)3310 void requestNtnSignalStrength(in ResultReceiver receiver); 3311 3312 /** 3313 * Registers for NTN signal strength changed from satellite modem. If the registration operation 3314 * is not successful, a {@link SatelliteException} that contains {@link SatelliteResult} will be 3315 * thrown. 3316 * 3317 * @param callback The callback to handle the NTN signal strength changed event. If the 3318 * operation is successful, {@link NtnSignalStrengthCallback#onNtnSignalStrengthChanged( 3319 * NtnSignalStrength)} will return an instance of {@link NtnSignalStrength} with a value of 3320 * {@link NtnSignalStrength.NtnSignalStrengthLevel} when the signal strength of non-terrestrial 3321 * network has changed. 3322 */ 3323 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3324 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") registerForNtnSignalStrengthChanged(in INtnSignalStrengthCallback callback)3325 void registerForNtnSignalStrengthChanged(in INtnSignalStrengthCallback callback); 3326 3327 /** 3328 * Unregisters for NTN signal strength changed from satellite modem. 3329 * If callback was not registered before, the request will be ignored. 3330 * 3331 * @param callback The callback that was passed to 3332 * {@link #registerForNtnSignalStrengthChanged(Executor, NtnSignalStrengthCallback)}. 3333 */ 3334 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3335 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") unregisterForNtnSignalStrengthChanged(in INtnSignalStrengthCallback callback)3336 void unregisterForNtnSignalStrengthChanged(in INtnSignalStrengthCallback callback); 3337 3338 /** 3339 * Registers for satellite capabilities change event from the satellite service. 3340 * 3341 * @param callback The callback to handle the satellite capabilities changed event. 3342 */ 3343 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3344 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") registerForCapabilitiesChanged(in ISatelliteCapabilitiesCallback callback)3345 int registerForCapabilitiesChanged(in ISatelliteCapabilitiesCallback callback); 3346 3347 /** 3348 * Unregisters for satellite capabilities change event from the satellite service. 3349 * If callback was not registered before, the request will be ignored. 3350 * 3351 * @param callback The callback that was passed to. 3352 * {@link #registerForCapabilitiesChanged(Executor, SatelliteCapabilitiesCallback)}. 3353 */ 3354 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3355 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") unregisterForCapabilitiesChanged(in ISatelliteCapabilitiesCallback callback)3356 void unregisterForCapabilitiesChanged(in ISatelliteCapabilitiesCallback callback); 3357 3358 /** 3359 * This API can be used by only CTS to override the cached value for the device overlay config 3360 * value : config_send_satellite_datagram_to_modem_in_demo_mode, which determines whether 3361 * outgoing satellite datagrams should be sent to modem in demo mode. 3362 * 3363 * @param shouldSendToDemoMode Whether send datagram in demo mode should be sent to satellite 3364 * modem or not. 3365 * 3366 * @return {@code true} if the operation is successful, {@code false} otherwise. 3367 */ setShouldSendDatagramToModemInDemoMode(boolean shouldSendToModemInDemoMode)3368 boolean setShouldSendDatagramToModemInDemoMode(boolean shouldSendToModemInDemoMode); 3369 3370 /** 3371 * @return {@code true} if the DomainSelectionService is set, 3372 * {@code false} otherwise. 3373 */ setDomainSelectionServiceOverride(in ComponentName componentName)3374 boolean setDomainSelectionServiceOverride(in ComponentName componentName); 3375 3376 /** 3377 * @return {@code true} if the DomainSelectionService override is cleared, 3378 * {@code false} otherwise. 3379 */ clearDomainSelectionServiceOverride()3380 boolean clearDomainSelectionServiceOverride(); 3381 3382 /** 3383 * @return {@code true} if the AOSP domain selection service is supported, 3384 * {@code false} otherwise. 3385 */ isAospDomainSelectionService()3386 boolean isAospDomainSelectionService(); 3387 3388 /** 3389 * Enable or disable notifications sent for cellular identifier disclosure events. 3390 * 3391 * Disclosure events are defined as instances where a device has sent a cellular identifier 3392 * on the Non-access stratum (NAS) before a security context is established. As a result the 3393 * identifier is sent in the clear, which has privacy implications for the user. 3394 * 3395 * <p>Requires permission: android.Manifest.MODIFY_PHONE_STATE</p> 3396 * 3397 * @param enabled if notifications about disclosure events should be enabled 3398 * @throws IllegalStateException if the Telephony process is not currently available 3399 * @throws SecurityException if the caller does not have the required privileges 3400 * @throws UnsupportedOperationException if the modem does not support this feature. 3401 * @hide 3402 */ 3403 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3404 + "android.Manifest.permission.MODIFY_PHONE_STATE)") setEnableCellularIdentifierDisclosureNotifications(boolean enable)3405 void setEnableCellularIdentifierDisclosureNotifications(boolean enable); 3406 3407 /** 3408 * Get whether or not cellular identifier disclosure notifications are enabled. 3409 * 3410 * <p>Requires permission: android.Manifest.READ_PRIVILEGED_PHONE_STATE</p> 3411 * 3412 * @throws IllegalStateException if the Telephony process is not currently available 3413 * @throws SecurityException if the caller does not have the required privileges 3414 * @throws UnsupportedOperationException if the modem does not support this feature. 3415 * @hide 3416 */ 3417 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3418 + "android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)") isCellularIdentifierDisclosureNotificationsEnabled()3419 boolean isCellularIdentifierDisclosureNotificationsEnabled(); 3420 3421 /** 3422 * Enables or disables notifications sent when cellular null cipher or integrity algorithms 3423 * are in use by the cellular modem. 3424 * 3425 * @throws IllegalStateException if the Telephony process is not currently available 3426 * @throws SecurityException if the caller does not have the required privileges 3427 * @throws UnsupportedOperationException if the modem does not support reporting on ciphering 3428 * and integrity algorithms in use 3429 * @hide 3430 */ 3431 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3432 + "android.Manifest.permission.MODIFY_PHONE_STATE)") setNullCipherNotificationsEnabled(boolean enable)3433 void setNullCipherNotificationsEnabled(boolean enable); 3434 3435 /** 3436 * Get whether notifications are enabled for null cipher or integrity algorithms in use by the 3437 * cellular modem. 3438 * 3439 * @throws IllegalStateException if the Telephony process is not currently available 3440 * @throws SecurityException if the caller does not have the required privileges 3441 * @throws UnsupportedOperationException if the modem does not support reporting on ciphering 3442 * and integrity algorithms in use 3443 * @hide 3444 */ 3445 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3446 + "android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)") isNullCipherNotificationsEnabled()3447 boolean isNullCipherNotificationsEnabled(); 3448 3449 /** 3450 * Get the aggregated satellite plmn list. This API collects plmn data from multiple sources, 3451 * including carrier config, entitlement server, and config update. 3452 * 3453 * @param subId subId The subscription ID of the carrier. 3454 * 3455 * @return List of plmns for carrier satellite service. If no plmn is available, empty list will 3456 * be returned. 3457 */ 3458 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3459 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") getSatellitePlmnsForCarrier(int subId)3460 List<String> getSatellitePlmnsForCarrier(int subId); 3461 3462 /** 3463 * Registers for supported state changed from satellite modem. 3464 * 3465 * @param callback The callback to handle the satellite supported state changed event. 3466 * 3467 * @return The {@link SatelliteError} result of the operation. 3468 */ 3469 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3470 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") registerForSatelliteSupportedStateChanged(in IBooleanConsumer callback)3471 int registerForSatelliteSupportedStateChanged(in IBooleanConsumer callback); 3472 3473 /** 3474 * Unregisters for supported state changed from satellite modem. 3475 * If callback was not registered before, the request will be ignored. 3476 * 3477 * @param callback The callback that was passed to registerForSatelliteSupportedStateChanged. 3478 */ 3479 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3480 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") unregisterForSatelliteSupportedStateChanged(in IBooleanConsumer callback)3481 void unregisterForSatelliteSupportedStateChanged(in IBooleanConsumer callback); 3482 3483 /** 3484 * Registers for satellite communication allowed state changed. 3485 * 3486 * @param subId The subId of the subscription to register for communication allowed state. 3487 * @param callback The callback to handle the communication allowed state changed event. 3488 * 3489 * @return The {@link SatelliteError} result of the operation. 3490 */ 3491 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3492 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") registerForCommunicationAccessStateChanged(int subId, in ISatelliteCommunicationAccessStateCallback callback)3493 int registerForCommunicationAccessStateChanged(int subId, 3494 in ISatelliteCommunicationAccessStateCallback callback); 3495 3496 /** 3497 * Unregisters for satellite communication allowed state. 3498 * If callback was not registered before, the request will be ignored. 3499 * 3500 * @param subId The subId of the subscription to unregister for supported state changed. 3501 * @param callback The callback that was passed to registerForCommunicationAccessStateChanged. 3502 */ 3503 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3504 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") unregisterForCommunicationAccessStateChanged(int subId, in ISatelliteCommunicationAccessStateCallback callback)3505 void unregisterForCommunicationAccessStateChanged(int subId, 3506 in ISatelliteCommunicationAccessStateCallback callback); 3507 3508 /** 3509 * This API can be used by only CTS to override the boolean configs used by the 3510 * DatagramController module. 3511 * 3512 * @param enable Whether to enable boolean config. 3513 * @return {@code true} if the boolean config is set successfully, {@code false} otherwise. 3514 */ setDatagramControllerBooleanConfig(boolean reset, int booleanType, boolean enable)3515 boolean setDatagramControllerBooleanConfig(boolean reset, int booleanType, boolean enable); 3516 3517 /** 3518 * This API can be used by only CTS to set the cache whether satellite communication is allowed. 3519 * 3520 * @param state a state indicates whether satellite access allowed state should be cached and 3521 * the allowed state. 3522 * @return {@code true} if the setting is successful, {@code false} otherwise. 3523 */ setIsSatelliteCommunicationAllowedForCurrentLocationCache(in String state)3524 boolean setIsSatelliteCommunicationAllowedForCurrentLocationCache(in String state); 3525 3526 /** 3527 * Request to get the session stats of the satellite service. 3528 * 3529 * @param subId The subId of the subscription to get the session stats for. 3530 * @param receiver Result receiver to get the error code of the request and the requested 3531 * session stats of the satellite service. 3532 * @hide 3533 */ requestSatelliteSessionStats(int subId, in ResultReceiver receiver)3534 void requestSatelliteSessionStats(int subId, in ResultReceiver receiver); 3535 3536 /** 3537 * Request to get list of prioritized satellite subscriber ids to be used for provision. 3538 * 3539 * @param result The result receiver, which returns the list of prioritized satellite tokens 3540 * to be used for provision if the request is successful or an error code if the request failed. 3541 * @hide 3542 */ 3543 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3544 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestSatelliteSubscriberProvisionStatus(in ResultReceiver result)3545 void requestSatelliteSubscriberProvisionStatus(in ResultReceiver result); 3546 3547 /** 3548 * Request to get the name to display for Satellite subscription. 3549 * 3550 * @param receiver The result receiver that returns the diplay name to be used for the satellite 3551 * subscription. 3552 * @hide 3553 */ 3554 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3555 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") requestSatelliteDisplayName(in ResultReceiver receiver)3556 void requestSatelliteDisplayName(in ResultReceiver receiver); 3557 3558 /** 3559 * Deliver the list of provisioned satellite subscriber infos. 3560 * 3561 * @param list The list of provisioned satellite subscriber infos. 3562 * @param result The result receiver that returns whether deliver success or fail. 3563 * @hide 3564 */ 3565 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3566 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") provisionSatellite(in List<SatelliteSubscriberInfo> list, in ResultReceiver result)3567 void provisionSatellite(in List<SatelliteSubscriberInfo> list, in ResultReceiver result); 3568 3569 /** 3570 * This API can be used by only CTS to override the cached value for the device overlay config 3571 * value : 3572 * config_satellite_gateway_service_package and 3573 * config_satellite_carrier_roaming_esos_provisioned_class. 3574 * These values are set before sending an intent to broadcast there are any change to list of 3575 * subscriber informations. 3576 * 3577 * @param name the name is one of the following that constitute an intent. 3578 * Component package name, or component class name. 3579 * @return {@code true} if the setting is successful, {@code false} otherwise. 3580 * @hide 3581 */ setSatelliteSubscriberIdListChangedIntentComponent(in String name)3582 boolean setSatelliteSubscriberIdListChangedIntentComponent(in String name); 3583 3584 /** 3585 * This API can be used by only CTS to override the Euicc UI component. 3586 * 3587 * @param componentName ui component to be launched for testing 3588 * @hide 3589 */ setTestEuiccUiComponent(in ComponentName componentName)3590 void setTestEuiccUiComponent(in ComponentName componentName); 3591 3592 /** 3593 * This API can be used by only CTS to retrieve the Euicc UI component. 3594 * 3595 * @return The Euicc UI component for testing. 3596 * @hide 3597 */ getTestEuiccUiComponent()3598 ComponentName getTestEuiccUiComponent(); 3599 3600 /** 3601 * This API can be used only for test purpose to override the carrier romaing Ntn eligibility 3602 * 3603 * @param status to update Ntn Eligibility. 3604 * @param resetRequired to reset the overridden flag in satellite controller. 3605 * @return {@code true} if the shell command is successful, {@code false} otherwise. 3606 * @hide 3607 */ overrideCarrierRoamingNtnEligibilityChanged( in boolean status, in boolean resetRequired)3608 boolean overrideCarrierRoamingNtnEligibilityChanged( 3609 in boolean status, in boolean resetRequired); 3610 3611 /** 3612 * Deliver the list of deprovisioned satellite subscriber infos. 3613 * 3614 * @param list The list of deprovisioned satellite subscriber infos. 3615 * @param result The result receiver that returns whether deliver success or fail. 3616 * @hide 3617 */ 3618 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3619 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") deprovisionSatellite(in List<SatelliteSubscriberInfo> list, in ResultReceiver result)3620 void deprovisionSatellite(in List<SatelliteSubscriberInfo> list, in ResultReceiver result); 3621 3622 /** 3623 * Inform whether application supports NTN SMS in satellite mode. 3624 * 3625 * This method is used by default messaging application to inform framework whether it supports 3626 * NTN SMS or not. 3627 * 3628 * @param ntnSmsSupported {@code true} If application supports NTN SMS, else {@code false}. 3629 * @hide 3630 */ setNtnSmsSupported(boolean ntnSmsSupported)3631 void setNtnSmsSupported(boolean ntnSmsSupported); 3632 3633 /** 3634 * Returns carrier id maps to the passing {@link CarrierIdentifier}. 3635 * 3636 * @param {@link CarrierIdentifier}. 3637 * 3638 * @return carrier id from passing {@link CarrierIdentifier} or {@link #UNKNOWN_CARRIER_ID} 3639 * if the carrier cannot be identified 3640 * @hide 3641 */ getCarrierIdFromIdentifier(in CarrierIdentifier carrierIdentifier)3642 int getCarrierIdFromIdentifier(in CarrierIdentifier carrierIdentifier); 3643 3644 3645 /** 3646 * Get list of applications that are optimized for low bandwidth satellite data. 3647 * 3648 * @return List of Application Name with data optimized network property. 3649 * {@link #PROPERTY_SATELLITE_DATA_OPTIMIZED} 3650 */ 3651 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3652 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") getSatelliteDataOptimizedApps()3653 List<String> getSatelliteDataOptimizedApps(); 3654 3655 /** 3656 * Method to return the current satellite data service policy supported mode for the 3657 * subscriptionId based on subscription id. Note: Iif any error or invalid sub id 3658 * {@Link SatelliteDataSupportMode#SATELLITE_DATA_SUPPORT_UNKNOWN} will be returned. 3659 * 3660 * @param subId current subscription id. 3661 * 3662 * @return Supported modes {@link SatelliteDataSupportMode} 3663 * @throws IllegalArgumentException if the subscription is invalid. 3664 * @hide 3665 */ 3666 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(" 3667 + "android.Manifest.permission.SATELLITE_COMMUNICATION)") getSatelliteDataSupportMode(in int subId)3668 int getSatelliteDataSupportMode(in int subId); 3669 3670 /** 3671 * This API can be used by only CTS to ignore plmn list from storage. 3672 * 3673 * @param enabled Whether to enable boolean config. 3674 * @return {@code true} if the value is set successfully, {@code false} otherwise. 3675 */ setSatelliteIgnorePlmnListFromStorage(in boolean enabled)3676 boolean setSatelliteIgnorePlmnListFromStorage(in boolean enabled); 3677 } 3678