Found 128247 results in 27633 files, showing top 50 files (show more).
android.googlesource.com/platform/packages/services/Telephony:src/com/android/phone/PhoneInterfaceManager.java: [ master, ]
395:         public Phone phone;
17: package com.android.phone;
201: public class PhoneInterfaceManager extends ITelephony.Stub {
1841:     private PhoneInterfaceManager(PhoneGlobals app) {
1858:     private Phone getDefaultPhone() {
1892:     private Phone getPhone(int subId) {
2535:     public String getNetworkCountryIsoForPhone(int phoneId) {
6334:     public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
6357:     public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
6813:     public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
319:     private PhoneConfigurationManager mPhoneConfigurationManager;
1872:     private Phone getPhoneFromRequest(MainThreadRequest request) {
1880:     private Phone getPhoneFromSubId(int subId) {
2311:     private void shutdownRadioUsingPhoneId(int phoneId) {
2968:     public int getActivePhoneType() {
2973:     public int getActivePhoneTypeForSlot(int slotIndex) {
4012:     private void checkModifyPhoneStatePermission(int subId, String message) {
4651:     private Phone getPhoneFromSlotIdOrThrowException(int slotIndex) {
6401:     public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
6939:     public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
6949:     public int getSubIdForPhoneAccountHandle(
6964:     public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
142: import com.android.internal.telephony.Phone;
177: import com.android.phone.settings.PickSmsSubscriptionActivity;
178: import com.android.phone.vvm.PhoneAccountHandleConverter;
179: import com.android.phone.vvm.RemoteVvmTaskManager;
180: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
181: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
394:         // In cases where subId is unavailable, the caller needs to specify the phone.
403:         MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
405:             if (phone != null) {
406:                 this.phone = phone;
434:      * A handler that processes messages on the main thread in the phone process. Since many
435:      * of the Phone calls are not thread safe this is needed to shuttle the requests from the
436:      * inbound binder threads to the main thread in the phone process.  The Binder thread
453:             final Phone defaultPhone = getDefaultPhone();
458:                     final Phone phone = getPhoneFromRequest(request);
477:                         request.result = phone != null
478:                                 ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
489:                     final Phone phone = getPhoneFromRequest(request);
490:                     request.result = phone != null ?
767:                     Phone phone = getPhoneFromRequest(request);
768:                     if (phone != null) {
769:                         phone.isNrDualConnectivityEnabled(onCompleted, request.workSource);
771:                         loge("isNRDualConnectivityEnabled: No phone object");
806:                     Phone phone = getPhoneFromRequest(request);
807:                     if (phone != null) {
808:                         phone.setNrDualConnectivityState((int) request.argument, onCompleted,
811:                         loge("enableNrDualConnectivity: No phone object");
934:                     request.phone.getCallForwardingOption(callForwardingReason, onCompleted);
996:                     request.phone.setCallForwardingOption(
1421:                     request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
1435:                     request.phone.requestCellInfoUpdate(request.workSource,
1463:                     Phone phone = getPhoneFromRequest(request);
1464:                     phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
1473:                         Phone phone = getPhoneFromRequest(request);
1474:                         request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
1497:                             .enablePhone(request.phone, enable, onCompleted);
1503:                     int phoneId = request.phone.getPhoneId();
1518:                             .getPhoneStatusFromModem(request.phone, onCompleted);
1523:                     int id = request.phone.getPhoneId();
1546:                     request.phone.setSystemSelectionChannels(args.first, onCompleted);
1561:                     Phone phone = getPhoneFromRequest(request);
1562:                     if (phone != null) {
1563:                         phone.getSystemSelectionChannels(onCompleted);
1565:                         loge("getSystemSelectionChannels: No phone object");
1755:     private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
1757:                 command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone, workSource);
1766:             int command, Object argument, Integer subId, Phone phone, WorkSource workSource) {
1772:         if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
1773:             throw new IllegalArgumentException("subId and phone cannot both be specified!");
1774:         } else if (phone != null) {
1775:             request = new MainThreadRequest(argument, phone, workSource);
1815:      * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
1819:             int command, Object argument, Phone phone, WorkSource workSource) {
1820:         MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
1859:         Phone thePhone = getPhone(getDefaultSubscription());
1873:         if (request.phone != null) {
1874:             return request.phone;
1886:         Phone phone = getPhoneFromRequest(request);
1887:         return phone == null ? null :
1888:                 UiccController.getInstance().getUiccCard(phone.getPhoneId());
1891:     // returns phone associated with the subId.
1896:     private void sendEraseModemConfig(Phone phone) {
1897:         if (phone != null) {
1899:                   mApp, phone.getSubId(), "eraseModemConfig");
1937:             // PENDING: should we just silently fail if phone is offhook or ringing?
1958:         // from the context of the phone app.
1961:         if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
2179:             final Phone phone = getPhone(getDefaultSubscription());
2180:             if (phone != null) {
2181:                 phone.updateServiceLocation(workSource);
2226:             final Phone phone = getPhone(subId);
2227:             if (phone != null) {
2228:                 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
2246:             final Phone phone = getPhone(subId);
2247:             if (phone != null) {
2248:                 phone.setRadioPower(!isRadioOnForSubscriber(subId));
2264:             final Phone phone = getPhone(subId);
2265:             if (phone == null) {
2268:             if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
2286:                 Phone phone = PhoneFactory.getPhone(i);
2287:                 if (phone != null && phone.isRadioAvailable()) return true;
2303:                 logv("Shutting down Phone " + i);
2312:         Phone phone = PhoneFactory.getPhone(phoneId);
2313:         if (phone != null && phone.isRadioAvailable()) {
2314:             phone.shutdownRadio();
2323:             final Phone defaultPhone = PhoneFactory.getDefaultPhone();
2328:                 loge("There's no default phone.");
2341:             final Phone phone = getPhone(subId);
2342:             if (phone != null) {
2343:                 phone.setRadioPower(turnOn);
2361:             final Phone phone = getPhone(subId);
2362:             if (phone != null) {
2363:                 phone.getDataEnabledSettings().setDataEnabled(
2382:             final Phone phone = getPhone(subId);
2383:             if (phone != null) {
2384:                 phone.getDataEnabledSettings().setDataEnabled(
2399:             final Phone phone = getPhone(subId);
2400:             if (phone != null) {
2401:                 return phone.isDataAllowed(ApnSetting.TYPE_DEFAULT);
2450:             Phone phone = PhoneFactory.getPhone(slotIndex);
2451:             return phone == null ? TelephonyManager.CALL_STATE_IDLE :
2452:                     PhoneConstantConversions.convertCallState(phone.getState());
2467:             final Phone phone = getPhone(subId);
2468:             if (phone != null) {
2469:                 return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
2488:             final Phone phone = getPhone(subId);
2489:             if (phone != null) {
2490:                 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
2519:                 return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
2540:             if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
2541:                 // Get default phone in this case.
2542:                 phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
2545:             Phone phone = PhoneFactory.getPhone(phoneId);
2546:             if (phone == null) return "";
2547:             ServiceStateTracker sst = phone.getServiceStateTracker();
2552:             EmergencyNumberTracker ent = phone.getEmergencyNumberTracker();
2637:         for (Phone phone : PhoneFactory.getPhones()) {
2638:             List<CellInfo> info = phone.getAllCellInfo();
2677:             for (Phone phone : PhoneFactory.getPhones()) {
2679:                         CMD_GET_ALL_CELL_INFO, null, phone, workSource);
2739:         final Phone phone = getPhoneFromSubId(subId);
2740:         if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
2742:         sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
2760:         Phone phone = PhoneFactory.getPhone(slotIndex);
2761:         if (phone == null) {
2764:         int subId = phone.getSubId();
2772:             return phone.getImei();
2780:         Phone phone = PhoneFactory.getPhone(slotIndex);
2782:         if (phone != null) {
2783:             String imei = phone.getImei();
2791:         Phone phone = PhoneFactory.getPhone(slotIndex);
2792:         if (phone == null) {
2796:         int subId = phone.getSubId();
2804:             return phone.getMeid();
2812:         Phone phone = PhoneFactory.getPhone(slotIndex);
2814:         if (phone != null) {
2815:             String meid = phone.getMeid();
2824:         Phone phone = PhoneFactory.getPhone(slotIndex);
2825:         if (phone == null) {
2828:         int subId = phone.getSubId();
2837:             return phone.getDeviceSvn();
2847:             final Phone phone = getPhone(subId);
2848:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
2858:             final Phone phone = getPhone(subId);
2859:             return phone == null ? null : phone.getCarrierName();
2869:             final Phone phone = getPhone(subId);
2870:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
2871:                     : phone.getSpecificCarrierId();
2881:             final Phone phone = getPhone(subId);
2882:             return phone == null ? null : phone.getSpecificCarrierName();
2893:         final Phone phone = PhoneFactory.getPhone(slotIndex);
2894:         if (phone == null) {
2899:             return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
2910:      * Make sure the caller has the MODIFY_PHONE_STATE permission.
2915:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
2935:      * Make sure the caller has the CALL_PHONE permission.
2940:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
2976:             final Phone phone = PhoneFactory.getPhone(slotIndex);
2977:             if (phone == null) {
2978:                 return PhoneConstants.PHONE_TYPE_NONE;
2980:                 return phone.getPhoneType();
3007:             final Phone phone = getPhone(subId);
3008:             if (phone != null) {
3009:                 return phone.getCdmaEriIconIndex();
3040:             final Phone phone = getPhone(subId);
3041:             if (phone != null) {
3042:                 return phone.getCdmaEriIconMode();
3071:             final Phone phone = getPhone(subId);
3072:             if (phone != null) {
3073:                 return phone.getCdmaEriText();
3092:             final Phone phone = getPhone(subId);
3093:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
3094:                 return phone.getLine1Number();
3096:                 loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
3114:             final Phone phone = getPhone(subId);
3115:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
3116:                 return phone.getCdmaMin();
3128:         if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
3130:             throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
3294:             final Phone phone = getPhone(subId);
3295:             if (phone != null) {
3296:                 phone.setVoiceActivationState(activationState);
3315:             final Phone phone = getPhone(subId);
3316:             if (phone != null) {
3317:                 phone.setDataActivationState(activationState);
3333:         final Phone phone = getPhone(subId);
3336:             if (phone != null) {
3337:                 return phone.getVoiceActivationState();
3353:         final Phone phone = getPhone(subId);
3356:             if (phone != null) {
3357:                 return phone.getDataActivationState();
3379:             final Phone phone = getPhone(subId);
3380:             if (phone != null) {
3381:                 return phone.getVoiceMessageCount();
3398:             final Phone phone = getPhone(subId);
3399:             return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
3412:         final Phone defaultPhone = getDefaultPhone();
3450:             for (Phone phone : PhoneFactory.getPhones()) {
3451:                 if (phone.isInEmergencySmsMode()) {
3462:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3489:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3527:             Phone phone = getPhone(subId);
3528:             if (phone == null) {
3533:             phone.getImsRegistrationState(regState -> {
3560:             Phone phone = getPhone(subId);
3561:             if (phone == null) {
3566:             phone.getImsRegistrationTech(regTech -> {
3585:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3611:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3662:             Phone phone = getPhone(subId);
3663:             if (phone == null) return false;
3664:             return phone.isImsCapabilityAvailable(capability, regTech);
3712:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3749:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3783:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3818:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3870:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3952:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4019:         Phone phone = getPhone(subId);
4020:         if (phone == null) {
4021:             loge("phone instance null for subid " + subId);
4025:             if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
4029:             if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
4463:             final Phone phone = getPhone(subId);
4464:             if (phone != null) {
4465:                 return phone.getServiceState().getDataNetworkType();
4497:             final Phone phone = getPhone(subId);
4498:             if (phone != null) {
4499:                 return phone.getServiceState().getDataNetworkType();
4522:             final Phone phone = getPhone(subId);
4523:             if (phone != null) {
4524:                 return phone.getServiceState().getVoiceNetworkType();
4549:             final Phone phone = PhoneFactory.getPhone(slotIndex);
4550:             if (phone != null) {
4551:                 return phone.getIccCard().hasIccCard();
4566:      * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
4567:      * or {@link Phone#LTE_ON_CDMA_TRUE}
4586:             final Phone phone = getPhone(subId);
4587:             if (phone == null) {
4655:                     + " does not correspond to an active phone");
4686:     private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
4703:                     CMD_OPEN_CHANNEL, new Pair<String, Integer>(aid, p2), phone,
4728:     private boolean iccCloseLogicalChannelWithPermission(Phone phone, int channel) {
4734:             Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, channel, phone,
4771:     private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
4780:                     new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
4827:     private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
4845:                     new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
5079:         Phone phone = PhoneFactory.getPhone(slotIndex);
5080:         if (phone != null) {
5082:                     mApp, phone.getSubId(), "resetModemConfig");
5105:         Phone phone = PhoneFactory.getPhone(slotIndex);
5106:         if (phone != null) {
5108:                     mApp, phone.getSubId(), "rebootModem");
5124:         final Phone defaultPhone = getDefaultPhone();
5486:             final Phone phone = getPhone(subId);
5487:             if (phone == null) {
5490:             OperatorInfo networkSelection = phone.getSavedNetworkSelection();
5492:                 ? phone.getManualNetworkSelectionPlmn() : networkSelection.getOperatorNumeric();
5547:             Phone phone = getPhone(subId);
5548:             if (phone == null) {
5578:             sendRequestAsync(CMD_GET_CALL_FORWARDING, argument, phone, null);
5599:             Phone phone = getPhone(subId);
5600:             if (phone == null) {
5613:             sendRequestAsync(CMD_SET_CALL_FORWARDING, arguments, phone, null);
5628:             Phone phone = getPhone(subId);
5629:             if (phone == null) {
5641:             sendRequestAsync(CMD_GET_CALL_WAITING, argument, phone, null);
5657:             Phone phone = getPhone(subId);
5658:             if (phone == null) {
5670:             sendRequestAsync(CMD_SET_CALL_WAITING, arguments, phone, null);
5777:         final Phone defaultPhone = getDefaultPhone();
6037:         final Phone phone = getPhone(subId);
6039:             if (phone != null) {
6040:                 return phone.hasMatchedTetherApnSetting();
6060:         final Phone phone = getPhone(subId);
6062:             if (phone != null) {
6067:                 phone.setAlwaysReportSignalStrength(isEnable);
6069:                 loge("setAlwaysReportSignalStrength: no phone found for subId="
6098:      * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
6116:             Phone phone = PhoneFactory.getPhone(phoneId);
6117:             if (phone != null) {
6118:                 boolean retVal = phone.isUserDataEnabled();
6122:                 if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
6145:                 mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_STATE,
6156:             Phone phone = PhoneFactory.getPhone(phoneId);
6157:             if (phone != null) {
6158:                 boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
6162:                 if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
6183:             mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_STATE,
6195:             Phone phone = PhoneFactory.getPhone(phoneId);
6196:             if (phone != null) {
6199:                     retVal = phone.isUserDataEnabled();
6201:                     retVal = phone.getDataEnabledSettings().isDataEnabledForReason(reason);
6207:                     loge("isDataEnabledForReason: no phone subId="
6218:             Phone phone) {
6219:         if (uid == Process.SYSTEM_UID || uid == Process.PHONE_UID) {
6229:         PackageManager pkgMgr = phone.getContext().getPackageManager();
6234:             int subId = phone.getSubId();
6242:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
6254:     private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, Phone phone,
6263:             int subId = phone.getSubId();
6271:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
6281:         final Phone phone = getPhone(subId);
6282:         if (phone == null) {
6286:         UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
6294:                 phone.getContext().getPackageManager()), Binder.getCallingUid(), phone);
6300:         final Phone phone = getPhone(subId);
6301:         if (phone == null) {
6306:                 UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
6313:                         phone.getContext().getPackageManager(), uid), uid, phone);
6418:         final Phone phone = getPhone(subId);
6419:         UiccCard card = phone == null ? null : phone.getUiccCard();
6439:             final Phone phone = getPhone(subId);
6440:             if (phone == null) {
6443:             final String subscriberId = phone.getSubscriberId();
6666:             final Phone phone = getPhone(subId);
6667:             return phone == null ? false : phone.setOperatorBrandOverride(brand);
6682:             final Phone phone = getPhone(subId);
6683:             if (phone == null) {
6686:             return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
6737:         Phone phone = PhoneFactory.getPhone(phoneId);
6739:         if (phone == null) {
6746:                             mApp, phone.getSubId(), "getRadioAccessFamily");
6756:         final Phone defaultPhone = getDefaultPhone();
6770:         final Phone defaultPhone = getDefaultPhone();
6824:                     .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
6855:         final Phone phone = getPhone(subscriptionId);
6856:         if (phone == null) {
6857:             loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
6864:                     phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
6897:      * Returns the unique device ID of phone, for example, the IMEI for
6901:      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
6905:         final Phone phone = PhoneFactory.getPhone(0);
6906:         if (phone == null) {
6909:         int subId = phone.getSubId();
6917:             return phone.getDeviceId();
6930:         Phone phone = getPhone(subId);
6931:         if (phone != null) {
6932:             return phone.isImsRegistered();
6953:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
6969:             Phone phone = getPhone(subscriptionId);
6970:             if (phone == null) {
6973:             return PhoneUtils.makePstnPhoneAccountHandle(phone);
6985:             Phone phone = getPhone(subId);
6986:             if (phone != null) {
6987:                 return phone.isWifiCallingEnabled();
7002:             Phone phone = getPhone(subId);
7003:             if (phone != null) {
7004:                 return phone.isVideoEnabled();
7020:             Phone phone = getPhone(subId);
7021:             if (phone != null) {
7022:                 return phone.getImsRegistrationTech();
7081:         final Phone phone = getPhone(subId);
7082:         if (phone == null) {
7089:                     phone.getContext().getOpPackageName(), phone.getContext().getAttributionTag());
7098:             final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
7226:             final Phone phone = getPhone(subId);
7227:             if (phone == null) {
7231:             ServiceState ss = phone.getServiceState();
7244:      * Returns the URI for the per-account voicemail ringtone set in Phone settings.
7255:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
7256:             if (phone == null) {
7257:                 phone = getDefaultPhone();
7260:             return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
7270:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
7280:         final Phone defaultPhone = getDefaultPhone();
7291:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
7292:             if (phone == null) {
7293:                 phone = defaultPhone;
7295:             VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
7302:      * Returns whether vibration is set for voicemail notification in Phone settings.
7312:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
7313:             if (phone == null) {
7314:                 phone = getDefaultPhone();
7317:             return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
7327:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
7337:         final Phone defaultPhone = getDefaultPhone();
7348:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
7349:             if (phone == null) {
7350:                 phone = defaultPhone;
7352:             VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
7359:      * Make sure either called from same process as self (phone) or IPC caller has read privilege.
7364:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
7369:      * Make sure either called from same process as self (phone) or IPC caller has send SMS
7412:         Phone phone = getPhone(subId);
7416:             if (phone == null) {
7421:                 aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
7441:         Phone phone = getPhone(subId);
7445:             if (phone == null) {
7450:                 esn = phone.getEsn();
7469:         Phone phone = getPhone(subId);
7473:             if (phone == null) {
7478:                 cdmaPrlVersion = phone.getCdmaPrlVersion();
7572:         final Phone phone = getPhone(subId);
7575:         if (phone == null) {
7580:             phone.carrierActionSetRadioEnabled(enabled);
7600:         final Phone phone = getPhone(subId);
7603:         if (phone == null) {
7608:             phone.carrierActionReportDefaultNetworkStatus(report);
7624:         final Phone phone = getPhone(subId);
7625:         if (phone == null) {
7630:             phone.carrierActionResetAll();
7637:      * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
7644:             writer.println("Permission Denial: can't dump Phone from pid="
7687:             Phone phone = getPhone(subId);
7688:             if (phone != null) {
7690:                     phone.carrierActionSetMeteredApnsEnabled(enabled);
7692:                     phone.getDataEnabledSettings().setDataEnabled(reason, enabled);
7712:         Phone phone = getPhone(subId);
7716:             if (phone != null) {
7717:                 return phone.getClientRequestStats();
7744:         Phone phone = PhoneFactory.getPhone(slotIndex);
7750:             if (phone != null) {
7751:                 phone.setSimPowerState(state, workSource);
7773:      * Check if phone is in emergency callback mode
7774:      * @return true if phone is in emergency callback mode
7780:         final Phone phone = getPhone(subId);
7784:             if (phone != null) {
7785:                 return phone.isInEcm();
7805:             Phone p = getPhone(subId);
7825:         Phone phone = PhoneFactory.getPhone(slotIndex);
7826:         if (phone != null) {
7827:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
7834:                 return phone.getRadioPowerState();
7847:      * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
7867:             Phone phone = getPhone(subId);
7868:             isEnabled =  phone != null ? phone.getDataRoamingEnabled() : false;
7880:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
7893:             Phone phone = getPhone(subId);
7894:             if (phone != null) {
7895:                 phone.setDataRoamingEnabled(isEnabled);
7911:             Phone phone = getPhone(subId);
7912:             if (phone != null) {
7913:                 isAllowed = phone.isCspPlmnEnabled();
7932:             // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
8069:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
8078:             Phone phone = getPhone(subId);
8079:             if (phone == null) {
8082:             UiccCard uiccCard = phone.getUiccCard();
8119:      * not set, return {@link Phone#PREFERRED_NT_MODE}.
8127:         return Phone.PREFERRED_NT_MODE;
8137:             final Phone phone = getPhone(subId);
8138:             if (phone == null) {
8142:             phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
8160:             final Phone phone = getPhone(subId);
8161:             if (phone == null) {
8165:             return phone.getCarrierIdListVersion();
8248:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
8253:             for (Phone phone: PhoneFactory.getPhones()) {
8254:                 if (phone.getEmergencyNumberTracker() != null
8255:                         && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
8257:                             phone.getSubId(),
8258:                             phone.getEmergencyNumberTracker().getEmergencyNumberList());
8269:         final Phone defaultPhone = getDefaultPhone();
8277:             for (Phone phone: PhoneFactory.getPhones()) {
8278:                 if (phone.getEmergencyNumberTracker() != null
8279:                         && phone.getEmergencyNumberTracker()
8300:             for (Phone phone: PhoneFactory.getPhones()) {
8301:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
8322:             for (Phone phone: PhoneFactory.getPhones()) {
8323:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
8342:             final Phone phone = getPhone(subId);
8343:             if (phone == null) {
8347:             return phone.getEmergencyNumberDbVersion();
8359:             for (Phone phone: PhoneFactory.getPhones()) {
8360:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
8376:             for (Phone phone: PhoneFactory.getPhones()) {
8377:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
8393:             for (Phone phone: PhoneFactory.getPhones()) {
8394:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
8407:         Phone phone = getPhone(subId);
8408:         if (phone == null) {
8414:                     .getUiccProfileForPhone(phone.getPhoneId());
8433:             Phone phone = PhoneFactory.getPhone(slotIndex);
8434:             if (phone == null) {
8437:                 return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
8450:         Phone phone = PhoneFactory.getPhone(slotIndex);
8451:         if (phone == null) return false;
8454:                 mApp, phone.getSubId(), callingPackage, callingFeatureId,
8456:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
8462:                 return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
8464:                 return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
8532:      * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
8533:      * permission, but the other way around is possible with either MODIFY_PHONE_STATE
8562:         Phone phone = getPhone(subId);
8563:         if (phone == null) {
8568:             UiccCard uiccCard = phone.getUiccCard();
8638:         Phone phone = getDefaultPhone();
8639:         if (phone == null) return -1;
8640:         HalVersion hv = phone.getHalVersion();
8670:         enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
8676:             Phone phone = getPhone(subId);
8677:             if (phone == null) return false;
8679:             boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
8680:             return !isMetered || phone.getDataEnabledSettings().isDataEnabled(apnType);
8693:             Phone phone = getPhone(subId);
8694:             if (phone == null) return true; // By default return true.
8696:             return ApnSettingUtils.isMeteredApnType(apnType, phone);
8708:             Phone phone = getPhone(subscriptionId);
8709:             if (phone == null) {
8729:             sendRequestAsync(CMD_SET_SYSTEM_SELECTION_CHANNELS, argument, phone, null);
8827:             Phone phone = getPhone(subscriptionId);
8828:             if (phone == null) return false;
8832:                     return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
8834:                     return phone.getDataEnabledSettings().isMmsAlwaysAllowed();
8850:             Phone phone = getPhone(subscriptionId);
8851:             if (phone == null) return;
8855:                     phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(enabled);
8858:                     phone.getDataEnabledSettings().setAlwaysAllowMmsData(enabled);
8880:             for (Phone phone : PhoneFactory.getPhones()) {
8881:                 Phone defaultPhone = phone.getImsPhone();
8882:                 if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
8927:             Phone phone = getPhone(subId);
8928:             if (phone != null && phone.getIccCard() != null) {
8929:                 return phone.getIccCard().getIccLockEnabled();
8953:         Phone phone = getPhone(subId);
8954:         if (phone == null) {
8961:                     new Pair<Boolean, String>(enabled, password), phone, null);
8985:         Phone phone = getPhone(subId);
8986:         if (phone == null) {
8993:                     new Pair<String, String>(oldPassword, newPassword), phone, null);
9052:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
9055:         Phone phone = getPhone(subId);
9056:         if (phone == null) {
9057:             throw new RuntimeException("phone is not available");
9062:             return phone.getEquivalentHomePlmns();
22: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
63: import android.telecom.PhoneAccount;
64: import android.telecom.PhoneAccountHandle;
84: import android.telephony.PhoneCapability;
85: import android.telephony.PhoneNumberRange;
143: import com.android.internal.telephony.PhoneConfigurationManager;
144: import com.android.internal.telephony.PhoneConstantConversions;
145: import com.android.internal.telephony.PhoneConstants;
146: import com.android.internal.telephony.PhoneFactory;
160: import com.android.internal.telephony.imsphone.ImsPhone;
161: import com.android.internal.telephony.imsphone.ImsPhoneCallTracker;
202:     private static final String LOG_TAG = "PhoneInterfaceManager";
203:     private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
309:     private static PhoneInterfaceManager sInstance;
311:     private PhoneGlobals mApp;
708:                     defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
735:                     defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
746:                     defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
756:                     defaultPhone.resetModemConfig(onCompleted);
888:                     defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
1170:                     if (defaultPhone != null) {
1171:                         defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
1234:                     defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
1262:                     defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
1486:                     defaultPhone.rebootModem(onCompleted);
1496:                     PhoneConfigurationManager.getInstance()
1506:                         mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
1517:                     PhoneConfigurationManager.getInstance()
1634:                     defaultPhone.eraseModemConfig(onCompleted);
1680:                     getDefaultPhone().getContext().sendBroadcastAsUser(
1826:      * Initialize the singleton PhoneInterfaceManager instance.
1827:      * This is only done once, at startup, from PhoneApp.onCreate().
1829:     /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
1830:         synchronized (PhoneInterfaceManager.class) {
1832:                 sInstance = new PhoneInterfaceManager(app);
1843:         mCM = PhoneGlobals.getInstance().mCM;
1844:         mImsResolver = PhoneGlobals.getInstance().getImsResolver();
1852:         mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
1860:         return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
1882:                 ? getDefaultPhone() : getPhone(subId);
1893:         return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
1911:         PackageManager pm = getDefaultPhone().getContext().getPackageManager();
1938:             PhoneConstants.State state = mCM.getState(subId);
1939:             if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
1998:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
2003:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
2011:             final UnlockSim checkSimPin = new UnlockSim(getPhone(subId).getIccCard());
2024:             final UnlockSim checkSimPuk = new UnlockSim(getPhone(subId).getIccCard());
2041:         private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
2071:                                             mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
2076:                                             mResult = PhoneConstants.PIN_OPERATION_ABORTED;
2078:                                             mResult = PhoneConstants.PIN_GENERAL_FAILURE;
2081:                                         mResult = PhoneConstants.PIN_RESULT_SUCCESS;
2289:             logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
2324:             if (defaultPhone != null) {
2325:                 defaultPhone.setRadioPower(turnOn);
2471:                 return PhoneConstantConversions.convertDataState(
2472:                         PhoneConstants.DataState.DISCONNECTED);
2544:             final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
2752:             getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
2956:         Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
2960:         Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
2964:         Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
3126:     public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
3155:             return getDefaultPhone().needsOtaServiceProvisioning();
3190:             PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
3191:             if (phoneAccountHandle == null) {
3194:             return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
3279:         SmsController smsController = PhoneFactory.getSmsController();
3414:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
3423:             defaultPhone.sendDialerSpecialCode(inputCode);
3478:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3502:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3598:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3625:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3641:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3720:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3738:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3758:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3773:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3792:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3808:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3827:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3843:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3859:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3879:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3895:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3910:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3926:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3942:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3961:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3980:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3998:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4043:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4073:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4106:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4165:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4334:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4359:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4385:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4411:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4581:             return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4588:                 return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4591:                         .orElse(PhoneConstants.LTE_ON_CDMA_FALSE);
4652:         int phoneId = UiccController.getInstance().getPhoneIdFromSlotId(slotIndex);
4653:         if (phoneId == -1) {
4657:         return PhoneFactory.getPhone(phoneId);
4692:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4834:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
5125:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
5132:             return defaultPhone.getPcscfAddress(apnType);
5406:             getDefaultPhone().setImsRegistrationState(registered);
5717:                     request, messenger, binder, getPhone(subId),
5778:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
5786:             return PhoneFactory.calculatePreferredNetworkType(defaultPhone.getContext(), 0);
6114:             int phoneId = mSubscriptionController.getPhoneId(subId);
6115:             if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
6154:             int phoneId = mSubscriptionController.getPhoneId(subId);
6155:             if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
6190:             int phoneId = mSubscriptionController.getPhoneId(subId);
6192:                 log("isDataEnabledForReason: subId=" + subId + " phoneId=" + phoneId
6322:         int phoneId = SubscriptionManager.getPhoneId(subId);
6323:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
6330:             getPhone(phoneId), pkgName);
6347:                 getPhone(i), pkgName);
6358:         if (!SubscriptionManager.isValidPhoneId(phoneId)) {
6359:             loge("phoneId " + phoneId + " is not valid.");
6362:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
6364:             loge("getCarrierPackageNamesForIntentAndPhone: No UICC");
6371:     public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
6375:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
6736:     public int getRadioAccessFamily(int phoneId, String callingPackage) {
6747:             raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
6761:             ImsManager.getInstance(defaultPhone.getContext(),
6762:                     defaultPhone.getPhoneId()).setVtSetting(enable);
6771:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
6783:                     ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
6898:      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
6942:             return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
6950:             PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
6957:             return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
7054:             cleanUpSmsRawTable(getDefaultPhone().getContext());
7065:               sendEraseModemConfig(getDefaultPhone());
7246:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
7249:      * PhoneAccount.
7252:     public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
7272:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
7275:      * PhoneAccount.
7279:             PhoneAccountHandle phoneAccountHandle, Uri uri) {
7282:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
7285:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
7304:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
7306:      * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
7309:     public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
7329:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
7332:      * specific PhoneAccount.
7336:             PhoneAccountHandle phoneAccountHandle, boolean enabled) {
7339:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
7342:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
7658:         return new TelephonyShellCommand(this, getDefaultPhone().getContext()).exec(
7934:             if (checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
8123:         int phoneId = mSubscriptionController.getPhoneId(subId);
8124:         if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
8125:             return list.get(phoneId);
8273:                             mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
8489:                 getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
8512:         PhoneCapability staticCapability =
8618:             int phoneCount = TelephonyManager.getDefault().getPhoneCount();
8620:             int[] logicalSlotsMapping = new int[phoneCount];
8771:         SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
8797:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8814:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8883:                     ImsPhone imsPhone = (ImsPhone) defaultPhone;
8885:                             (ImsPhoneCallTracker) imsPhone.getCallTracker();
8887:                     Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
8888:                             + imsPhone.getMsisdn());
9022:         // *  Inherited from PhoneWindowManager  *
131: import com.android.internal.telephony.DefaultPhoneNotifier;
491:                             getPhoneFromRequest(request).handlePinMmi((String) request.argument)
850:                     getPhoneFromRequest(request).getPreferredNetworkType(onCompleted);
878:                     getPhoneFromRequest(request).setPreferredNetworkType(networkType, onCompleted);
902:                     getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
914:                     getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
924:                     getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
1037:                     getPhoneFromRequest(request).getCallWaiting(onCompleted);
1083:                     getPhoneFromRequest(request).setCallWaiting(enable, onCompleted);
1150:                     getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
1345:                     getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
1366:                     getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
1382:                     getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
1393:                     getPhoneFromRequest(request).queryCdmaSubscriptionMode(onCompleted);
1409:                     getPhoneFromRequest(request).setCdmaSubscriptionMode(
1527:                         mPhoneConfigurationManager.addToPhoneStatusCache(id,
1644:                     getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
1662:                     getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
1876:             return getPhoneFromSubId(request.subId);
2210:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2285:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2302:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2304:                 shutdownRadioUsingPhoneId(i);
2829:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2969:         return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
2999:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3032:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3063:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3204:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3372:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3432:                     .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3469:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3495:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3552:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3592:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3617:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3717:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3754:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3788:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3823:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3875:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3957:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4039:         checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
4103:         checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
4455:                 && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
4489:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4514:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4607:         return mSubscriptionController.getPhoneId(getDefaultSubscription());
4669:         return iccOpenLogicalChannelWithPermission(getPhoneFromSubId(subId), callingPackage, aid,
4682:         return iccOpenLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4717:         return iccCloseLogicalChannelWithPermission(getPhoneFromSubId(subId), channel);
4724:         return iccCloseLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4753:         return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
4767:                 getPhoneFromSlotIdOrThrowException(slotIndex), channel, cla, command, p1, p2, p3,
4806:         return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
4822:                 getPhoneFromSlotIdOrThrowException(slotIndex), callingPackage, cla, command, p1,
4907:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4945:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
5349:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5477:                     .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
5801:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5850:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5895:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5899:             return getPhoneFromSubId(subId).getAllowedNetworkTypes(reason);
5943:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5965:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5971:                     getPhoneFromSubId(subId).getCarrierBandwidth();
5990:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5994:             return getPhoneFromSubId(subId).getEffectiveAllowedNetworkTypes();
6016:             getPhoneFromSubId(subId).setAllowedNetworkTypes(reason, allowedNetworkTypes);
6338:         for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
6402:         enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
6408:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
6486:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
6513:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6536:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6745:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
6795:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6814:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6951:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
6952:                 callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
6965:         enforceReadPrivilegedPermission("getPhoneAccountHandleForSubscriptionId, "
7190:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7708:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7860:             TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
7905:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
8033:                         slot.getPhoneId(),
8174:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8182:             return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
8191:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
8218:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
8245:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8272:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
8453:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8488:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
8513:                 mPhoneConfigurationManager.getStaticPhoneCapability();
8553:             mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
8593:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8600:             return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
8609:         metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
8623:                 if (SubscriptionManager.isValidPhoneId(slotInfos[i].getLogicalSlotIdx())) {
8738:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
8757:                 SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
8884:                     ImsPhoneCallTracker imsPhoneCallTracker =
8886:                     imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
9050:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
android.googlesource.com/platform/superproject:packages/services/Telephony/src/com/android/phone/PhoneInterfaceManager.java: [ master, ]
384:         public Phone phone;
17: package com.android.phone;
198: public class PhoneInterfaceManager extends ITelephony.Stub {
1655:     private PhoneInterfaceManager(PhoneGlobals app) {
1672:     private Phone getDefaultPhone() {
1706:     private Phone getPhone(int subId) {
2347:     public String getNetworkCountryIsoForPhone(int phoneId) {
5936:     public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
5959:     public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
6417:     public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
308:     private PhoneConfigurationManager mPhoneConfigurationManager;
1686:     private Phone getPhoneFromRequest(MainThreadRequest request) {
1694:     private Phone getPhoneFromSubId(int subId) {
2125:     private void shutdownRadioUsingPhoneId(int phoneId) {
2780:     public int getActivePhoneType() {
2785:     public int getActivePhoneTypeForSlot(int slotIndex) {
3824:     private void checkModifyPhoneStatePermission(int subId, String message) {
4463:     private Phone getPhoneFromSlotIdOrThrowException(int slotIndex) {
6003:     public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
6543:     public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
6553:     public int getSubIdForPhoneAccountHandle(
6568:     public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
140: import com.android.internal.telephony.Phone;
174: import com.android.phone.settings.PickSmsSubscriptionActivity;
175: import com.android.phone.vvm.PhoneAccountHandleConverter;
176: import com.android.phone.vvm.RemoteVvmTaskManager;
177: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
178: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
383:         // In cases where subId is unavailable, the caller needs to specify the phone.
392:         MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
394:             if (phone != null) {
395:                 this.phone = phone;
423:      * A handler that processes messages on the main thread in the phone process. Since many
424:      * of the Phone calls are not thread safe this is needed to shuttle the requests from the
425:      * inbound binder threads to the main thread in the phone process.  The Binder thread
442:             final Phone defaultPhone = getDefaultPhone();
447:                     final Phone phone = getPhoneFromRequest(request);
466:                         request.result = phone != null
467:                                 ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
478:                     final Phone phone = getPhoneFromRequest(request);
479:                     request.result = phone != null ?
1266:                     request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
1280:                     request.phone.requestCellInfoUpdate(request.workSource,
1308:                     Phone phone = getPhoneFromRequest(request);
1309:                     phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
1317:                         phone = getPhoneFromRequest(request);
1318:                         request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
1340:                             .enablePhone(request.phone, enable, onCompleted);
1346:                     int phoneId = request.phone.getPhoneId();
1361:                             .getPhoneStatusFromModem(request.phone, onCompleted);
1366:                     int id = request.phone.getPhoneId();
1389:                     request.phone.setSystemSelectionChannels(args.first, onCompleted);
1569:     private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
1571:                 command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone, workSource);
1580:             int command, Object argument, Integer subId, Phone phone, WorkSource workSource) {
1586:         if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
1587:             throw new IllegalArgumentException("subId and phone cannot both be specified!");
1588:         } else if (phone != null) {
1589:             request = new MainThreadRequest(argument, phone, workSource);
1629:      * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
1633:             int command, Object argument, Phone phone, WorkSource workSource) {
1634:         MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
1673:         Phone thePhone = getPhone(getDefaultSubscription());
1687:         if (request.phone != null) {
1688:             return request.phone;
1700:         Phone phone = getPhoneFromRequest(request);
1701:         return phone == null ? null :
1702:                 UiccController.getInstance().getUiccCard(phone.getPhoneId());
1705:     // returns phone associated with the subId.
1710:     private void sendEraseModemConfig(Phone phone) {
1711:         if (phone != null) {
1713:                   mApp, phone.getSubId(), "eraseModemConfig");
1751:             // PENDING: should we just silently fail if phone is offhook or ringing?
1772:         // from the context of the phone app.
1775:         if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
1993:             final Phone phone = getPhone(getDefaultSubscription());
1994:             if (phone != null) {
1995:                 phone.updateServiceLocation(workSource);
2040:             final Phone phone = getPhone(subId);
2041:             if (phone != null) {
2042:                 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
2060:             final Phone phone = getPhone(subId);
2061:             if (phone != null) {
2062:                 phone.setRadioPower(!isRadioOnForSubscriber(subId));
2078:             final Phone phone = getPhone(subId);
2079:             if (phone == null) {
2082:             if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
2100:                 Phone phone = PhoneFactory.getPhone(i);
2101:                 if (phone != null && phone.isRadioAvailable()) return true;
2117:                 logv("Shutting down Phone " + i);
2126:         Phone phone = PhoneFactory.getPhone(phoneId);
2127:         if (phone != null && phone.isRadioAvailable()) {
2128:             phone.shutdownRadio();
2137:             final Phone defaultPhone = PhoneFactory.getDefaultPhone();
2142:                 loge("There's no default phone.");
2155:             final Phone phone = getPhone(subId);
2156:             if (phone != null) {
2157:                 phone.setRadioPower(turnOn);
2175:             final Phone phone = getPhone(subId);
2176:             if (phone != null) {
2177:                 phone.getDataEnabledSettings().setUserDataEnabled(true);
2195:             final Phone phone = getPhone(subId);
2196:             if (phone != null) {
2197:                 phone.getDataEnabledSettings().setUserDataEnabled(false);
2211:             final Phone phone = getPhone(subId);
2212:             if (phone != null) {
2213:                 return phone.isDataAllowed(ApnSetting.TYPE_DEFAULT);
2262:             Phone phone = PhoneFactory.getPhone(slotIndex);
2263:             return phone == null ? TelephonyManager.CALL_STATE_IDLE :
2264:                     PhoneConstantConversions.convertCallState(phone.getState());
2279:             final Phone phone = getPhone(subId);
2280:             if (phone != null) {
2281:                 return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
2300:             final Phone phone = getPhone(subId);
2301:             if (phone != null) {
2302:                 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
2331:                 return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
2352:             if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
2353:                 // Get default phone in this case.
2354:                 phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
2357:             Phone phone = PhoneFactory.getPhone(phoneId);
2358:             if (phone == null) return "";
2359:             ServiceStateTracker sst = phone.getServiceStateTracker();
2364:             EmergencyNumberTracker ent = phone.getEmergencyNumberTracker();
2449:         for (Phone phone : PhoneFactory.getPhones()) {
2450:             List<CellInfo> info = phone.getAllCellInfo();
2489:             for (Phone phone : PhoneFactory.getPhones()) {
2491:                         CMD_GET_ALL_CELL_INFO, null, phone, workSource);
2551:         final Phone phone = getPhoneFromSubId(subId);
2552:         if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
2554:         sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
2572:         Phone phone = PhoneFactory.getPhone(slotIndex);
2573:         if (phone == null) {
2576:         int subId = phone.getSubId();
2584:             return phone.getImei();
2592:         Phone phone = PhoneFactory.getPhone(slotIndex);
2594:         if (phone != null) {
2595:             String imei = phone.getImei();
2603:         Phone phone = PhoneFactory.getPhone(slotIndex);
2604:         if (phone == null) {
2608:         int subId = phone.getSubId();
2616:             return phone.getMeid();
2624:         Phone phone = PhoneFactory.getPhone(slotIndex);
2626:         if (phone != null) {
2627:             String meid = phone.getMeid();
2636:         Phone phone = PhoneFactory.getPhone(slotIndex);
2637:         if (phone == null) {
2640:         int subId = phone.getSubId();
2649:             return phone.getDeviceSvn();
2659:             final Phone phone = getPhone(subId);
2660:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
2670:             final Phone phone = getPhone(subId);
2671:             return phone == null ? null : phone.getCarrierName();
2681:             final Phone phone = getPhone(subId);
2682:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
2683:                     : phone.getSpecificCarrierId();
2693:             final Phone phone = getPhone(subId);
2694:             return phone == null ? null : phone.getSpecificCarrierName();
2705:         final Phone phone = PhoneFactory.getPhone(slotIndex);
2706:         if (phone == null) {
2711:             return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
2722:      * Make sure the caller has the MODIFY_PHONE_STATE permission.
2727:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
2747:      * Make sure the caller has the CALL_PHONE permission.
2752:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
2788:             final Phone phone = PhoneFactory.getPhone(slotIndex);
2789:             if (phone == null) {
2790:                 return PhoneConstants.PHONE_TYPE_NONE;
2792:                 return phone.getPhoneType();
2819:             final Phone phone = getPhone(subId);
2820:             if (phone != null) {
2821:                 return phone.getCdmaEriIconIndex();
2852:             final Phone phone = getPhone(subId);
2853:             if (phone != null) {
2854:                 return phone.getCdmaEriIconMode();
2883:             final Phone phone = getPhone(subId);
2884:             if (phone != null) {
2885:                 return phone.getCdmaEriText();
2904:             final Phone phone = getPhone(subId);
2905:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2906:                 return phone.getLine1Number();
2908:                 loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
2926:             final Phone phone = getPhone(subId);
2927:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2928:                 return phone.getCdmaMin();
2940:         if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
2942:             throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
3106:             final Phone phone = getPhone(subId);
3107:             if (phone != null) {
3108:                 phone.setVoiceActivationState(activationState);
3127:             final Phone phone = getPhone(subId);
3128:             if (phone != null) {
3129:                 phone.setDataActivationState(activationState);
3145:         final Phone phone = getPhone(subId);
3148:             if (phone != null) {
3149:                 return phone.getVoiceActivationState();
3165:         final Phone phone = getPhone(subId);
3168:             if (phone != null) {
3169:                 return phone.getDataActivationState();
3191:             final Phone phone = getPhone(subId);
3192:             if (phone != null) {
3193:                 return phone.getVoiceMessageCount();
3210:             final Phone phone = getPhone(subId);
3211:             return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
3224:         final Phone defaultPhone = getDefaultPhone();
3262:             for (Phone phone : PhoneFactory.getPhones()) {
3263:                 if (phone.isInEmergencySmsMode()) {
3274:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3301:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3339:             Phone phone = getPhone(subId);
3340:             if (phone == null) {
3345:             phone.getImsRegistrationState(regState -> {
3372:             Phone phone = getPhone(subId);
3373:             if (phone == null) {
3378:             phone.getImsRegistrationTech(regTech -> {
3397:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3423:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3474:             Phone phone = getPhone(subId);
3475:             if (phone == null) return false;
3476:             return phone.isImsCapabilityAvailable(capability, regTech);
3524:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3561:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3595:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3630:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3682:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3764:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3831:         Phone phone = getPhone(subId);
3832:         if (phone == null) {
3833:             loge("phone instance null for subid " + subId);
3837:             if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
3841:             if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
4275:             final Phone phone = getPhone(subId);
4276:             if (phone != null) {
4277:                 return phone.getServiceState().getDataNetworkType();
4309:             final Phone phone = getPhone(subId);
4310:             if (phone != null) {
4311:                 return phone.getServiceState().getDataNetworkType();
4334:             final Phone phone = getPhone(subId);
4335:             if (phone != null) {
4336:                 return phone.getServiceState().getVoiceNetworkType();
4361:             final Phone phone = PhoneFactory.getPhone(slotIndex);
4362:             if (phone != null) {
4363:                 return phone.getIccCard().hasIccCard();
4378:      * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
4379:      * or {@link Phone#LTE_ON_CDMA_TRUE}
4398:             final Phone phone = getPhone(subId);
4399:             if (phone == null) {
4467:                     + " does not correspond to an active phone");
4498:     private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
4515:                     CMD_OPEN_CHANNEL, new Pair<String, Integer>(aid, p2), phone,
4540:     private boolean iccCloseLogicalChannelWithPermission(Phone phone, int channel) {
4546:             Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, channel, phone,
4583:     private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
4592:                     new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
4639:     private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
4657:                     new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
4891:         Phone phone = PhoneFactory.getPhone(slotIndex);
4892:         if (phone != null) {
4894:                     mApp, phone.getSubId(), "resetModemConfig");
4917:         Phone phone = PhoneFactory.getPhone(slotIndex);
4918:         if (phone != null) {
4920:                     mApp, phone.getSubId(), "rebootModem");
4936:         final Phone defaultPhone = getDefaultPhone();
5268:             final Phone phone = getPhone(subId);
5269:             if (phone == null) {
5272:             OperatorInfo networkSelection = phone.getSavedNetworkSelection();
5274:                 ? phone.getManualNetworkSelectionPlmn() : networkSelection.getOperatorNumeric();
5484:         final Phone defaultPhone = getDefaultPhone();
5670:         final Phone phone = getPhone(subId);
5672:             if (phone != null) {
5673:                 return phone.hasMatchedTetherApnSetting();
5697:             Phone phone = PhoneFactory.getPhone(phoneId);
5698:             if (phone != null) {
5700:                 phone.getDataEnabledSettings().setUserDataEnabled(enable);
5702:                 loge("setUserDataEnabled: no phone found. Invalid subId=" + subId);
5720:         final Phone phone = getPhone(subId);
5722:             if (phone != null) {
5727:                 phone.setAlwaysReportSignalStrength(isEnable);
5729:                 loge("setAlwaysReportSignalStrength: no phone found for subId="
5758:      * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
5776:             Phone phone = PhoneFactory.getPhone(phoneId);
5777:             if (phone != null) {
5778:                 boolean retVal = phone.isUserDataEnabled();
5782:                 if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
5805:             Phone phone = PhoneFactory.getPhone(phoneId);
5806:             if (phone != null) {
5807:                 boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
5811:                 if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
5820:             Phone phone) {
5821:         if (uid == Process.SYSTEM_UID || uid == Process.PHONE_UID) {
5831:         PackageManager pkgMgr = phone.getContext().getPackageManager();
5836:             int subId = phone.getSubId();
5844:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5856:     private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, Phone phone,
5865:             int subId = phone.getSubId();
5873:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5883:         final Phone phone = getPhone(subId);
5884:         if (phone == null) {
5888:         UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
5896:                 phone.getContext().getPackageManager()), Binder.getCallingUid(), phone);
5902:         final Phone phone = getPhone(subId);
5903:         if (phone == null) {
5908:                 UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
5915:                         phone.getContext().getPackageManager(), uid), uid, phone);
6020:         final Phone phone = getPhone(subId);
6021:         UiccCard card = phone == null ? null : phone.getUiccCard();
6043:             final Phone phone = getPhone(subId);
6044:             if (phone == null) {
6047:             final String subscriberId = phone.getSubscriberId();
6270:             final Phone phone = getPhone(subId);
6271:             return phone == null ? false : phone.setOperatorBrandOverride(brand);
6286:             final Phone phone = getPhone(subId);
6287:             if (phone == null) {
6290:             return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
6341:         Phone phone = PhoneFactory.getPhone(phoneId);
6343:         if (phone == null) {
6350:                             mApp, phone.getSubId(), "getRadioAccessFamily");
6360:         final Phone defaultPhone = getDefaultPhone();
6374:         final Phone defaultPhone = getDefaultPhone();
6428:                     .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
6459:         final Phone phone = getPhone(subscriptionId);
6460:         if (phone == null) {
6461:             loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
6468:                     phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
6501:      * Returns the unique device ID of phone, for example, the IMEI for
6505:      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
6509:         final Phone phone = PhoneFactory.getPhone(0);
6510:         if (phone == null) {
6513:         int subId = phone.getSubId();
6521:             return phone.getDeviceId();
6534:         Phone phone = getPhone(subId);
6535:         if (phone != null) {
6536:             return phone.isImsRegistered();
6557:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
6573:             Phone phone = getPhone(subscriptionId);
6574:             if (phone == null) {
6577:             return PhoneUtils.makePstnPhoneAccountHandle(phone);
6589:             Phone phone = getPhone(subId);
6590:             if (phone != null) {
6591:                 return phone.isWifiCallingEnabled();
6606:             Phone phone = getPhone(subId);
6607:             if (phone != null) {
6608:                 return phone.isVideoEnabled();
6624:             Phone phone = getPhone(subId);
6625:             if (phone != null) {
6626:                 return phone.getImsRegistrationTech();
6684:         final Phone phone = getPhone(subId);
6685:         if (phone == null) {
6692:                     phone.getContext().getOpPackageName(), phone.getContext().getAttributionTag());
6701:             final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
6829:             final Phone phone = getPhone(subId);
6830:             if (phone == null) {
6834:             ServiceState ss = phone.getServiceState();
6847:      * Returns the URI for the per-account voicemail ringtone set in Phone settings.
6858:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6859:             if (phone == null) {
6860:                 phone = getDefaultPhone();
6863:             return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
6873:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6883:         final Phone defaultPhone = getDefaultPhone();
6894:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6895:             if (phone == null) {
6896:                 phone = defaultPhone;
6898:             VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
6905:      * Returns whether vibration is set for voicemail notification in Phone settings.
6915:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6916:             if (phone == null) {
6917:                 phone = getDefaultPhone();
6920:             return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
6930:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6940:         final Phone defaultPhone = getDefaultPhone();
6951:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6952:             if (phone == null) {
6953:                 phone = defaultPhone;
6955:             VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
6962:      * Make sure either called from same process as self (phone) or IPC caller has read privilege.
6967:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
6972:      * Make sure either called from same process as self (phone) or IPC caller has send SMS
7015:         Phone phone = getPhone(subId);
7019:             if (phone == null) {
7024:                 aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
7044:         Phone phone = getPhone(subId);
7048:             if (phone == null) {
7053:                 esn = phone.getEsn();
7072:         Phone phone = getPhone(subId);
7076:             if (phone == null) {
7081:                 cdmaPrlVersion = phone.getCdmaPrlVersion();
7175:         final Phone phone = getPhone(subId);
7178:         if (phone == null) {
7183:             phone.carrierActionSetMeteredApnsEnabled(enabled);
7200:         final Phone phone = getPhone(subId);
7203:         if (phone == null) {
7208:             phone.carrierActionSetRadioEnabled(enabled);
7228:         final Phone phone = getPhone(subId);
7231:         if (phone == null) {
7236:             phone.carrierActionReportDefaultNetworkStatus(report);
7252:         final Phone phone = getPhone(subId);
7253:         if (phone == null) {
7258:             phone.carrierActionResetAll();
7265:      * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
7272:             writer.println("Permission Denial: can't dump Phone from pid="
7303:             Phone phone = getPhone(subId);
7304:             if (phone != null) {
7305:                 phone.getDataEnabledSettings().setPolicyDataEnabled(enabled);
7324:         Phone phone = getPhone(subId);
7328:             if (phone != null) {
7329:                 return phone.getClientRequestStats();
7356:         Phone phone = PhoneFactory.getPhone(slotIndex);
7362:             if (phone != null) {
7363:                 phone.setSimPowerState(state, workSource);
7385:      * Check if phone is in emergency callback mode
7386:      * @return true if phone is in emergency callback mode
7392:         final Phone phone = getPhone(subId);
7396:             if (phone != null) {
7397:                 return phone.isInEcm();
7417:             Phone p = getPhone(subId);
7437:         Phone phone = PhoneFactory.getPhone(slotIndex);
7438:         if (phone != null) {
7439:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
7446:                 return phone.getRadioPowerState();
7459:      * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
7479:             Phone phone = getPhone(subId);
7480:             isEnabled =  phone != null ? phone.getDataRoamingEnabled() : false;
7492:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
7505:             Phone phone = getPhone(subId);
7506:             if (phone != null) {
7507:                 phone.setDataRoamingEnabled(isEnabled);
7523:             Phone phone = getPhone(subId);
7524:             if (phone != null) {
7525:                 isAllowed = phone.isCspPlmnEnabled();
7544:             // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
7681:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
7690:             Phone phone = getPhone(subId);
7691:             if (phone == null) {
7694:             UiccCard uiccCard = phone.getUiccCard();
7731:      * not set, return {@link Phone#PREFERRED_NT_MODE}.
7739:         return Phone.PREFERRED_NT_MODE;
7749:             final Phone phone = getPhone(subId);
7750:             if (phone == null) {
7754:             phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
7772:             final Phone phone = getPhone(subId);
7773:             if (phone == null) {
7777:             return phone.getCarrierIdListVersion();
7846:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7851:             for (Phone phone: PhoneFactory.getPhones()) {
7852:                 if (phone.getEmergencyNumberTracker() != null
7853:                         && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
7855:                             phone.getSubId(),
7856:                             phone.getEmergencyNumberTracker().getEmergencyNumberList());
7867:         final Phone defaultPhone = getDefaultPhone();
7875:             for (Phone phone: PhoneFactory.getPhones()) {
7876:                 if (phone.getEmergencyNumberTracker() != null
7877:                         && phone.getEmergencyNumberTracker()
7898:             for (Phone phone: PhoneFactory.getPhones()) {
7899:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7920:             for (Phone phone: PhoneFactory.getPhones()) {
7921:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7940:             final Phone phone = getPhone(subId);
7941:             if (phone == null) {
7945:             return phone.getEmergencyNumberDbVersion();
7957:             for (Phone phone: PhoneFactory.getPhones()) {
7958:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7974:             for (Phone phone: PhoneFactory.getPhones()) {
7975:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7991:             for (Phone phone: PhoneFactory.getPhones()) {
7992:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
8005:         Phone phone = getPhone(subId);
8006:         if (phone == null) {
8012:                     .getUiccProfileForPhone(phone.getPhoneId());
8031:             Phone phone = PhoneFactory.getPhone(slotIndex);
8032:             if (phone == null) {
8035:                 return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
8048:         Phone phone = PhoneFactory.getPhone(slotIndex);
8049:         if (phone == null) return false;
8052:                 mApp, phone.getSubId(), callingPackage, callingFeatureId,
8054:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
8060:                 return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
8062:                 return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
8130:      * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
8131:      * permission, but the other way around is possible with either MODIFY_PHONE_STATE
8160:         Phone phone = getPhone(subId);
8161:         if (phone == null) {
8166:             UiccCard uiccCard = phone.getUiccCard();
8236:         Phone phone = getDefaultPhone();
8237:         if (phone == null) return -1;
8238:         HalVersion hv = phone.getHalVersion();
8268:         enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
8274:             Phone phone = getPhone(subId);
8275:             if (phone == null) return false;
8277:             boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
8278:             return !isMetered || phone.getDataEnabledSettings().isDataEnabled(apnType);
8291:             Phone phone = getPhone(subId);
8292:             if (phone == null) return true; // By default return true.
8294:             return ApnSettingUtils.isMeteredApnType(apnType, phone);
8306:             Phone phone = getPhone(subscriptionId);
8307:             if (phone == null) {
8327:             sendRequestAsync(CMD_SET_SYSTEM_SELECTION_CHANNELS, argument, phone, null);
8408:             Phone phone = getPhone(subId);
8409:             if (phone == null) return false;
8411:             return phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(allow);
8424:             Phone phone = getPhone(subId);
8425:             if (phone == null) return false;
8427:             return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
8440:             Phone phone = getPhone(subId);
8441:             if (phone == null) return false;
8443:             return phone.getDataEnabledSettings().setAlwaysAllowMmsData(alwaysAllow);
8461:             for (Phone phone : PhoneFactory.getPhones()) {
8462:                 Phone defaultPhone = phone.getImsPhone();
8463:                 if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
8508:             Phone phone = getPhone(subId);
8509:             if (phone != null && phone.getIccCard() != null) {
8510:                 return phone.getIccCard().getIccLockEnabled();
8534:         Phone phone = getPhone(subId);
8535:         if (phone == null) {
8542:                     new Pair<Boolean, String>(enabled, password), phone, null);
8566:         Phone phone = getPhone(subId);
8567:         if (phone == null) {
8574:                     new Pair<String, String>(oldPassword, newPassword), phone, null);
8633:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
8636:         Phone phone = getPhone(subId);
8637:         if (phone == null) {
8638:             throw new RuntimeException("phone is not available");
8643:             return phone.getEquivalentHomePlmns();
22: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
63: import android.telecom.PhoneAccount;
64: import android.telecom.PhoneAccountHandle;
83: import android.telephony.PhoneCapability;
84: import android.telephony.PhoneNumberRange;
141: import com.android.internal.telephony.PhoneConfigurationManager;
142: import com.android.internal.telephony.PhoneConstantConversions;
143: import com.android.internal.telephony.PhoneConstants;
144: import com.android.internal.telephony.PhoneFactory;
158: import com.android.internal.telephony.imsphone.ImsPhone;
159: import com.android.internal.telephony.imsphone.ImsPhoneCallTracker;
199:     private static final String LOG_TAG = "PhoneInterfaceManager";
200:     private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
298:     private static PhoneInterfaceManager sInstance;
300:     private PhoneGlobals mApp;
697:                     defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
724:                     defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
735:                     defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
745:                     defaultPhone.resetModemConfig(onCompleted);
793:                     defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
1031:                     if (defaultPhone != null) {
1032:                         defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
1095:                     defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
1123:                     defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
1329:                     defaultPhone.rebootModem(onCompleted);
1339:                     PhoneConfigurationManager.getInstance()
1349:                         mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
1360:                     PhoneConfigurationManager.getInstance()
1448:                     defaultPhone.eraseModemConfig(onCompleted);
1494:                     getDefaultPhone().getContext().sendBroadcastAsUser(
1640:      * Initialize the singleton PhoneInterfaceManager instance.
1641:      * This is only done once, at startup, from PhoneApp.onCreate().
1643:     /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
1644:         synchronized (PhoneInterfaceManager.class) {
1646:                 sInstance = new PhoneInterfaceManager(app);
1657:         mCM = PhoneGlobals.getInstance().mCM;
1658:         mImsResolver = PhoneGlobals.getInstance().getImsResolver();
1666:         mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
1674:         return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
1696:                 ? getDefaultPhone() : getPhone(subId);
1707:         return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
1725:         PackageManager pm = getDefaultPhone().getContext().getPackageManager();
1752:             PhoneConstants.State state = mCM.getState(subId);
1753:             if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
1812:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1817:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1825:             final UnlockSim checkSimPin = new UnlockSim(getPhone(subId).getIccCard());
1838:             final UnlockSim checkSimPuk = new UnlockSim(getPhone(subId).getIccCard());
1855:         private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1885:                                             mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
1890:                                             mResult = PhoneConstants.PIN_OPERATION_ABORTED;
1892:                                             mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1895:                                         mResult = PhoneConstants.PIN_RESULT_SUCCESS;
2103:             logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
2138:             if (defaultPhone != null) {
2139:                 defaultPhone.setRadioPower(turnOn);
2283:                 return PhoneConstantConversions.convertDataState(
2284:                         PhoneConstants.DataState.DISCONNECTED);
2356:             final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
2564:             getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
2768:         Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
2772:         Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
2776:         Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
2938:     public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
2967:             return getDefaultPhone().needsOtaServiceProvisioning();
3002:             PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
3003:             if (phoneAccountHandle == null) {
3006:             return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
3091:         SmsController smsController = PhoneFactory.getSmsController();
3226:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
3235:             defaultPhone.sendDialerSpecialCode(inputCode);
3290:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3314:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3410:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3437:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3453:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3532:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3550:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3570:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3585:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3604:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3620:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3639:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3655:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3671:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3691:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3707:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3722:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3738:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3754:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3773:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3792:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3810:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3855:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3885:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3918:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3977:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4146:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4171:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4197:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4223:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4393:             return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4400:                 return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4403:                         .orElse(PhoneConstants.LTE_ON_CDMA_FALSE);
4464:         int phoneId = UiccController.getInstance().getPhoneIdFromSlotId(slotIndex);
4465:         if (phoneId == -1) {
4469:         return PhoneFactory.getPhone(phoneId);
4504:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4646:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4937:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
4944:             return defaultPhone.getPcscfAddress(apnType);
5188:             getDefaultPhone().setImsRegistrationState(registered);
5424:                     request, messenger, binder, getPhone(subId),
5485:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
5493:             return PhoneFactory.calculatePreferredNetworkType(defaultPhone.getContext(), 0);
5695:             int phoneId = mSubscriptionController.getPhoneId(subId);
5696:             if (DBG) log("setUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5774:             int phoneId = mSubscriptionController.getPhoneId(subId);
5775:             if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5803:             int phoneId = mSubscriptionController.getPhoneId(subId);
5804:             if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5924:         int phoneId = SubscriptionManager.getPhoneId(subId);
5925:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5932:             getPhone(phoneId), pkgName);
5949:                 getPhone(i), pkgName);
5960:         if (!SubscriptionManager.isValidPhoneId(phoneId)) {
5961:             loge("phoneId " + phoneId + " is not valid.");
5964:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5966:             loge("getCarrierPackageNamesForIntentAndPhone: No UICC");
5973:     public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
5977:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
6340:     public int getRadioAccessFamily(int phoneId, String callingPackage) {
6351:             raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
6365:             ImsManager.getInstance(defaultPhone.getContext(),
6366:                     defaultPhone.getPhoneId()).setVtSetting(enable);
6375:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
6387:                     ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
6502:      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
6546:             return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
6554:             PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
6561:             return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
6657:             cleanUpSmsRawTable(getDefaultPhone().getContext());
6668:               sendEraseModemConfig(getDefaultPhone());
6849:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6852:      * PhoneAccount.
6855:     public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
6875:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6878:      * PhoneAccount.
6882:             PhoneAccountHandle phoneAccountHandle, Uri uri) {
6885:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6888:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
6907:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6909:      * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
6912:     public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
6932:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6935:      * specific PhoneAccount.
6939:             PhoneAccountHandle phoneAccountHandle, boolean enabled) {
6942:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6945:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
7286:         return new TelephonyShellCommand(this, getDefaultPhone().getContext()).exec(
7546:             if (checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
7735:         int phoneId = mSubscriptionController.getPhoneId(subId);
7736:         if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
7737:             return list.get(phoneId);
7871:                             mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
8087:                 getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
8110:         PhoneCapability staticCapability =
8216:             int phoneCount = TelephonyManager.getDefault().getPhoneCount();
8218:             int[] logicalSlotsMapping = new int[phoneCount];
8351:         SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
8377:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8394:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8464:                     ImsPhone imsPhone = (ImsPhone) defaultPhone;
8466:                             (ImsPhoneCallTracker) imsPhone.getCallTracker();
8468:                     Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
8469:                             + imsPhone.getMsisdn());
8603:         // *  Inherited from PhoneWindowManager  *
130: import com.android.internal.telephony.DefaultPhoneNotifier;
480:                             getPhoneFromRequest(request).handlePinMmi((String) request.argument)
755:                     getPhoneFromRequest(request).getPreferredNetworkType(onCompleted);
783:                     getPhoneFromRequest(request).setPreferredNetworkType(networkType, onCompleted);
807:                     getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
819:                     getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
829:                     getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
836:                     getPhoneFromRequest(request).getCallForwardingOption(
893:                     getPhoneFromRequest(request).setCallForwardingOption(
915:                     getPhoneFromRequest(request).getCallWaiting(onCompleted);
959:                     getPhoneFromRequest(request).setCallWaiting(isEnable, onCompleted);
1011:                     getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
1206:                     getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
1227:                     getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
1243:                     getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
1255:                     getPhoneFromRequest(request).setCdmaSubscription(subscriptionMode, onCompleted);
1370:                         mPhoneConfigurationManager.addToPhoneStatusCache(id,
1458:                     getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
1476:                     getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
1690:             return getPhoneFromSubId(request.subId);
2024:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2099:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2116:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2118:                 shutdownRadioUsingPhoneId(i);
2641:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2781:         return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
2811:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2844:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2875:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3016:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3184:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3244:                     .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3281:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3307:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3364:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3404:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3429:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3529:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3566:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3600:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3635:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3687:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3769:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3851:         checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
3915:         checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
4267:                 && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
4301:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4326:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4419:         return mSubscriptionController.getPhoneId(getDefaultSubscription());
4481:         return iccOpenLogicalChannelWithPermission(getPhoneFromSubId(subId), callingPackage, aid,
4494:         return iccOpenLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4529:         return iccCloseLogicalChannelWithPermission(getPhoneFromSubId(subId), channel);
4536:         return iccCloseLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4565:         return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
4579:                 getPhoneFromSlotIdOrThrowException(slotIndex), channel, cla, command, p1, p2, p3,
4618:         return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
4634:                 getPhoneFromSlotIdOrThrowException(slotIndex), callingPackage, cla, command, p1,
4719:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4757:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
5131:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5259:                     .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
5508:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5557:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5602:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5606:             return getPhoneFromSubId(subId).getAllowedNetworkTypes(reason);
5623:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5627:             return getPhoneFromSubId(subId).getEffectiveAllowedNetworkTypes();
5649:             getPhoneFromSubId(subId).setAllowedNetworkTypes(reason, allowedNetworkTypes);
5940:         for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
6004:         enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
6010:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
6090:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
6117:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6140:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6349:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
6399:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6418:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6555:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
6556:                 callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
6569:         enforceReadPrivilegedPermission("getPhoneAccountHandleForSubscriptionId, "
6793:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7320:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7472:             TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
7517:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7645:                         slot.getPhoneId(),
7786:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7794:             return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
7803:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7843:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7870:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
8051:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8086:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
8111:                 mPhoneConfigurationManager.getStaticPhoneCapability();
8151:             mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
8191:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8198:             return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
8207:         metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
8221:                 if (SubscriptionManager.isValidPhoneId(slotInfos[i].getLogicalSlotIdx())) {
8337:                 SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
8465:                     ImsPhoneCallTracker imsPhoneCallTracker =
8467:                     imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
8631:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
android.googlesource.com/platform/frameworks/opt/telephony:src/java/com/android/internal/telephony/Phone.java: [ master, ]
121: public abstract class Phone extends Handler implements PhoneInternalInterface {
508:     protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
525:     protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
334:     protected Phone mImsPhone = null;
604:     public void createImsPhone() {
3669:     public Phone getImsPhone() {
4320:     public Phone getDefaultPhone() {
198:     protected static final int EVENT_UPDATE_PHONE_OBJECT            = 42;
300:     protected boolean mIsPhoneInEcmState = false;
331:     protected int mPhoneId;
448:     public String getPhoneName() {
452:     protected void setPhoneName(String name) {
1814:     public void updatePhoneObject(int voiceRadioTech) {
2791:     public abstract int getPhoneType();
3792:     public int getPhoneId() {
3800:     public int getVoicePhoneServiceState() {
111:  * A base implementation for the com.android.internal.telephony.Phone interface.
113:  * Note that implementations of Phone.java are expected to be used
122:     private static final String LOG_TAG = "Phone";
248:      * This method is invoked when the Phone exits Emergency Callback Mode.
298:     // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and
443:      * Returns a string identifier for this phone interface for parties
444:      *  outside the phone app process.
499:      * Constructs a Phone in normal (non-unit test) mode.
510:         this(name, notifier, context, ci, unitTestMode, SubscriptionManager.DEFAULT_PHONE_INDEX,
515:      * Constructs a Phone in normal (non-unit test) mode.
523:      * @param phoneId the phone-id of this phone.
551:         * (i.e. voice) phone calls over the telephony network, and is allowed
578:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
593:         if (getPhoneType() != PhoneConstants.PHONE_TYPE_SIP) {
605:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_SIP) {
609:         synchronized(Phone.lockForRadioTechnologyChange) {
672:         // messages to be handled whether or not the phone is being destroyed
674:         // resources of the phone being destroyed
794:         Phone imsPhone = mImsPhone;
833:      * Gets the context for the phone, as set at initialization time.
889:      * Subclasses of Phone probably want to replace this with a
915:      * Subclasses of Phone probably want to replace this with a
939:      * Subclasses of Phone probably want to replace this with a
951:      * Notify the phone that an SMS has been sent. This will be used determine if the SMS was sent
965:      * Determine if the Phone has recently sent an emergency SMS and is still in the interval of
1006:     protected void migrateFrom(Phone from) {
1019:         // The emergency state of IMS phone will be cleared in ImsPhone#notifySrvccState after
1082:      *   Connection.getCall() == Phone.getRingingCall()
1102:      * Notifies when phone's video capabilities changes <p>
1107:      *  AsyncResult.result = true if phone supports video calling <p>
1246:      * Example: If Phone.dial is called with "*#31#", then the app will
1569:      * For unit tests; don't send notifications to "Phone"
1586:      * Subclasses of Phone probably want to replace this with a
1691:         // no need for regular phone
1695:      * Subclasses of Phone probably want to replace this with a
1706:      * If this is a simulated phone interface, returns a SimulatedRadioControl.
1720:      * the thread that originally obtained this Phone instance.
1725:                     "com.android.internal.telephony.Phone must be used from within one thread");
1774:      * If the phone has an active call and call waiting occurs,
1775:      * then the phone state is RINGING not OFFHOOK
1784:      * Retrieves the IccFileHandler of the Phone instance
1803:      * Retrieves the Handler of the Phone instance
1810:      * Update the phone object if the voice radio technology has changed
1818:     * Retrieves the ServiceStateTracker of the phone instance.
1826:      * Retrieves the EmergencyNumberTracker of the phone instance.
1848:      * Retrieves the DeviceStateMonitor of the phone instance.
1855:      * Retrieves the DisplayInfoController of the phone instance.
1903:      * Returns the ICC card interface for this phone, or null
1909:         //throw new Exception("getIccCard Shouldn't be called from Phone");
2106:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2386:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
2387:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
2388:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
2389:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
2400:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
2401:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
2402:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
2403:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
2696:     // This property is used to handle phone process crashes, and is the same for CDMA and IMS
2703:      * @return {@code true} if we are in emergency call back mode. This is a period where the phone
2723:      * @return true if this Phone is in an emergency call that caused emergency callback mode to be
2731:      * Set whether or not this Phone has an active emergency call that was placed during emergency
2787:      * Return a numerical identifier for the phone radio interface.
2788:      * @return PHONE_TYPE_XXX as defined above.
2801:     /** sets the voice mail count of the phone and notifies listeners. */
3490:      * Subclasses of Phone probably want to replace this with a
3508:      * Notify registrants if phone is video capable.
3622:         Rlog.e(LOG_TAG, "Error! This function should never be executed, inactive Phone.");
3635:      * Gets the Uicc card corresponding to this phone.
3636:      * @return the UiccCard object corresponding to the phone ID.
3666:      * Return an instance of a IMS phone
3789:      * Returns the phone id.
3801:         Phone imsPhone = mImsPhone;
3875:         Phone imsPhone = mImsPhone;
3894:         Phone imsPhone = mImsPhone;
3908:         Phone imsPhone = mImsPhone;
3923:         Phone imsPhone = mImsPhone;
3933:      * @return the IMS MmTel Registration technology for this Phone, defined in
3937:         Phone imsPhone = mImsPhone;
3947:      * Get the IMS MmTel Registration technology for this Phone, defined in
3951:         Phone imsPhone = mImsPhone;
3960:      * Asynchronously get the IMS MmTel Registration state for this Phone.
3963:         Phone imsPhone = mImsPhone;
4021:      *  Set phone radio capability
4023:      *  @param rc the phone radio capability defined in
4032:      *  Get phone radio access family
4052:      *  Get phone radio capability
4066:      *  @param rc the phone radio capability currently in effect for this phone.
4099:      * Registers the handler when phone radio  capability is changed.
4110:      * Unregister for notifications when phone radio type and access technology is changed.
4145:      * Determines if video calling is enabled for the phone.
4151:         Phone imsPhone = mImsPhone;
4275:     public static void checkWfcWifiOnlyModeBeforeDial(Phone imsPhone, int phoneId, Context context)
4315:      * This function returns the parent phone of the current phone. It is applicable
4316:      * only for IMS phone (function is overridden by ImsPhone). For others the phone
4354:      * none of the phone is in service, and one of them has the capability to make the emergency
4361:         for (Phone phone : PhoneFactory.getPhones()) {
4362:             if (phone != null) {
4363:                 ServiceState ss = phone.getServiceStateTracker().getServiceState();
4364:                 // One of the phone is in service, hence the device is not emergency call only.
4426:     /** Returns the {@link VoiceCallSessionStats} for this phone ID. */
4431:     /** Sets the {@link VoiceCallSessionStats} mock for this phone ID during unit testing. */
4457:         pw.println("Phone: subId=" + getSubId());
4632:         pw.println("Phone Local Log: ");
52: import android.telephony.PhoneStateListener;
81: import com.android.internal.telephony.imsphone.ImsPhoneCall;
115:  * originally called PhoneFactory to obtain the interface.
423:      * PhoneNotifier is an abstraction for all system-wide
428:     protected PhoneNotifier mNotifier;
457:      * Retrieves Nai for phones. Returns null if Nai is not set.
526:                     boolean unitTestMode, int phoneId,
528:         mPhoneId = phoneId;
567:          * By default old phones won't have the property set but do generate
601:      * Start setup of ImsPhone, which will start trying to connect to the ImsResolver. Will not be
610:             if (mImsPhone == null) {
611:                 mImsPhone = PhoneFactory.makeImsPhone(mNotifier, this);
612:                 CallManager.getInstance().registerPhone(mImsPhone);
613:                 mImsPhone.registerForSilentRedial(
688:                     PhoneConstants.State state = getState();
690:                             && ((state == PhoneConstants.State.RINGING) ||
691:                                     (state == PhoneConstants.State.IDLE))) {
702:                 if (getState() == PhoneConstants.State.RINGING) {
720:                         if (mImsPhone != null) {
722:                             mImsPhone.notifyRedialConnectionChanged(cn);
726:                         if (mImsPhone != null) {
727:                             mImsPhone.notifyRedialConnectionChanged(null);
801:                     if (imsPhone != null) {
802:                         conn = imsPhone.getHandoverConnection();
803:                         migrateFrom(imsPhone);
805:                         Rlog.d(LOG_TAG, "HANDOVER_STARTED: mImsPhone null");
810:                     if (imsPhone != null) {
811:                         imsPhone.notifySrvccState(srvccState);
813:                         Rlog.d(LOG_TAG, "HANDOVER_COMPLETED: mImsPhone null");
866:      * {@link PhoneConstants.State} which can be obtained using the {@link PhoneStateListener}
1036:             // Since CallManager has already registered with both CS and IMS phones,
1781:     public abstract PhoneConstants.State getState();
1979:      * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged
1980:      * PhoneStateListener.onCellInfoChanged} will be invoked.
1995:      * available on this interface. Use PhoneStateNotifier or similar instead.
2101:      * available on this interface. Use PhoneStateNotifier or similar instead.
2152:      * interface. Use <code>PhoneStateNotifier</code> or an equivalent.
2626:     public PhoneConstants.DataState getDataConnectionState(String apnType) {
2627:         return PhoneConstants.DataState.DISCONNECTED;
2697:     // phones
2777:         if (mImsPhone != null) {
2778:             isPresent = isVideoCallOrConference(mImsPhone.getForegroundCall()) ||
2779:                     isVideoCallOrConference(mImsPhone.getBackgroundCall()) ||
2780:                     isVideoCallOrConference(mImsPhone.getRingingCall());
2922:      * Retrieves the MIN for CDMA phones.
2938:      *  Retrieves PRL Version for CDMA phones
3584:      * Retrieves the MSISDN from the UICC. For GSM/UMTS phones, this is equivalent to
3585:      * {@link #getLine1Number()}. For CDMA phones, {@link #getLine1Number()} returns
3586:      * the MDN, so this method is provided to return the MSISDN on CDMA/LTE phones.
3594:      * Retrieves the EF_PNN from the UICC For GSM/UMTS phones.
3603:      * {@link android.telephony.PhoneStateListener} instead.
3606:     public PhoneConstants.DataState getDataConnectionState() {
3607:         return getDataConnectionState(PhoneConstants.APN_TYPE_DEFAULT);
3621:         // This function should be overridden by class GsmCdmaPhone.
3670:         return mImsPhone;
3736:      * Return if UT capability of ImsPhone is enabled or not
3740:         if (mImsPhone != null) {
3741:             return mImsPhone.isUtEnabled();
3760:         // dialInternal shall be overriden by GsmCdmaPhone
3765:      * This function is for CSFB SS. GsmCdmaPhone overrides this function.
3797:      * Return the service state of mImsPhone if it is STATE_IN_SERVICE
3802:         if (imsPhone != null
3803:                 && imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
3877:         if (imsPhone != null) {
3878:             isImsRegistered = imsPhone.isImsRegistered();
3896:         if (imsPhone != null) {
3897:             isWifiCallingEnabled = imsPhone.isWifiCallingEnabled();
3910:         if (imsPhone != null) {
3911:             isAvailable = imsPhone.isImsCapabilityAvailable(capability, regTech);
3925:         if (imsPhone != null) {
3926:             isVolteEnabled = imsPhone.isVolteEnabled();
3939:         if (imsPhone != null) {
3940:             regTech = imsPhone.getImsRegistrationTech();
3952:         if (imsPhone != null) {
3953:             imsPhone.getImsRegistrationTech(callback);
3964:         if (imsPhone != null) {
3965:             imsPhone.getImsRegistrationState(callback);
4082:         int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
4093:             int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
4137:         if (mImsPhone == null) {
4141:         return mImsPhone.isImsAvailable();
4152:         if (imsPhone != null) {
4153:             return imsPhone.isVideoEnabled();
4277:         if (imsPhone == null || !imsPhone.isWifiCallingEnabled()) {
4278:             ImsManager imsManager = ImsManager.getInstance(context, phoneId);
4496:         if (mImsPhone != null) {
4498:                 mImsPhone.dump(fd, pw, args);
424:      * state change notification. DefaultPhoneNotifier is
501:      * @param notifier An instance of DefaultPhoneNotifier,
517:      * @param notifier An instance of DefaultPhoneNotifier,
2591:         // This function is added to send the notification to DefaultPhoneNotifier.
2708:         return mIsPhoneInEcmState;
2719:         mIsPhoneInEcmState = isInEcm;
2763:         if (call instanceof ImsPhoneCall) {
2764:             ImsPhoneCall imsPhoneCall = (ImsPhoneCall) call;
2765:             ImsCall imsCall = imsPhoneCall.getImsCall();
2819:                 mPhoneId, UiccController.APP_FAM_3GPP);
3560:      * A fucntion of type getPhoneProp(propType) where propType is an
3640:         return mUiccController.getUiccCard(mPhoneId);
3785:         return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
3793:         return mPhoneId;
4124:         ImsManager imsManager = ImsManager.getInstance(mContext, mPhoneId);
4458:         pw.println(" mPhoneId=" + mPhoneId);
4485:         pw.println(" getPhoneName()=" + getPhoneName());
4486:         pw.println(" getPhoneType()=" + getPhoneType());
github.com/apache/dubbo-samples:dubbo-samples-compatible/src/main/java/org/apache/dubbo/samples/basic/api/Phone.java: [ master, ]
23: public class Phone implements Serializable {
46:         return "Phone{" +
github.com/apache/openjpa:openjpa-examples/simple/src/main/java/embeddables/Phone.java: [ trunk, ]
25: public class Phone {
26:     public Phone() {
30:     public Phone(String n, String t) {
github.com/google/guice:examples/src/example/xml/Phone.java: [ master, ]
3: public class Phone {
android.googlesource.com/platform/external/guice:examples/src/example/xml/Phone.java: [ master, ] Duplicate result
github.com/googleapis/google-cloud-php-talent:src/V4beta1/Phone.php: [ master, ]
16: class Phone extends \Google\Protobuf\Internal\Message
14:  * Generated from protobuf message <code>google.cloud.talent.v4beta1.Phone</code>
19:      * The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
25:      * The phone type. For example, LANDLINE, MOBILE, FAX.
27:      * Generated from protobuf field <code>.google.cloud.talent.v4beta1.Phone.PhoneType type = 2;</code>
31:      * Phone number.
32:      * Any phone formats are supported and only exact matches are performed on
33:      * searches. For example, if a phone number in profile is provided in the
34:      * format of "(xxx)xxx-xxxx", in profile searches the same phone format
56:      *           The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
58:      *           The phone type. For example, LANDLINE, MOBILE, FAX.
60:      *           Phone number.
61:      *           Any phone formats are supported and only exact matches are performed on
62:      *           searches. For example, if a phone number in profile is provided in the
63:      *           format of "(xxx)xxx-xxxx", in profile searches the same phone format
77:      * The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
88:      * The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
103:      * The phone type. For example, LANDLINE, MOBILE, FAX.
105:      * Generated from protobuf field <code>.google.cloud.talent.v4beta1.Phone.PhoneType type = 2;</code>
114:      * The phone type. For example, LANDLINE, MOBILE, FAX.
116:      * Generated from protobuf field <code>.google.cloud.talent.v4beta1.Phone.PhoneType type = 2;</code>
122:         GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\Phone\PhoneType::class);
129:      * Phone number.
130:      * Any phone formats are supported and only exact matches are performed on
131:      * searches. For example, if a phone number in profile is provided in the
132:      * format of "(xxx)xxx-xxxx", in profile searches the same phone format
145:      * Phone number.
146:      * Any phone formats are supported and only exact matches are performed on
147:      * searches. For example, if a phone number in profile is provided in the
148:      * format of "(xxx)xxx-xxxx", in profile searches the same phone format
12:  * Resource that represents a person's telephone number.
github.com/google/closure-compiler:contrib/externs/maps/google_maps_api_v3_20.js: [ master, ]
5014: google.maps.TransitAgency.prototype.phone;
6167: google.maps.places.PlaceResult.prototype.formatted_phone_number;
6187: google.maps.places.PlaceResult.prototype.international_phone_number;
github.com/google/closure-compiler:contrib/externs/maps/google_maps_api_v3_19.js: [ master, ]
4951: google.maps.TransitAgency.prototype.phone;
6104: google.maps.places.PlaceResult.prototype.formatted_phone_number;
6124: google.maps.places.PlaceResult.prototype.international_phone_number;
github.com/apache/incubator-dolphinscheduler:sql/dolphinscheduler-postgre.sql: [ dev, ]
650:   phone varchar(11) DEFAULT NULL ,
786: INSERT INTO t_ds_user(user_name,user_password,user_type,email,phone,tenant_id,state,create_time,update_time) VALUES ('admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', ...(72 bytes skipped)...
github.com/google/end-to-end:lib/closure-compiler/contrib/externs/maps/google_maps_api_v3_20.js: [ master, ] Duplicate result
github.com/dart-lang/sdk:docs/newsletter/20171103/big.json: [ master, ]
15:     "phone": "+1 (837) 507-3693",
60:     "phone": "+1 (846) 514-2370",
105:     "phone": "+1 (857) 494-3093",
150:     "phone": "+1 (947) 569-2033",
195:     "phone": "+1 (999) 498-3915",
240:     "phone": "+1 (854) 470-3038",
285:     "phone": "+1 (909) 457-2305",
330:     "phone": "+1 (920) 553-2688",
375:     "phone": "+1 (834) 579-2186",
420:     "phone": "+1 (939) 525-2604",
465:     "phone": "+1 (849) 479-3879",
510:     "phone": "+1 (880) 463-3272",
555:     "phone": "+1 (900) 525-3365",
600:     "phone": "+1 (960) 432-3019",
645:     "phone": "+1 (890) 443-2377",
690:     "phone": "+1 (865) 600-2359",
735:     "phone": "+1 (956) 445-3197",
780:     "phone": "+1 (824) 526-2433",
825:     "phone": "+1 (869) 596-2230",
870:     "phone": "+1 (965) 400-3544",
915:     "phone": "+1 (829) 523-3522",
960:     "phone": "+1 (800) 414-2213",
1005:     "phone": "+1 (965) 477-2144",
1050:     "phone": "+1 (995) 545-3067",
1095:     "phone": "+1 (956) 459-3456",
1140:     "phone": "+1 (940) 518-2078",
1185:     "phone": "+1 (878) 478-2408",
1230:     "phone": "+1 (837) 511-3291",
1275:     "phone": "+1 (858) 487-2467",
1320:     "phone": "+1 (981) 553-2184",
1365:     "phone": "+1 (872) 596-3656",
1410:     "phone": "+1 (966) 543-3136",
1455:     "phone": "+1 (818) 508-2268",
1500:     "phone": "+1 (951) 420-2218",
1545:     "phone": "+1 (844) 555-2715",
1590:     "phone": "+1 (937) 565-2676",
1635:     "phone": "+1 (972) 576-3178",
1680:     "phone": "+1 (917) 450-3471",
1725:     "phone": "+1 (843) 423-3454",
1770:     "phone": "+1 (948) 509-3334",
1815:     "phone": "+1 (831) 416-2264",
1860:     "phone": "+1 (891) 400-3519",
1905:     "phone": "+1 (943) 479-2761",
1950:     "phone": "+1 (906) 480-2565",
1995:     "phone": "+1 (851) 497-3501",
2040:     "phone": "+1 (841) 418-3257",
2085:     "phone": "+1 (926) 512-3937",
2130:     "phone": "+1 (987) 421-2382",
2175:     "phone": "+1 (899) 580-3031",
2220:     "phone": "+1 (960) 427-2889",
2265:     "phone": "+1 (860) 507-2156",
2310:     "phone": "+1 (894) 511-3314",
2355:     "phone": "+1 (926) 591-3806",
2400:     "phone": "+1 (908) 518-2917",
2445:     "phone": "+1 (804) 531-2757",
2490:     "phone": "+1 (923) 584-2675",
2535:     "phone": "+1 (867) 565-3773",
2580:     "phone": "+1 (818) 596-3918",
2625:     "phone": "+1 (948) 499-3495",
2670:     "phone": "+1 (800) 586-3376",
2715:     "phone": "+1 (806) 466-2258",
2760:     "phone": "+1 (898) 448-2185",
2805:     "phone": "+1 (935) 589-2629",
2850:     "phone": "+1 (891) 512-3740",
2895:     "phone": "+1 (981) 551-3815",
2940:     "phone": "+1 (881) 538-3365",
2985:     "phone": "+1 (975) 589-3053",
3030:     "phone": "+1 (902) 562-2128",
3075:     "phone": "+1 (948) 410-2460",
3120:     "phone": "+1 (942) 561-2111",
3165:     "phone": "+1 (843) 425-3098",
3210:     "phone": "+1 (900) 580-3229",
3255:     "phone": "+1 (879) 551-3061",
3300:     "phone": "+1 (814) 582-3071",
3345:     "phone": "+1 (990) 512-2222",
3390:     "phone": "+1 (978) 573-3997",
3435:     "phone": "+1 (894) 433-3996",
3480:     "phone": "+1 (919) 515-3066",
3525:     "phone": "+1 (915) 421-2684",
3570:     "phone": "+1 (925) 529-2747",
3615:     "phone": "+1 (919) 426-2851",
3660:     "phone": "+1 (897) 513-3281",
3705:     "phone": "+1 (850) 539-3379",
3750:     "phone": "+1 (909) 478-2505",
3795:     "phone": "+1 (992) 523-2404",
3840:     "phone": "+1 (876) 463-3788",
3885:     "phone": "+1 (811) 505-2973",
3930:     "phone": "+1 (994) 521-2251",
3975:     "phone": "+1 (820) 448-2105",
4020:     "phone": "+1 (938) 516-3670",
4065:     "phone": "+1 (815) 551-3343",
4110:     "phone": "+1 (855) 469-2689",
4155:     "phone": "+1 (878) 582-3574",
4200:     "phone": "+1 (837) 573-2113",
4245:     "phone": "+1 (988) 541-3936",
4290:     "phone": "+1 (945) 600-2756",
4335:     "phone": "+1 (941) 551-2018",
4380:     "phone": "+1 (826) 564-2855",
4425:     "phone": "+1 (919) 596-3947",
4470:     "phone": "+1 (856) 408-2445",
4515:     "phone": "+1 (880) 472-3026",
4560:     "phone": "+1 (958) 545-2045",
4605:     "phone": "+1 (982) 534-3838",
4650:     "phone": "+1 (874) 433-3388",
4695:     "phone": "+1 (997) 598-3664",
4740:     "phone": "+1 (943) 552-3860",
4785:     "phone": "+1 (823) 536-3787",
4830:     "phone": "+1 (971) 483-3841",
4875:     "phone": "+1 (842) 550-3460",
4920:     "phone": "+1 (816) 457-2084",
4965:     "phone": "+1 (969) 432-2674",
5010:     "phone": "+1 (937) 574-2800",
5055:     "phone": "+1 (862) 584-3454",
5100:     "phone": "+1 (945) 538-2237",
5145:     "phone": "+1 (977) 463-3790",
5190:     "phone": "+1 (948) 511-2897",
5235:     "phone": "+1 (966) 548-3943",
5280:     "phone": "+1 (800) 513-2595",
5325:     "phone": "+1 (910) 515-3339",
5370:     "phone": "+1 (827) 584-3711",
5415:     "phone": "+1 (855) 555-2074",
5460:     "phone": "+1 (902) 494-2637",
5505:     "phone": "+1 (947) 598-3867",
5550:     "phone": "+1 (848) 515-2715",
5595:     "phone": "+1 (883) 424-3837",
5640:     "phone": "+1 (974) 415-3309",
5685:     "phone": "+1 (808) 592-3525",
5730:     "phone": "+1 (932) 446-3346",
5775:     "phone": "+1 (939) 444-3055",
5820:     "phone": "+1 (832) 410-3108",
5865:     "phone": "+1 (961) 557-2724",
5910:     "phone": "+1 (893) 426-3444",
5955:     "phone": "+1 (867) 491-3071",
6000:     "phone": "+1 (809) 510-2641",
6045:     "phone": "+1 (826) 592-3362",
6090:     "phone": "+1 (824) 497-2085",
6135:     "phone": "+1 (863) 543-3535",
6180:     "phone": "+1 (964) 450-3239",
6225:     "phone": "+1 (897) 595-3177",
6270:     "phone": "+1 (944) 451-2580",
6315:     "phone": "+1 (968) 450-3970",
6360:     "phone": "+1 (893) 439-2992",
6405:     "phone": "+1 (824) 548-3309",
6450:     "phone": "+1 (830) 503-3733",
6495:     "phone": "+1 (853) 551-3777",
6540:     "phone": "+1 (838) 587-3155",
6585:     "phone": "+1 (994) 584-3713",
6630:     "phone": "+1 (887) 456-2827",
6675:     "phone": "+1 (881) 585-3898",
6720:     "phone": "+1 (980) 532-3612",
6765:     "phone": "+1 (809) 401-2730",
6810:     "phone": "+1 (887) 567-3628",
6855:     "phone": "+1 (800) 486-2517",
6900:     "phone": "+1 (880) 540-2582",
6945:     "phone": "+1 (811) 444-2511",
6990:     "phone": "+1 (881) 569-3641",
7035:     "phone": "+1 (985) 453-3997",
7080:     "phone": "+1 (807) 542-3950",
7125:     "phone": "+1 (972) 503-2569",
7170:     "phone": "+1 (914) 485-2099",
7215:     "phone": "+1 (999) 440-3045",
7260:     "phone": "+1 (831) 495-3564",
7305:     "phone": "+1 (930) 502-2894",
7350:     "phone": "+1 (986) 487-3994",
7395:     "phone": "+1 (991) 423-2908",
7440:     "phone": "+1 (800) 557-3201",
7485:     "phone": "+1 (923) 569-3362",
7530:     "phone": "+1 (800) 450-3332",
7575:     "phone": "+1 (996) 492-2616",
7620:     "phone": "+1 (973) 501-2510",
7665:     "phone": "+1 (830) 474-3561",
7710:     "phone": "+1 (910) 556-2921",
7755:     "phone": "+1 (821) 581-2332",
7800:     "phone": "+1 (899) 548-2439",
7845:     "phone": "+1 (925) 551-3547",
7890:     "phone": "+1 (844) 552-2562",
7935:     "phone": "+1 (881) 524-2837",
7980:     "phone": "+1 (879) 433-2819",
8025:     "phone": "+1 (885) 412-2056",
8070:     "phone": "+1 (810) 508-2641",
8115:     "phone": "+1 (935) 507-2063",
8160:     "phone": "+1 (815) 477-3954",
8205:     "phone": "+1 (928) 431-3925",
8250:     "phone": "+1 (920) 574-2693",
8295:     "phone": "+1 (867) 418-3502",
8340:     "phone": "+1 (988) 400-3146",
8385:     "phone": "+1 (839) 418-3056",
8430:     "phone": "+1 (874) 505-3221",
8475:     "phone": "+1 (910) 478-3194",
8520:     "phone": "+1 (980) 571-3728",
8565:     "phone": "+1 (813) 495-2329",
8610:     "phone": "+1 (856) 454-3476",
8655:     "phone": "+1 (924) 495-2220",
8700:     "phone": "+1 (824) 597-3676",
8745:     "phone": "+1 (897) 524-2129",
8790:     "phone": "+1 (861) 407-3175",
8835:     "phone": "+1 (922) 534-3554",
8880:     "phone": "+1 (920) 492-2463",
8925:     "phone": "+1 (811) 463-2887",
8970:     "phone": "+1 (890) 494-2947",
9015:     "phone": "+1 (955) 567-3486",
9060:     "phone": "+1 (884) 428-2417",
9105:     "phone": "+1 (883) 538-2435",
9150:     "phone": "+1 (917) 563-3560",
9195:     "phone": "+1 (969) 582-2499",
9240:     "phone": "+1 (920) 418-2624",
9285:     "phone": "+1 (931) 573-2496",
9330:     "phone": "+1 (968) 539-2000",
9375:     "phone": "+1 (801) 452-2159",
9420:     "phone": "+1 (927) 557-3299",
9465:     "phone": "+1 (924) 535-3269",
9510:     "phone": "+1 (957) 477-3087",
9555:     "phone": "+1 (865) 585-3659",
9600:     "phone": "+1 (889) 419-2522",
9645:     "phone": "+1 (885) 476-3326",
9690:     "phone": "+1 (908) 458-3614",
9735:     "phone": "+1 (993) 507-3758",
9780:     "phone": "+1 (911) 508-2308",
9825:     "phone": "+1 (968) 511-2832",
9870:     "phone": "+1 (963) 490-2494",
9915:     "phone": "+1 (946) 425-3567",
9960:     "phone": "+1 (954) 487-3443",
10005:     "phone": "+1 (965) 523-2211",
10050:     "phone": "+1 (983) 474-2966",
10095:     "phone": "+1 (841) 550-3204",
10140:     "phone": "+1 (868) 565-3594",
10185:     "phone": "+1 (811) 403-3705",
10230:     "phone": "+1 (809) 444-3978",
10275:     "phone": "+1 (831) 541-3182",
10320:     "phone": "+1 (855) 493-3667",
10365:     "phone": "+1 (942) 452-2990",
10410:     "phone": "+1 (941) 529-2597",
10455:     "phone": "+1 (972) 493-2362",
10500:     "phone": "+1 (888) 491-2792",
10545:     "phone": "+1 (848) 491-2071",
10590:     "phone": "+1 (858) 550-3038",
10635:     "phone": "+1 (835) 412-3381",
10680:     "phone": "+1 (800) 535-3383",
10725:     "phone": "+1 (985) 594-3323",
10770:     "phone": "+1 (812) 451-2468",
10815:     "phone": "+1 (893) 504-3286",
10860:     "phone": "+1 (892) 466-3931",
10905:     "phone": "+1 (956) 435-3774",
10950:     "phone": "+1 (916) 522-2144",
10995:     "phone": "+1 (943) 532-3928",
11040:     "phone": "+1 (959) 407-3524",
11085:     "phone": "+1 (802) 542-3045",
11130:     "phone": "+1 (804) 551-3651",
11175:     "phone": "+1 (980) 412-2186",
11220:     "phone": "+1 (803) 453-3310",
11265:     "phone": "+1 (877) 548-2895",
11310:     "phone": "+1 (982) 594-3943",
11355:     "phone": "+1 (866) 518-3456",
11400:     "phone": "+1 (850) 463-2269",
11445:     "phone": "+1 (913) 488-3685",
11490:     "phone": "+1 (889) 572-3844",
11535:     "phone": "+1 (918) 597-3338",
11580:     "phone": "+1 (910) 458-3017",
11625:     "phone": "+1 (845) 542-2074",
11670:     "phone": "+1 (920) 575-3522",
11715:     "phone": "+1 (826) 532-2765",
11760:     "phone": "+1 (829) 579-2194",
11805:     "phone": "+1 (872) 545-2188",
11850:     "phone": "+1 (964) 565-3489",
11895:     "phone": "+1 (973) 485-2904",
11940:     "phone": "+1 (884) 520-3772",
11985:     "phone": "+1 (902) 410-2793",
12030:     "phone": "+1 (816) 590-3441",
12075:     "phone": "+1 (889) 417-2649",
12120:     "phone": "+1 (881) 412-3096",
12165:     "phone": "+1 (953) 429-2851",
12210:     "phone": "+1 (945) 414-3818",
12255:     "phone": "+1 (883) 502-2517",
12300:     "phone": "+1 (970) 503-3712",
12345:     "phone": "+1 (943) 501-3226",
12390:     "phone": "+1 (897) 523-2736",
12435:     "phone": "+1 (815) 575-3850",
12480:     "phone": "+1 (894) 419-3758",
12525:     "phone": "+1 (951) 494-2083",
12570:     "phone": "+1 (911) 506-3812",
12615:     "phone": "+1 (902) 577-3186",
12660:     "phone": "+1 (993) 586-2216",
12705:     "phone": "+1 (873) 524-3587",
12750:     "phone": "+1 (833) 470-2143",
12795:     "phone": "+1 (881) 524-3300",
12840:     "phone": "+1 (880) 449-2694",
12885:     "phone": "+1 (999) 488-2124",
12930:     "phone": "+1 (946) 434-3615",
12975:     "phone": "+1 (897) 523-3929",
13020:     "phone": "+1 (863) 561-2666",
13065:     "phone": "+1 (905) 556-2950",
13110:     "phone": "+1 (884) 518-2009",
13155:     "phone": "+1 (923) 402-2717",
13200:     "phone": "+1 (965) 410-2726",
13245:     "phone": "+1 (948) 430-2882",
13290:     "phone": "+1 (909) 506-3068",
13335:     "phone": "+1 (972) 442-3788",
13380:     "phone": "+1 (915) 424-3371",
13425:     "phone": "+1 (949) 401-2796",
13470:     "phone": "+1 (875) 506-2221",
13515:     "phone": "+1 (861) 506-3785",
13560:     "phone": "+1 (976) 542-2879",
13605:     "phone": "+1 (989) 484-3795",
13650:     "phone": "+1 (832) 486-2158",
13695:     "phone": "+1 (849) 492-3864",
13740:     "phone": "+1 (975) 583-2067",
13785:     "phone": "+1 (825) 555-2723",
13830:     "phone": "+1 (880) 513-2167",
13875:     "phone": "+1 (886) 472-2726",
13920:     "phone": "+1 (913) 520-2681",
13965:     "phone": "+1 (881) 538-2342",
14010:     "phone": "+1 (826) 404-3272",
14055:     "phone": "+1 (904) 433-3633",
14100:     "phone": "+1 (945) 579-2396",
14145:     "phone": "+1 (918) 578-3533",
14190:     "phone": "+1 (845) 581-3350",
14235:     "phone": "+1 (932) 511-2689",
14280:     "phone": "+1 (807) 475-3088",
14325:     "phone": "+1 (900) 594-2577",
14370:     "phone": "+1 (921) 489-2264",
14415:     "phone": "+1 (817) 447-2873",
14460:     "phone": "+1 (861) 559-3985",
14505:     "phone": "+1 (838) 488-2156",
14550:     "phone": "+1 (902) 468-3545",
14595:     "phone": "+1 (857) 501-3296",
14640:     "phone": "+1 (890) 444-3250",
14685:     "phone": "+1 (882) 563-2874",
14730:     "phone": "+1 (959) 553-2310",
14775:     "phone": "+1 (822) 452-3700",
14820:     "phone": "+1 (947) 513-3029",
14865:     "phone": "+1 (862) 470-4000",
14910:     "phone": "+1 (836) 478-2720",
14955:     "phone": "+1 (998) 597-3162",
15000:     "phone": "+1 (862) 517-2671",
15045:     "phone": "+1 (953) 440-3043",
15090:     "phone": "+1 (992) 471-3408",
15135:     "phone": "+1 (957) 465-2770",
15180:     "phone": "+1 (833) 594-3751",
15225:     "phone": "+1 (871) 553-2205",
15270:     "phone": "+1 (851) 534-2729",
15315:     "phone": "+1 (906) 496-2599",
15360:     "phone": "+1 (808) 483-2764",
15405:     "phone": "+1 (960) 444-2715",
15450:     "phone": "+1 (973) 489-2799",
15495:     "phone": "+1 (997) 597-3304",
15540:     "phone": "+1 (842) 527-3421",
15585:     "phone": "+1 (892) 520-3003",
15630:     "phone": "+1 (902) 451-3665",
15675:     "phone": "+1 (870) 543-3906",
15720:     "phone": "+1 (998) 423-3831",
15765:     "phone": "+1 (815) 434-3193",
15810:     "phone": "+1 (997) 527-3202",
15855:     "phone": "+1 (902) 592-2841",
15900:     "phone": "+1 (854) 555-2052",
15945:     "phone": "+1 (988) 478-3254",
15990:     "phone": "+1 (937) 465-2543",
16035:     "phone": "+1 (891) 420-3627",
16080:     "phone": "+1 (907) 465-2312",
16125:     "phone": "+1 (823) 513-2892",
16170:     "phone": "+1 (841) 583-2605",
16215:     "phone": "+1 (914) 568-2143",
16260:     "phone": "+1 (868) 459-2495",
16305:     "phone": "+1 (967) 445-2674",
16350:     "phone": "+1 (875) 473-2133",
16395:     "phone": "+1 (928) 597-2031",
16440:     "phone": "+1 (830) 583-2916",
16485:     "phone": "+1 (956) 502-3054",
16530:     "phone": "+1 (934) 584-3772",