Found 126889 results in 24725 files, showing top 50 files (show more).
android.googlesource.com/platform/packages/services/Telephony:src/com/android/phone/PhoneInterfaceManager.java: [ master, ]
377:         public Phone phone;
17: package com.android.phone;
198: public class PhoneInterfaceManager extends ITelephony.Stub {
1639:     private PhoneInterfaceManager(PhoneGlobals app) {
1655:     private Phone getDefaultPhone() {
1686:     private Phone getPhone(int subId) {
2294:     public String getNetworkCountryIsoForPhone(int phoneId) {
5781:     public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
5804:     public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
6262:     public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
307:     private PhoneConfigurationManager mPhoneConfigurationManager;
1666:     private Phone getPhoneFromRequest(MainThreadRequest request) {
1674:     private Phone getPhoneFromSubId(int subId) {
2072:     private void shutdownRadioUsingPhoneId(int phoneId) {
2734:     public int getActivePhoneType() {
2739:     public int getActivePhoneTypeForSlot(int slotIndex) {
3778:     private void checkModifyPhoneStatePermission(int subId, String message) {
4416:     private Phone getPhoneFromSlotIdOrThrowException(int slotIndex) {
5848:     public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
6388:     public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
6398:     public int getSubIdForPhoneAccountHandle(
6413:     public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
142: import com.android.internal.telephony.Phone;
175: import com.android.phone.settings.PickSmsSubscriptionActivity;
176: import com.android.phone.vvm.PhoneAccountHandleConverter;
177: import com.android.phone.vvm.RemoteVvmTaskManager;
178: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
179: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
376:         // In cases where subId is unavailable, the caller needs to specify the phone.
385:         MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
387:             if (phone != null) {
388:                 this.phone = phone;
416:      * A handler that processes messages on the main thread in the phone process. Since many
417:      * of the Phone calls are not thread safe this is needed to shuttle the requests from the
418:      * inbound binder threads to the main thread in the phone process.  The Binder thread
435:             final Phone defaultPhone = getDefaultPhone();
440:                     final Phone phone = getPhoneFromRequest(request);
459:                         request.result = phone != null
460:                                 ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
471:                     final Phone phone = getPhoneFromRequest(request);
472:                     request.result = phone != null ?
1257:                     request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
1271:                     request.phone.requestCellInfoUpdate(request.workSource,
1299:                     Phone phone = getPhoneFromRequest(request);
1300:                     phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
1308:                         phone = getPhoneFromRequest(request);
1309:                         request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
1331:                             .enablePhone(request.phone, enable, onCompleted);
1337:                     int phoneId = request.phone.getPhoneId();
1352:                             .getPhoneStatusFromModem(request.phone, onCompleted);
1357:                     int id = request.phone.getPhoneId();
1380:                     request.phone.setSystemSelectionChannels(args.first, onCompleted);
1553:     private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
1555:                 command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone, workSource);
1564:             int command, Object argument, Integer subId, Phone phone, WorkSource workSource) {
1570:         if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
1571:             throw new IllegalArgumentException("subId and phone cannot both be specified!");
1572:         } else if (phone != null) {
1573:             request = new MainThreadRequest(argument, phone, workSource);
1613:      * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
1617:             int command, Object argument, Phone phone, WorkSource workSource) {
1618:         MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
1656:         Phone thePhone = getPhone(getDefaultSubscription());
1663:         ServiceManager.addService("phone", this);
1667:         if (request.phone != null) {
1668:             return request.phone;
1680:         Phone phone = getPhoneFromRequest(request);
1681:         return phone == null ? null :
1682:                 UiccController.getInstance().getUiccCard(phone.getPhoneId());
1685:     // returns phone associated with the subId.
1690:     private void sendEraseModemConfig(Phone phone) {
1691:         if (phone != null) {
1693:                   mApp, phone.getSubId(), "eraseModemConfig");
1731:             // PENDING: should we just silently fail if phone is offhook or ringing?
1752:         // from the context of the phone app.
1755:         if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
1941:             final Phone phone = getPhone(subId);
1942:             if (phone != null) {
1943:                 phone.updateServiceLocation();
1987:             final Phone phone = getPhone(subId);
1988:             if (phone != null) {
1989:                 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
2007:             final Phone phone = getPhone(subId);
2008:             if (phone != null) {
2009:                 phone.setRadioPower(!isRadioOnForSubscriber(subId));
2025:             final Phone phone = getPhone(subId);
2026:             if (phone == null) {
2029:             if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
2047:                 Phone phone = PhoneFactory.getPhone(i);
2048:                 if (phone != null && phone.isRadioAvailable()) return true;
2064:                 logv("Shutting down Phone " + i);
2073:         Phone phone = PhoneFactory.getPhone(phoneId);
2074:         if (phone != null && phone.isRadioAvailable()) {
2075:             phone.shutdownRadio();
2084:             final Phone defaultPhone = PhoneFactory.getDefaultPhone();
2089:                 loge("There's no default phone.");
2102:             final Phone phone = getPhone(subId);
2103:             if (phone != null) {
2104:                 phone.setRadioPower(turnOn);
2122:             final Phone phone = getPhone(subId);
2123:             if (phone != null) {
2124:                 phone.getDataEnabledSettings().setUserDataEnabled(true);
2142:             final Phone phone = getPhone(subId);
2143:             if (phone != null) {
2144:                 phone.getDataEnabledSettings().setUserDataEnabled(false);
2158:             final Phone phone = getPhone(subId);
2159:             if (phone != null) {
2160:                 return phone.isDataAllowed(ApnSetting.TYPE_DEFAULT);
2209:             Phone phone = PhoneFactory.getPhone(slotIndex);
2210:             return phone == null ? TelephonyManager.CALL_STATE_IDLE :
2211:                     PhoneConstantConversions.convertCallState(phone.getState());
2226:             final Phone phone = getPhone(subId);
2227:             if (phone != null) {
2228:                 return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
2247:             final Phone phone = getPhone(subId);
2248:             if (phone != null) {
2249:                 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
2278:                 return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
2299:             if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
2300:                 // Get default phone in this case.
2301:                 phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
2304:             Phone phone = PhoneFactory.getPhone(phoneId);
2305:             if (phone == null) return "";
2306:             ServiceStateTracker sst = phone.getServiceStateTracker();
2311:             EmergencyNumberTracker ent = phone.getEmergencyNumberTracker();
2330:             final Phone phone = getPhone(subId);
2331:             if (phone != null) {
2332:                 phone.enableLocationUpdates();
2351:             final Phone phone = getPhone(subId);
2352:             if (phone != null) {
2353:                 phone.disableLocationUpdates();
2412:         for (Phone phone : PhoneFactory.getPhones()) {
2413:             List<CellInfo> info = phone.getAllCellInfo();
2452:             for (Phone phone : PhoneFactory.getPhones()) {
2454:                         CMD_GET_ALL_CELL_INFO, null, phone, workSource);
2505:         final Phone phone = getPhoneFromSubId(subId);
2506:         if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
2508:         sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
2526:         Phone phone = PhoneFactory.getPhone(slotIndex);
2527:         if (phone == null) {
2530:         int subId = phone.getSubId();
2538:             return phone.getImei();
2546:         Phone phone = PhoneFactory.getPhone(slotIndex);
2548:         if (phone != null) {
2549:             String imei = phone.getImei();
2557:         Phone phone = PhoneFactory.getPhone(slotIndex);
2558:         if (phone == null) {
2562:         int subId = phone.getSubId();
2570:             return phone.getMeid();
2578:         Phone phone = PhoneFactory.getPhone(slotIndex);
2580:         if (phone != null) {
2581:             String meid = phone.getMeid();
2590:         Phone phone = PhoneFactory.getPhone(slotIndex);
2591:         if (phone == null) {
2594:         int subId = phone.getSubId();
2603:             return phone.getDeviceSvn();
2613:             final Phone phone = getPhone(subId);
2614:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
2624:             final Phone phone = getPhone(subId);
2625:             return phone == null ? null : phone.getCarrierName();
2635:             final Phone phone = getPhone(subId);
2636:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
2637:                     : phone.getSpecificCarrierId();
2647:             final Phone phone = getPhone(subId);
2648:             return phone == null ? null : phone.getSpecificCarrierName();
2659:         final Phone phone = PhoneFactory.getPhone(slotIndex);
2660:         if (phone == null) {
2665:             return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
2676:      * Make sure the caller has the MODIFY_PHONE_STATE permission.
2681:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
2701:      * Make sure the caller has the CALL_PHONE permission.
2706:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
2742:             final Phone phone = PhoneFactory.getPhone(slotIndex);
2743:             if (phone == null) {
2744:                 return PhoneConstants.PHONE_TYPE_NONE;
2746:                 return phone.getPhoneType();
2773:             final Phone phone = getPhone(subId);
2774:             if (phone != null) {
2775:                 return phone.getCdmaEriIconIndex();
2806:             final Phone phone = getPhone(subId);
2807:             if (phone != null) {
2808:                 return phone.getCdmaEriIconMode();
2837:             final Phone phone = getPhone(subId);
2838:             if (phone != null) {
2839:                 return phone.getCdmaEriText();
2858:             final Phone phone = getPhone(subId);
2859:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2860:                 return phone.getLine1Number();
2862:                 loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
2880:             final Phone phone = getPhone(subId);
2881:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2882:                 return phone.getCdmaMin();
2894:         if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
2896:             throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
3060:             final Phone phone = getPhone(subId);
3061:             if (phone != null) {
3062:                 phone.setVoiceActivationState(activationState);
3081:             final Phone phone = getPhone(subId);
3082:             if (phone != null) {
3083:                 phone.setDataActivationState(activationState);
3099:         final Phone phone = getPhone(subId);
3102:             if (phone != null) {
3103:                 return phone.getVoiceActivationState();
3119:         final Phone phone = getPhone(subId);
3122:             if (phone != null) {
3123:                 return phone.getDataActivationState();
3145:             final Phone phone = getPhone(subId);
3146:             if (phone != null) {
3147:                 return phone.getVoiceMessageCount();
3164:             final Phone phone = getPhone(subId);
3165:             return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
3178:         final Phone defaultPhone = getDefaultPhone();
3216:             for (Phone phone : PhoneFactory.getPhones()) {
3217:                 if (phone.isInEmergencySmsMode()) {
3228:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3255:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3293:             Phone phone = getPhone(subId);
3294:             if (phone == null) {
3299:             phone.getImsRegistrationState(regState -> {
3326:             Phone phone = getPhone(subId);
3327:             if (phone == null) {
3332:             phone.getImsRegistrationTech(regTech -> {
3351:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3377:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3428:             Phone phone = getPhone(subId);
3429:             if (phone == null) return false;
3430:             return phone.isImsCapabilityAvailable(capability, regTech);
3478:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3515:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3549:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3584:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3636:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3718:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3785:         Phone phone = getPhone(subId);
3786:         if (phone == null) {
3787:             loge("phone instance null for subid " + subId);
3791:             if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
3795:             if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
4229:             final Phone phone = getPhone(subId);
4230:             if (phone != null) {
4231:                 return phone.getServiceState().getDataNetworkType();
4263:             final Phone phone = getPhone(subId);
4264:             if (phone != null) {
4265:                 return phone.getServiceState().getDataNetworkType();
4288:             final Phone phone = getPhone(subId);
4289:             if (phone != null) {
4290:                 return phone.getServiceState().getVoiceNetworkType();
4315:             final Phone phone = PhoneFactory.getPhone(slotIndex);
4316:             if (phone != null) {
4317:                 return phone.getIccCard().hasIccCard();
4332:      * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
4333:      * or {@link Phone#LTE_ON_CDMA_TRUE}
4352:             final Phone phone = getPhone(subId);
4353:             if (phone == null) {
4356:                 return phone.getLteOnCdmaMode();
4420:                     + " does not correspond to an active phone");
4451:     private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
4468:                     CMD_OPEN_CHANNEL, new Pair<String, Integer>(aid, p2), phone,
4493:     private boolean iccCloseLogicalChannelWithPermission(Phone phone, int channel) {
4499:             Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, channel, phone,
4536:     private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
4545:                     new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
4592:     private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
4610:                     new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
4844:         Phone phone = PhoneFactory.getPhone(slotIndex);
4845:         if (phone != null) {
4847:                     mApp, phone.getSubId(), "resetModemConfig");
4870:         Phone phone = PhoneFactory.getPhone(slotIndex);
4871:         if (phone != null) {
4873:                     mApp, phone.getSubId(), "rebootModem");
4889:         final Phone defaultPhone = getDefaultPhone();
5414:         final Phone defaultPhone = getDefaultPhone();
5532:         final Phone phone = getPhone(subId);
5534:             if (phone != null) {
5535:                 return phone.hasMatchedTetherApnSetting();
5559:             Phone phone = PhoneFactory.getPhone(phoneId);
5560:             if (phone != null) {
5562:                 phone.getDataEnabledSettings().setUserDataEnabled(enable);
5564:                 loge("setUserDataEnabled: no phone found. Invalid subId=" + subId);
5582:         final Phone phone = getPhone(subId);
5584:             if (phone != null) {
5589:                 phone.setAlwaysReportSignalStrength(isEnable);
5591:                 loge("setAlwaysReportSignalStrength: no phone found for subId="
5620:      * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
5638:             Phone phone = PhoneFactory.getPhone(phoneId);
5639:             if (phone != null) {
5640:                 boolean retVal = phone.isUserDataEnabled();
5644:                 if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
5667:             Phone phone = PhoneFactory.getPhone(phoneId);
5668:             if (phone != null) {
5669:                 boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
5673:                 if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
5682:             Phone phone) {
5688:         PackageManager pkgMgr = phone.getContext().getPackageManager();
5693:             SubscriptionInfo subInfo = subController.getSubscriptionInfo(phone.getSubId());
5695:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5707:     private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, Phone phone,
5716:             SubscriptionInfo subInfo = subController.getSubscriptionInfo(phone.getSubId());
5718:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5728:         final Phone phone = getPhone(subId);
5729:         if (phone == null) {
5733:         UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
5741:                 phone.getContext().getPackageManager()), Binder.getCallingUid(), phone);
5747:         final Phone phone = getPhone(subId);
5748:         if (phone == null) {
5753:                 UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
5760:                         phone.getContext().getPackageManager(), uid), uid, phone);
5865:         final Phone phone = getPhone(subId);
5866:         UiccCard card = phone == null ? null : phone.getUiccCard();
5888:             final Phone phone = getPhone(subId);
5889:             if (phone == null) {
5892:             final String subscriberId = phone.getSubscriberId();
6115:             final Phone phone = getPhone(subId);
6116:             return phone == null ? false : phone.setOperatorBrandOverride(brand);
6131:             final Phone phone = getPhone(subId);
6132:             if (phone == null) {
6135:             return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
6186:         Phone phone = PhoneFactory.getPhone(phoneId);
6188:         if (phone == null) {
6195:                             mApp, phone.getSubId(), "getRadioAccessFamily");
6205:         final Phone defaultPhone = getDefaultPhone();
6219:         final Phone defaultPhone = getDefaultPhone();
6273:                     .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
6304:         final Phone phone = getPhone(subscriptionId);
6305:         if (phone == null) {
6306:             loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
6313:                     phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
6346:      * Returns the unique device ID of phone, for example, the IMEI for
6350:      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
6354:         final Phone phone = PhoneFactory.getPhone(0);
6355:         if (phone == null) {
6358:         int subId = phone.getSubId();
6366:             return phone.getDeviceId();
6379:         Phone phone = getPhone(subId);
6380:         if (phone != null) {
6381:             return phone.isImsRegistered();
6402:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
6416:             Phone phone = getPhone(subscriptionId);
6417:             if (phone == null) {
6420:             return PhoneUtils.makePstnPhoneAccountHandle(phone);
6432:             Phone phone = getPhone(subId);
6433:             if (phone != null) {
6434:                 return phone.isWifiCallingEnabled();
6449:             Phone phone = getPhone(subId);
6450:             if (phone != null) {
6451:                 return phone.isVideoEnabled();
6467:             Phone phone = getPhone(subId);
6468:             if (phone != null) {
6469:                 return phone.getImsRegistrationTech();
6527:         final Phone phone = getPhone(subId);
6528:         if (phone == null) {
6535:                     phone.getContext().getOpPackageName(), null);
6544:             final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
6672:             final Phone phone = getPhone(subId);
6673:             if (phone == null) {
6677:             ServiceState ss = phone.getServiceState();
6690:      * Returns the URI for the per-account voicemail ringtone set in Phone settings.
6701:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6702:             if (phone == null) {
6703:                 phone = getDefaultPhone();
6706:             return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
6716:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6726:         final Phone defaultPhone = getDefaultPhone();
6737:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6738:             if (phone == null) {
6739:                 phone = defaultPhone;
6741:             VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
6748:      * Returns whether vibration is set for voicemail notification in Phone settings.
6758:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6759:             if (phone == null) {
6760:                 phone = getDefaultPhone();
6763:             return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
6773:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6783:         final Phone defaultPhone = getDefaultPhone();
6794:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6795:             if (phone == null) {
6796:                 phone = defaultPhone;
6798:             VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
6805:      * Make sure either called from same process as self (phone) or IPC caller has read privilege.
6810:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
6815:      * Make sure either called from same process as self (phone) or IPC caller has send SMS
6858:         Phone phone = getPhone(subId);
6862:             if (phone == null) {
6867:                 aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
6887:         Phone phone = getPhone(subId);
6891:             if (phone == null) {
6896:                 esn = phone.getEsn();
6915:         Phone phone = getPhone(subId);
6919:             if (phone == null) {
6924:                 cdmaPrlVersion = phone.getCdmaPrlVersion();
7018:         final Phone phone = getPhone(subId);
7021:         if (phone == null) {
7026:             phone.carrierActionSetMeteredApnsEnabled(enabled);
7043:         final Phone phone = getPhone(subId);
7046:         if (phone == null) {
7051:             phone.carrierActionSetRadioEnabled(enabled);
7071:         final Phone phone = getPhone(subId);
7074:         if (phone == null) {
7079:             phone.carrierActionReportDefaultNetworkStatus(report);
7095:         final Phone phone = getPhone(subId);
7096:         if (phone == null) {
7101:             phone.carrierActionResetAll();
7108:      * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
7115:             writer.println("Permission Denial: can't dump Phone from pid="
7145:             Phone phone = getPhone(subId);
7146:             if (phone != null) {
7147:                 phone.getDataEnabledSettings().setPolicyDataEnabled(enabled);
7166:         Phone phone = getPhone(subId);
7170:             if (phone != null) {
7171:                 return phone.getClientRequestStats();
7198:         Phone phone = PhoneFactory.getPhone(slotIndex);
7204:             if (phone != null) {
7205:                 phone.setSimPowerState(state, workSource);
7227:      * Check if phone is in emergency callback mode
7228:      * @return true if phone is in emergency callback mode
7234:         final Phone phone = getPhone(subId);
7238:             if (phone != null) {
7239:                 return phone.isInEcm();
7259:             Phone p = getPhone(subId);
7279:         Phone phone = PhoneFactory.getPhone(slotIndex);
7280:         if (phone != null) {
7281:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
7288:                 return phone.getRadioPowerState();
7301:      * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
7316:             Phone phone = getPhone(subId);
7317:             isEnabled =  phone != null ? phone.getDataRoamingEnabled() : false;
7332:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
7345:             Phone phone = getPhone(subId);
7346:             if (phone != null) {
7347:                 phone.setDataRoamingEnabled(isEnabled);
7363:             Phone phone = getPhone(subId);
7364:             if (phone != null) {
7365:                 isAllowed = phone.isCspPlmnEnabled();
7380:             // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
7517:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
7526:             Phone phone = getPhone(subId);
7527:             if (phone == null) {
7530:             UiccCard uiccCard = phone.getUiccCard();
7567:      * not set, return {@link Phone#PREFERRED_NT_MODE}.
7575:         return Phone.PREFERRED_NT_MODE;
7585:             final Phone phone = getPhone(subId);
7586:             if (phone == null) {
7590:             phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
7603:             final Phone phone = getPhone(subId);
7604:             if (phone == null) {
7608:             return phone.getCarrierIdListVersion();
7677:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7682:             for (Phone phone: PhoneFactory.getPhones()) {
7683:                 if (phone.getEmergencyNumberTracker() != null
7684:                         && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
7686:                             phone.getSubId(),
7687:                             phone.getEmergencyNumberTracker().getEmergencyNumberList());
7698:         final Phone defaultPhone = getDefaultPhone();
7706:             for (Phone phone: PhoneFactory.getPhones()) {
7707:                 if (phone.getEmergencyNumberTracker() != null
7708:                         && phone.getEmergencyNumberTracker() != null) {
7709:                     if (phone.getEmergencyNumberTracker().isEmergencyNumber(
7731:             for (Phone phone: PhoneFactory.getPhones()) {
7732:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7753:             for (Phone phone: PhoneFactory.getPhones()) {
7754:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7773:             final Phone phone = getPhone(subId);
7774:             if (phone == null) {
7778:             return phone.getEmergencyNumberDbVersion();
7790:             for (Phone phone: PhoneFactory.getPhones()) {
7791:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7807:             for (Phone phone: PhoneFactory.getPhones()) {
7808:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7824:             for (Phone phone: PhoneFactory.getPhones()) {
7825:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7838:         Phone phone = getPhone(subId);
7839:         if (phone == null) {
7845:                     .getUiccProfileForPhone(phone.getPhoneId());
7864:             Phone phone = PhoneFactory.getPhone(slotIndex);
7865:             if (phone == null) {
7868:                 return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
7881:         Phone phone = PhoneFactory.getPhone(slotIndex);
7882:         if (phone == null) return false;
7885:                 mApp, phone.getSubId(), callingPackage, callingFeatureId,
7887:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7893:                 return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
7895:                 return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
7963:      * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
7964:      * permission, but the other way around is possible with either MODIFY_PHONE_STATE
7993:         Phone phone = getPhone(subId);
7994:         if (phone == null) {
7999:             UiccCard uiccCard = phone.getUiccCard();
8069:         Phone phone = getDefaultPhone();
8070:         if (phone == null) return -1;
8071:         HalVersion hv = phone.getHalVersion();
8101:         enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
8107:             Phone phone = getPhone(subId);
8108:             if (phone == null) return false;
8110:             boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
8111:             return !isMetered || phone.getDataEnabledSettings().isDataEnabled(apnType);
8124:             Phone phone = getPhone(subId);
8125:             if (phone == null) return true; // By default return true.
8127:             return ApnSettingUtils.isMeteredApnType(apnType, phone);
8139:             Phone phone = getPhone(subscriptionId);
8140:             if (phone == null) {
8160:             sendRequestAsync(CMD_SET_SYSTEM_SELECTION_CHANNELS, argument, phone, null);
8230:             Phone phone = getPhone(subId);
8231:             if (phone == null) return false;
8233:             return phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(allow);
8246:             Phone phone = getPhone(subId);
8247:             if (phone == null) return false;
8249:             return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
8262:             Phone phone = getPhone(subId);
8263:             if (phone == null) return false;
8265:             return phone.getDataEnabledSettings().setAlwaysAllowMmsData(alwaysAllow);
8283:             for (Phone phone : PhoneFactory.getPhones()) {
8284:                 Phone defaultPhone = phone.getImsPhone();
8285:                 if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
8330:             Phone phone = getPhone(subId);
8331:             if (phone != null && phone.getIccCard() != null) {
8332:                 return phone.getIccCard().getIccLockEnabled();
8352:         Phone phone = getPhone(subId);
8353:         if (phone == null) {
8360:                     new Pair<Boolean, String>(enabled, password), phone, null);
8382:         Phone phone = getPhone(subId);
8383:         if (phone == null) {
8390:                     new Pair<String, String>(oldPassword, newPassword), phone, null);
22: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
65: import android.telecom.PhoneAccount;
66: import android.telecom.PhoneAccountHandle;
85: import android.telephony.PhoneCapability;
86: 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;
159: import com.android.internal.telephony.imsphone.ImsPhone;
160: 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);
297:     private static PhoneInterfaceManager sInstance;
299:     private PhoneGlobals mApp;
690:                     defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
717:                     defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
728:                     defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
738:                     defaultPhone.resetModemConfig(onCompleted);
784:                     defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
1022:                     if (defaultPhone != null) {
1023:                         defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
1086:                     defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
1114:                     defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
1320:                     defaultPhone.rebootModem(onCompleted);
1330:                     PhoneConfigurationManager.getInstance()
1340:                         mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
1351:                     PhoneConfigurationManager.getInstance()
1439:                     defaultPhone.eraseModemConfig(onCompleted);
1624:      * Initialize the singleton PhoneInterfaceManager instance.
1625:      * This is only done once, at startup, from PhoneApp.onCreate().
1627:     /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
1628:         synchronized (PhoneInterfaceManager.class) {
1630:                 sInstance = new PhoneInterfaceManager(app);
1641:         mCM = PhoneGlobals.getInstance().mCM;
1642:         mImsResolver = PhoneGlobals.getInstance().getImsResolver();
1650:         mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
1657:         return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
1676:                 ? getDefaultPhone() : getPhone(subId);
1687:         return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
1705:         PackageManager pm = getDefaultPhone().getContext().getPackageManager();
1732:             PhoneConstants.State state = mCM.getState(subId);
1733:             if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
1792:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1797:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1805:             final UnlockSim checkSimPin = new UnlockSim(getPhone(subId).getIccCard());
1818:             final UnlockSim checkSimPuk = new UnlockSim(getPhone(subId).getIccCard());
1835:         private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1865:                                             mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
1870:                                             mResult = PhoneConstants.PIN_OPERATION_ABORTED;
1872:                                             mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1875:                                         mResult = PhoneConstants.PIN_RESULT_SUCCESS;
2050:             logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
2085:             if (defaultPhone != null) {
2086:                 defaultPhone.setRadioPower(turnOn);
2230:                 return PhoneConstantConversions.convertDataState(
2231:                         PhoneConstants.DataState.DISCONNECTED);
2303:             final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
2518:             getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
2722:         Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
2726:         Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
2730:         Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
2892:     public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
2921:             return getDefaultPhone().needsOtaServiceProvisioning();
2956:             PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
2957:             if (phoneAccountHandle == null) {
2960:             return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
3045:         SmsController smsController = PhoneFactory.getSmsController();
3180:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
3189:             defaultPhone.sendDialerSpecialCode(inputCode);
3244:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3268:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3364:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3391:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3407:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3486:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3504:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3524:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3539:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3558:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3574:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3593:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3609:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3625:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3645:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3661:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3676:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3692:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3708:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3727:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3746:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3764:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3809:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3839:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3872:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3931:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4100:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4125:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4151:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4177:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4347:             return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4354:                 return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4417:         int phoneId = UiccController.getInstance().getPhoneIdFromSlotId(slotIndex);
4418:         if (phoneId == -1) {
4422:         return PhoneFactory.getPhone(phoneId);
4457:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4599:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4890:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
4897:             return defaultPhone.getPcscfAddress(apnType);
5148:             getDefaultPhone().setImsRegistrationState(registered);
5354:                     request, messenger, binder, getPhone(subId),
5415:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
5423:             return PhoneFactory.calculatePreferredNetworkType(defaultPhone.getContext(), 0);
5557:             int phoneId = mSubscriptionController.getPhoneId(subId);
5558:             if (DBG) log("setUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5636:             int phoneId = mSubscriptionController.getPhoneId(subId);
5637:             if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5665:             int phoneId = mSubscriptionController.getPhoneId(subId);
5666:             if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5769:         int phoneId = SubscriptionManager.getPhoneId(subId);
5770:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5777:             getPhone(phoneId), pkgName);
5794:                 getPhone(i), pkgName);
5805:         if (!SubscriptionManager.isValidPhoneId(phoneId)) {
5806:             loge("phoneId " + phoneId + " is not valid.");
5809:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5811:             loge("getCarrierPackageNamesForIntentAndPhone: No UICC");
5818:     public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
5822:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
6185:     public int getRadioAccessFamily(int phoneId, String callingPackage) {
6196:             raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
6210:             ImsManager.getInstance(defaultPhone.getContext(),
6211:                     defaultPhone.getPhoneId()).setVtSetting(enable);
6220:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
6232:                     ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
6347:      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
6391:             return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
6399:             PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
6406:             return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
6500:             cleanUpSmsRawTable(getDefaultPhone().getContext());
6511:               sendEraseModemConfig(getDefaultPhone());
6692:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6695:      * PhoneAccount.
6698:     public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
6718:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6721:      * PhoneAccount.
6725:             PhoneAccountHandle phoneAccountHandle, Uri uri) {
6728:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6731:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
6750:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6752:      * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
6755:     public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
6775:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6778:      * specific PhoneAccount.
6782:             PhoneAccountHandle phoneAccountHandle, boolean enabled) {
6785:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6788:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
7129:         (new TelephonyShellCommand(this, getDefaultPhone().getContext()))
7382:             if (checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
7571:         int phoneId = mSubscriptionController.getPhoneId(subId);
7572:         if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
7573:             return list.get(phoneId);
7702:                             mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
7920:                 getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
7943:         PhoneCapability staticCapability =
8049:             int phoneCount = TelephonyManager.getDefault().getPhoneCount();
8051:             int[] logicalSlotsMapping = new int[phoneCount];
8183:         SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
8204:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8216:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8286:                     ImsPhone imsPhone = (ImsPhone) defaultPhone;
8288:                             (ImsPhoneCallTracker) imsPhone.getCallTracker();
8290:                     Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
8291:                             + imsPhone.getMsisdn());
132: import com.android.internal.telephony.DefaultPhoneNotifier;
473:                             getPhoneFromRequest(request).handlePinMmi((String) request.argument)
748:                     getPhoneFromRequest(request).getPreferredNetworkType(onCompleted);
774:                     getPhoneFromRequest(request).setPreferredNetworkType(networkType, onCompleted);
798:                     getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
810:                     getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
820:                     getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
827:                     getPhoneFromRequest(request).getCallForwardingOption(
884:                     getPhoneFromRequest(request).setCallForwardingOption(
906:                     getPhoneFromRequest(request).getCallWaiting(onCompleted);
950:                     getPhoneFromRequest(request).setCallWaiting(isEnable, onCompleted);
1002:                     getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
1197:                     getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
1218:                     getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
1234:                     getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
1246:                     getPhoneFromRequest(request).setCdmaSubscription(subscriptionMode, onCompleted);
1361:                         mPhoneConfigurationManager.addToPhoneStatusCache(id,
1449:                     getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
1467:                     getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
1670:             return getPhoneFromSubId(request.subId);
1971:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2046:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2063:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2065:                 shutdownRadioUsingPhoneId(i);
2595:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2735:         return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
2765:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2798:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2829:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2970:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3138:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3198:                     .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3235:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3261:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3318:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3358:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3383:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3483:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3520:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3554:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3589:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3641:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3723:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3805:         checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
3869:         checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
4221:                 && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
4255:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4280:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4372:         return mSubscriptionController.getPhoneId(getDefaultSubscription());
4434:         return iccOpenLogicalChannelWithPermission(getPhoneFromSubId(subId), callingPackage, aid,
4447:         return iccOpenLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4482:         return iccCloseLogicalChannelWithPermission(getPhoneFromSubId(subId), channel);
4489:         return iccCloseLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4518:         return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
4532:                 getPhoneFromSlotIdOrThrowException(slotIndex), channel, cla, command, p1, p2, p3,
4571:         return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
4587:                 getPhoneFromSlotIdOrThrowException(slotIndex), callingPackage, cla, command, p1,
4672:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4710:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
5091:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5438:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5487:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5785:         for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
5849:         enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
5855:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
5935:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
5962:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
5985:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6194:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
6244:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6263:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6400:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
6401:                 callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
6636:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7162:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7319:             TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
7357:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7481:                         slot.getPhoneId(),
7617:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7625:             return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
7634:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7674:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7701:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7884:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7919:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
7944:                 mPhoneConfigurationManager.getStaticPhoneCapability();
7984:             mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
8024:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8031:             return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
8040:         metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
8054:                 if (SubscriptionManager.isValidPhoneId(slotInfos[i].getLogicalSlotIdx())) {
8169:                 SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
8287:                     ImsPhoneCallTracker imsPhoneCallTracker =
8289:                     imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
android.googlesource.com/platform/superproject:packages/services/Telephony/src/com/android/phone/PhoneInterfaceManager.java: [ master, ]
377:         public Phone phone;
17: package com.android.phone;
198: public class PhoneInterfaceManager extends ITelephony.Stub {
1639:     private PhoneInterfaceManager(PhoneGlobals app) {
1655:     private Phone getDefaultPhone() {
1686:     private Phone getPhone(int subId) {
2289:     public String getNetworkCountryIsoForPhone(int phoneId) {
5776:     public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
5799:     public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
6257:     public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
307:     private PhoneConfigurationManager mPhoneConfigurationManager;
1666:     private Phone getPhoneFromRequest(MainThreadRequest request) {
1674:     private Phone getPhoneFromSubId(int subId) {
2067:     private void shutdownRadioUsingPhoneId(int phoneId) {
2729:     public int getActivePhoneType() {
2734:     public int getActivePhoneTypeForSlot(int slotIndex) {
3773:     private void checkModifyPhoneStatePermission(int subId, String message) {
4411:     private Phone getPhoneFromSlotIdOrThrowException(int slotIndex) {
5843:     public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
6383:     public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
6393:     public int getSubIdForPhoneAccountHandle(
6408:     public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
142: import com.android.internal.telephony.Phone;
175: import com.android.phone.settings.PickSmsSubscriptionActivity;
176: import com.android.phone.vvm.PhoneAccountHandleConverter;
177: import com.android.phone.vvm.RemoteVvmTaskManager;
178: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
179: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
376:         // In cases where subId is unavailable, the caller needs to specify the phone.
385:         MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
387:             if (phone != null) {
388:                 this.phone = phone;
416:      * A handler that processes messages on the main thread in the phone process. Since many
417:      * of the Phone calls are not thread safe this is needed to shuttle the requests from the
418:      * inbound binder threads to the main thread in the phone process.  The Binder thread
435:             final Phone defaultPhone = getDefaultPhone();
440:                     final Phone phone = getPhoneFromRequest(request);
459:                         request.result = phone != null
460:                                 ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
471:                     final Phone phone = getPhoneFromRequest(request);
472:                     request.result = phone != null ?
1257:                     request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
1271:                     request.phone.requestCellInfoUpdate(request.workSource,
1299:                     Phone phone = getPhoneFromRequest(request);
1300:                     phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
1308:                         phone = getPhoneFromRequest(request);
1309:                         request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
1331:                             .enablePhone(request.phone, enable, onCompleted);
1337:                     int phoneId = request.phone.getPhoneId();
1352:                             .getPhoneStatusFromModem(request.phone, onCompleted);
1357:                     int id = request.phone.getPhoneId();
1380:                     request.phone.setSystemSelectionChannels(args.first, onCompleted);
1553:     private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
1555:                 command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone, workSource);
1564:             int command, Object argument, Integer subId, Phone phone, WorkSource workSource) {
1570:         if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
1571:             throw new IllegalArgumentException("subId and phone cannot both be specified!");
1572:         } else if (phone != null) {
1573:             request = new MainThreadRequest(argument, phone, workSource);
1613:      * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
1617:             int command, Object argument, Phone phone, WorkSource workSource) {
1618:         MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
1656:         Phone thePhone = getPhone(getDefaultSubscription());
1663:         ServiceManager.addService("phone", this);
1667:         if (request.phone != null) {
1668:             return request.phone;
1680:         Phone phone = getPhoneFromRequest(request);
1681:         return phone == null ? null :
1682:                 UiccController.getInstance().getUiccCard(phone.getPhoneId());
1685:     // returns phone associated with the subId.
1690:     private void sendEraseModemConfig(Phone phone) {
1691:         if (phone != null) {
1693:                   mApp, phone.getSubId(), "eraseModemConfig");
1731:             // PENDING: should we just silently fail if phone is offhook or ringing?
1752:         // from the context of the phone app.
1755:         if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
1936:             final Phone phone = getPhone(subId);
1937:             if (phone != null) {
1938:                 phone.updateServiceLocation();
1982:             final Phone phone = getPhone(subId);
1983:             if (phone != null) {
1984:                 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
2002:             final Phone phone = getPhone(subId);
2003:             if (phone != null) {
2004:                 phone.setRadioPower(!isRadioOnForSubscriber(subId));
2020:             final Phone phone = getPhone(subId);
2021:             if (phone == null) {
2024:             if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
2042:                 Phone phone = PhoneFactory.getPhone(i);
2043:                 if (phone != null && phone.isRadioAvailable()) return true;
2059:                 logv("Shutting down Phone " + i);
2068:         Phone phone = PhoneFactory.getPhone(phoneId);
2069:         if (phone != null && phone.isRadioAvailable()) {
2070:             phone.shutdownRadio();
2079:             final Phone defaultPhone = PhoneFactory.getDefaultPhone();
2084:                 loge("There's no default phone.");
2097:             final Phone phone = getPhone(subId);
2098:             if (phone != null) {
2099:                 phone.setRadioPower(turnOn);
2117:             final Phone phone = getPhone(subId);
2118:             if (phone != null) {
2119:                 phone.getDataEnabledSettings().setUserDataEnabled(true);
2137:             final Phone phone = getPhone(subId);
2138:             if (phone != null) {
2139:                 phone.getDataEnabledSettings().setUserDataEnabled(false);
2153:             final Phone phone = getPhone(subId);
2154:             if (phone != null) {
2155:                 return phone.isDataAllowed(ApnSetting.TYPE_DEFAULT);
2204:             Phone phone = PhoneFactory.getPhone(slotIndex);
2205:             return phone == null ? TelephonyManager.CALL_STATE_IDLE :
2206:                     PhoneConstantConversions.convertCallState(phone.getState());
2221:             final Phone phone = getPhone(subId);
2222:             if (phone != null) {
2223:                 return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
2242:             final Phone phone = getPhone(subId);
2243:             if (phone != null) {
2244:                 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
2273:                 return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
2294:             if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
2295:                 // Get default phone in this case.
2296:                 phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
2299:             Phone phone = PhoneFactory.getPhone(phoneId);
2300:             if (phone == null) return "";
2301:             ServiceStateTracker sst = phone.getServiceStateTracker();
2306:             EmergencyNumberTracker ent = phone.getEmergencyNumberTracker();
2325:             final Phone phone = getPhone(subId);
2326:             if (phone != null) {
2327:                 phone.enableLocationUpdates();
2346:             final Phone phone = getPhone(subId);
2347:             if (phone != null) {
2348:                 phone.disableLocationUpdates();
2407:         for (Phone phone : PhoneFactory.getPhones()) {
2408:             List<CellInfo> info = phone.getAllCellInfo();
2447:             for (Phone phone : PhoneFactory.getPhones()) {
2449:                         CMD_GET_ALL_CELL_INFO, null, phone, workSource);
2500:         final Phone phone = getPhoneFromSubId(subId);
2501:         if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
2503:         sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
2521:         Phone phone = PhoneFactory.getPhone(slotIndex);
2522:         if (phone == null) {
2525:         int subId = phone.getSubId();
2533:             return phone.getImei();
2541:         Phone phone = PhoneFactory.getPhone(slotIndex);
2543:         if (phone != null) {
2544:             String imei = phone.getImei();
2552:         Phone phone = PhoneFactory.getPhone(slotIndex);
2553:         if (phone == null) {
2557:         int subId = phone.getSubId();
2565:             return phone.getMeid();
2573:         Phone phone = PhoneFactory.getPhone(slotIndex);
2575:         if (phone != null) {
2576:             String meid = phone.getMeid();
2585:         Phone phone = PhoneFactory.getPhone(slotIndex);
2586:         if (phone == null) {
2589:         int subId = phone.getSubId();
2598:             return phone.getDeviceSvn();
2608:             final Phone phone = getPhone(subId);
2609:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
2619:             final Phone phone = getPhone(subId);
2620:             return phone == null ? null : phone.getCarrierName();
2630:             final Phone phone = getPhone(subId);
2631:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
2632:                     : phone.getSpecificCarrierId();
2642:             final Phone phone = getPhone(subId);
2643:             return phone == null ? null : phone.getSpecificCarrierName();
2654:         final Phone phone = PhoneFactory.getPhone(slotIndex);
2655:         if (phone == null) {
2660:             return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
2671:      * Make sure the caller has the MODIFY_PHONE_STATE permission.
2676:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
2696:      * Make sure the caller has the CALL_PHONE permission.
2701:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
2737:             final Phone phone = PhoneFactory.getPhone(slotIndex);
2738:             if (phone == null) {
2739:                 return PhoneConstants.PHONE_TYPE_NONE;
2741:                 return phone.getPhoneType();
2768:             final Phone phone = getPhone(subId);
2769:             if (phone != null) {
2770:                 return phone.getCdmaEriIconIndex();
2801:             final Phone phone = getPhone(subId);
2802:             if (phone != null) {
2803:                 return phone.getCdmaEriIconMode();
2832:             final Phone phone = getPhone(subId);
2833:             if (phone != null) {
2834:                 return phone.getCdmaEriText();
2853:             final Phone phone = getPhone(subId);
2854:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2855:                 return phone.getLine1Number();
2857:                 loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
2875:             final Phone phone = getPhone(subId);
2876:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2877:                 return phone.getCdmaMin();
2889:         if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
2891:             throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
3055:             final Phone phone = getPhone(subId);
3056:             if (phone != null) {
3057:                 phone.setVoiceActivationState(activationState);
3076:             final Phone phone = getPhone(subId);
3077:             if (phone != null) {
3078:                 phone.setDataActivationState(activationState);
3094:         final Phone phone = getPhone(subId);
3097:             if (phone != null) {
3098:                 return phone.getVoiceActivationState();
3114:         final Phone phone = getPhone(subId);
3117:             if (phone != null) {
3118:                 return phone.getDataActivationState();
3140:             final Phone phone = getPhone(subId);
3141:             if (phone != null) {
3142:                 return phone.getVoiceMessageCount();
3159:             final Phone phone = getPhone(subId);
3160:             return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
3173:         final Phone defaultPhone = getDefaultPhone();
3211:             for (Phone phone : PhoneFactory.getPhones()) {
3212:                 if (phone.isInEmergencySmsMode()) {
3223:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3250:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3288:             Phone phone = getPhone(subId);
3289:             if (phone == null) {
3294:             phone.getImsRegistrationState(regState -> {
3321:             Phone phone = getPhone(subId);
3322:             if (phone == null) {
3327:             phone.getImsRegistrationTech(regTech -> {
3346:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3372:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3423:             Phone phone = getPhone(subId);
3424:             if (phone == null) return false;
3425:             return phone.isImsCapabilityAvailable(capability, regTech);
3473:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3510:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3544:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3579:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3631:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3713:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3780:         Phone phone = getPhone(subId);
3781:         if (phone == null) {
3782:             loge("phone instance null for subid " + subId);
3786:             if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
3790:             if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
4224:             final Phone phone = getPhone(subId);
4225:             if (phone != null) {
4226:                 return phone.getServiceState().getDataNetworkType();
4258:             final Phone phone = getPhone(subId);
4259:             if (phone != null) {
4260:                 return phone.getServiceState().getDataNetworkType();
4283:             final Phone phone = getPhone(subId);
4284:             if (phone != null) {
4285:                 return phone.getServiceState().getVoiceNetworkType();
4310:             final Phone phone = PhoneFactory.getPhone(slotIndex);
4311:             if (phone != null) {
4312:                 return phone.getIccCard().hasIccCard();
4327:      * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
4328:      * or {@link Phone#LTE_ON_CDMA_TRUE}
4347:             final Phone phone = getPhone(subId);
4348:             if (phone == null) {
4351:                 return phone.getLteOnCdmaMode();
4415:                     + " does not correspond to an active phone");
4446:     private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
4463:                     CMD_OPEN_CHANNEL, new Pair<String, Integer>(aid, p2), phone,
4488:     private boolean iccCloseLogicalChannelWithPermission(Phone phone, int channel) {
4494:             Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, channel, phone,
4531:     private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
4540:                     new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
4587:     private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
4605:                     new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
4839:         Phone phone = PhoneFactory.getPhone(slotIndex);
4840:         if (phone != null) {
4842:                     mApp, phone.getSubId(), "resetModemConfig");
4865:         Phone phone = PhoneFactory.getPhone(slotIndex);
4866:         if (phone != null) {
4868:                     mApp, phone.getSubId(), "rebootModem");
4884:         final Phone defaultPhone = getDefaultPhone();
5409:         final Phone defaultPhone = getDefaultPhone();
5527:         final Phone phone = getPhone(subId);
5529:             if (phone != null) {
5530:                 return phone.hasMatchedTetherApnSetting();
5554:             Phone phone = PhoneFactory.getPhone(phoneId);
5555:             if (phone != null) {
5557:                 phone.getDataEnabledSettings().setUserDataEnabled(enable);
5559:                 loge("setUserDataEnabled: no phone found. Invalid subId=" + subId);
5577:         final Phone phone = getPhone(subId);
5579:             if (phone != null) {
5584:                 phone.setAlwaysReportSignalStrength(isEnable);
5586:                 loge("setAlwaysReportSignalStrength: no phone found for subId="
5615:      * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
5633:             Phone phone = PhoneFactory.getPhone(phoneId);
5634:             if (phone != null) {
5635:                 boolean retVal = phone.isUserDataEnabled();
5639:                 if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
5662:             Phone phone = PhoneFactory.getPhone(phoneId);
5663:             if (phone != null) {
5664:                 boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
5668:                 if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
5677:             Phone phone) {
5683:         PackageManager pkgMgr = phone.getContext().getPackageManager();
5688:             SubscriptionInfo subInfo = subController.getSubscriptionInfo(phone.getSubId());
5690:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5702:     private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, Phone phone,
5711:             SubscriptionInfo subInfo = subController.getSubscriptionInfo(phone.getSubId());
5713:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5723:         final Phone phone = getPhone(subId);
5724:         if (phone == null) {
5728:         UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
5736:                 phone.getContext().getPackageManager()), Binder.getCallingUid(), phone);
5742:         final Phone phone = getPhone(subId);
5743:         if (phone == null) {
5748:                 UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
5755:                         phone.getContext().getPackageManager(), uid), uid, phone);
5860:         final Phone phone = getPhone(subId);
5861:         UiccCard card = phone == null ? null : phone.getUiccCard();
5883:             final Phone phone = getPhone(subId);
5884:             if (phone == null) {
5887:             final String subscriberId = phone.getSubscriberId();
6110:             final Phone phone = getPhone(subId);
6111:             return phone == null ? false : phone.setOperatorBrandOverride(brand);
6126:             final Phone phone = getPhone(subId);
6127:             if (phone == null) {
6130:             return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
6181:         Phone phone = PhoneFactory.getPhone(phoneId);
6183:         if (phone == null) {
6190:                             mApp, phone.getSubId(), "getRadioAccessFamily");
6200:         final Phone defaultPhone = getDefaultPhone();
6214:         final Phone defaultPhone = getDefaultPhone();
6268:                     .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
6299:         final Phone phone = getPhone(subscriptionId);
6300:         if (phone == null) {
6301:             loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
6308:                     phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
6341:      * Returns the unique device ID of phone, for example, the IMEI for
6345:      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
6349:         final Phone phone = PhoneFactory.getPhone(0);
6350:         if (phone == null) {
6353:         int subId = phone.getSubId();
6361:             return phone.getDeviceId();
6374:         Phone phone = getPhone(subId);
6375:         if (phone != null) {
6376:             return phone.isImsRegistered();
6397:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
6411:             Phone phone = getPhone(subscriptionId);
6412:             if (phone == null) {
6415:             return PhoneUtils.makePstnPhoneAccountHandle(phone);
6427:             Phone phone = getPhone(subId);
6428:             if (phone != null) {
6429:                 return phone.isWifiCallingEnabled();
6444:             Phone phone = getPhone(subId);
6445:             if (phone != null) {
6446:                 return phone.isVideoEnabled();
6462:             Phone phone = getPhone(subId);
6463:             if (phone != null) {
6464:                 return phone.getImsRegistrationTech();
6522:         final Phone phone = getPhone(subId);
6523:         if (phone == null) {
6530:                     phone.getContext().getOpPackageName(), null);
6539:             final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
6667:             final Phone phone = getPhone(subId);
6668:             if (phone == null) {
6672:             ServiceState ss = phone.getServiceState();
6685:      * Returns the URI for the per-account voicemail ringtone set in Phone settings.
6696:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6697:             if (phone == null) {
6698:                 phone = getDefaultPhone();
6701:             return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
6711:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6721:         final Phone defaultPhone = getDefaultPhone();
6732:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6733:             if (phone == null) {
6734:                 phone = defaultPhone;
6736:             VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
6743:      * Returns whether vibration is set for voicemail notification in Phone settings.
6753:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6754:             if (phone == null) {
6755:                 phone = getDefaultPhone();
6758:             return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
6768:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6778:         final Phone defaultPhone = getDefaultPhone();
6789:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6790:             if (phone == null) {
6791:                 phone = defaultPhone;
6793:             VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
6800:      * Make sure either called from same process as self (phone) or IPC caller has read privilege.
6805:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
6810:      * Make sure either called from same process as self (phone) or IPC caller has send SMS
6853:         Phone phone = getPhone(subId);
6857:             if (phone == null) {
6862:                 aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
6882:         Phone phone = getPhone(subId);
6886:             if (phone == null) {
6891:                 esn = phone.getEsn();
6910:         Phone phone = getPhone(subId);
6914:             if (phone == null) {
6919:                 cdmaPrlVersion = phone.getCdmaPrlVersion();
7013:         final Phone phone = getPhone(subId);
7016:         if (phone == null) {
7021:             phone.carrierActionSetMeteredApnsEnabled(enabled);
7038:         final Phone phone = getPhone(subId);
7041:         if (phone == null) {
7046:             phone.carrierActionSetRadioEnabled(enabled);
7066:         final Phone phone = getPhone(subId);
7069:         if (phone == null) {
7074:             phone.carrierActionReportDefaultNetworkStatus(report);
7090:         final Phone phone = getPhone(subId);
7091:         if (phone == null) {
7096:             phone.carrierActionResetAll();
7103:      * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
7110:             writer.println("Permission Denial: can't dump Phone from pid="
7140:             Phone phone = getPhone(subId);
7141:             if (phone != null) {
7142:                 phone.getDataEnabledSettings().setPolicyDataEnabled(enabled);
7161:         Phone phone = getPhone(subId);
7165:             if (phone != null) {
7166:                 return phone.getClientRequestStats();
7193:         Phone phone = PhoneFactory.getPhone(slotIndex);
7199:             if (phone != null) {
7200:                 phone.setSimPowerState(state, workSource);
7222:      * Check if phone is in emergency callback mode
7223:      * @return true if phone is in emergency callback mode
7229:         final Phone phone = getPhone(subId);
7233:             if (phone != null) {
7234:                 return phone.isInEcm();
7254:             Phone p = getPhone(subId);
7274:         Phone phone = PhoneFactory.getPhone(slotIndex);
7275:         if (phone != null) {
7276:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
7283:                 return phone.getRadioPowerState();
7296:      * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
7311:             Phone phone = getPhone(subId);
7312:             isEnabled =  phone != null ? phone.getDataRoamingEnabled() : false;
7327:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
7340:             Phone phone = getPhone(subId);
7341:             if (phone != null) {
7342:                 phone.setDataRoamingEnabled(isEnabled);
7358:             Phone phone = getPhone(subId);
7359:             if (phone != null) {
7360:                 isAllowed = phone.isCspPlmnEnabled();
7375:             // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
7512:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
7521:             Phone phone = getPhone(subId);
7522:             if (phone == null) {
7525:             UiccCard uiccCard = phone.getUiccCard();
7562:      * not set, return {@link Phone#PREFERRED_NT_MODE}.
7570:         return Phone.PREFERRED_NT_MODE;
7580:             final Phone phone = getPhone(subId);
7581:             if (phone == null) {
7585:             phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
7598:             final Phone phone = getPhone(subId);
7599:             if (phone == null) {
7603:             return phone.getCarrierIdListVersion();
7672:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7677:             for (Phone phone: PhoneFactory.getPhones()) {
7678:                 if (phone.getEmergencyNumberTracker() != null
7679:                         && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
7681:                             phone.getSubId(),
7682:                             phone.getEmergencyNumberTracker().getEmergencyNumberList());
7693:         final Phone defaultPhone = getDefaultPhone();
7701:             for (Phone phone: PhoneFactory.getPhones()) {
7702:                 if (phone.getEmergencyNumberTracker() != null
7703:                         && phone.getEmergencyNumberTracker() != null) {
7704:                     if (phone.getEmergencyNumberTracker().isEmergencyNumber(
7726:             for (Phone phone: PhoneFactory.getPhones()) {
7727:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7748:             for (Phone phone: PhoneFactory.getPhones()) {
7749:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7768:             final Phone phone = getPhone(subId);
7769:             if (phone == null) {
7773:             return phone.getEmergencyNumberDbVersion();
7785:             for (Phone phone: PhoneFactory.getPhones()) {
7786:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7802:             for (Phone phone: PhoneFactory.getPhones()) {
7803:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7819:             for (Phone phone: PhoneFactory.getPhones()) {
7820:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7833:         Phone phone = getPhone(subId);
7834:         if (phone == null) {
7840:                     .getUiccProfileForPhone(phone.getPhoneId());
7859:             Phone phone = PhoneFactory.getPhone(slotIndex);
7860:             if (phone == null) {
7863:                 return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
7876:         Phone phone = PhoneFactory.getPhone(slotIndex);
7877:         if (phone == null) return false;
7880:                 mApp, phone.getSubId(), callingPackage, callingFeatureId,
7882:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7888:                 return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
7890:                 return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
7958:      * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
7959:      * permission, but the other way around is possible with either MODIFY_PHONE_STATE
7988:         Phone phone = getPhone(subId);
7989:         if (phone == null) {
7994:             UiccCard uiccCard = phone.getUiccCard();
8064:         Phone phone = getDefaultPhone();
8065:         if (phone == null) return -1;
8066:         HalVersion hv = phone.getHalVersion();
8096:         enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
8102:             Phone phone = getPhone(subId);
8103:             if (phone == null) return false;
8105:             boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
8106:             return !isMetered || phone.getDataEnabledSettings().isDataEnabled(apnType);
8119:             Phone phone = getPhone(subId);
8120:             if (phone == null) return true; // By default return true.
8122:             return ApnSettingUtils.isMeteredApnType(apnType, phone);
8134:             Phone phone = getPhone(subscriptionId);
8135:             if (phone == null) {
8155:             sendRequestAsync(CMD_SET_SYSTEM_SELECTION_CHANNELS, argument, phone, null);
8225:             Phone phone = getPhone(subId);
8226:             if (phone == null) return false;
8228:             return phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(allow);
8241:             Phone phone = getPhone(subId);
8242:             if (phone == null) return false;
8244:             return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
8257:             Phone phone = getPhone(subId);
8258:             if (phone == null) return false;
8260:             return phone.getDataEnabledSettings().setAlwaysAllowMmsData(alwaysAllow);
8278:             for (Phone phone : PhoneFactory.getPhones()) {
8279:                 Phone defaultPhone = phone.getImsPhone();
8280:                 if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
8325:             Phone phone = getPhone(subId);
8326:             if (phone != null && phone.getIccCard() != null) {
8327:                 return phone.getIccCard().getIccLockEnabled();
8347:         Phone phone = getPhone(subId);
8348:         if (phone == null) {
8355:                     new Pair<Boolean, String>(enabled, password), phone, null);
8377:         Phone phone = getPhone(subId);
8378:         if (phone == null) {
8385:                     new Pair<String, String>(oldPassword, newPassword), phone, null);
22: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
65: import android.telecom.PhoneAccount;
66: import android.telecom.PhoneAccountHandle;
85: import android.telephony.PhoneCapability;
86: 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;
159: import com.android.internal.telephony.imsphone.ImsPhone;
160: 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);
297:     private static PhoneInterfaceManager sInstance;
299:     private PhoneGlobals mApp;
690:                     defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
717:                     defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
728:                     defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
738:                     defaultPhone.resetModemConfig(onCompleted);
784:                     defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
1022:                     if (defaultPhone != null) {
1023:                         defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
1086:                     defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
1114:                     defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
1320:                     defaultPhone.rebootModem(onCompleted);
1330:                     PhoneConfigurationManager.getInstance()
1340:                         mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
1351:                     PhoneConfigurationManager.getInstance()
1439:                     defaultPhone.eraseModemConfig(onCompleted);
1624:      * Initialize the singleton PhoneInterfaceManager instance.
1625:      * This is only done once, at startup, from PhoneApp.onCreate().
1627:     /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
1628:         synchronized (PhoneInterfaceManager.class) {
1630:                 sInstance = new PhoneInterfaceManager(app);
1641:         mCM = PhoneGlobals.getInstance().mCM;
1642:         mImsResolver = PhoneGlobals.getInstance().getImsResolver();
1650:         mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
1657:         return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
1676:                 ? getDefaultPhone() : getPhone(subId);
1687:         return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
1705:         PackageManager pm = getDefaultPhone().getContext().getPackageManager();
1732:             PhoneConstants.State state = mCM.getState(subId);
1733:             if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
1792:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1797:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1805:             final UnlockSim checkSimPin = new UnlockSim(getPhone(subId).getIccCard());
1818:             final UnlockSim checkSimPuk = new UnlockSim(getPhone(subId).getIccCard());
1835:         private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1865:                                             mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
1867:                                             mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1870:                                         mResult = PhoneConstants.PIN_RESULT_SUCCESS;
2045:             logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
2080:             if (defaultPhone != null) {
2081:                 defaultPhone.setRadioPower(turnOn);
2225:                 return PhoneConstantConversions.convertDataState(
2226:                         PhoneConstants.DataState.DISCONNECTED);
2298:             final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
2513:             getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
2717:         Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
2721:         Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
2725:         Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
2887:     public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
2916:             return getDefaultPhone().needsOtaServiceProvisioning();
2951:             PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
2952:             if (phoneAccountHandle == null) {
2955:             return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
3040:         SmsController smsController = PhoneFactory.getSmsController();
3175:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
3184:             defaultPhone.sendDialerSpecialCode(inputCode);
3239:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3263:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3359:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3386:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3402:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3481:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3499:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3519:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3534:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3553:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3569:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3588:             // 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.
3640:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3656:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3671:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3687:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3703:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3722:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3741:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3759:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3804:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3834:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3867:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3926:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4095:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4120:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4146:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4172:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4342:             return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4349:                 return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4412:         int phoneId = UiccController.getInstance().getPhoneIdFromSlotId(slotIndex);
4413:         if (phoneId == -1) {
4417:         return PhoneFactory.getPhone(phoneId);
4452:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4594:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4885:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
4892:             return defaultPhone.getPcscfAddress(apnType);
5143:             getDefaultPhone().setImsRegistrationState(registered);
5349:                     request, messenger, binder, getPhone(subId),
5410:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
5418:             return PhoneFactory.calculatePreferredNetworkType(defaultPhone.getContext(), 0);
5552:             int phoneId = mSubscriptionController.getPhoneId(subId);
5553:             if (DBG) log("setUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5631:             int phoneId = mSubscriptionController.getPhoneId(subId);
5632:             if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5660:             int phoneId = mSubscriptionController.getPhoneId(subId);
5661:             if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5764:         int phoneId = SubscriptionManager.getPhoneId(subId);
5765:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5772:             getPhone(phoneId), pkgName);
5789:                 getPhone(i), pkgName);
5800:         if (!SubscriptionManager.isValidPhoneId(phoneId)) {
5801:             loge("phoneId " + phoneId + " is not valid.");
5804:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5806:             loge("getCarrierPackageNamesForIntentAndPhone: No UICC");
5813:     public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
5817:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
6180:     public int getRadioAccessFamily(int phoneId, String callingPackage) {
6191:             raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
6205:             ImsManager.getInstance(defaultPhone.getContext(),
6206:                     defaultPhone.getPhoneId()).setVtSetting(enable);
6215:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
6227:                     ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
6342:      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
6386:             return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
6394:             PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
6401:             return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
6495:             cleanUpSmsRawTable(getDefaultPhone().getContext());
6506:               sendEraseModemConfig(getDefaultPhone());
6687:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6690:      * PhoneAccount.
6693:     public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
6713:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6716:      * PhoneAccount.
6720:             PhoneAccountHandle phoneAccountHandle, Uri uri) {
6723:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6726:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
6745:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6747:      * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
6750:     public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
6770:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6773:      * specific PhoneAccount.
6777:             PhoneAccountHandle phoneAccountHandle, boolean enabled) {
6780:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6783:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
7124:         (new TelephonyShellCommand(this, getDefaultPhone().getContext()))
7377:             if (checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
7566:         int phoneId = mSubscriptionController.getPhoneId(subId);
7567:         if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
7568:             return list.get(phoneId);
7697:                             mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
7915:                 getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
7938:         PhoneCapability staticCapability =
8044:             int phoneCount = TelephonyManager.getDefault().getPhoneCount();
8046:             int[] logicalSlotsMapping = new int[phoneCount];
8178:         SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
8199:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8211:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8281:                     ImsPhone imsPhone = (ImsPhone) defaultPhone;
8283:                             (ImsPhoneCallTracker) imsPhone.getCallTracker();
8285:                     Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
8286:                             + imsPhone.getMsisdn());
132: import com.android.internal.telephony.DefaultPhoneNotifier;
473:                             getPhoneFromRequest(request).handlePinMmi((String) request.argument)
748:                     getPhoneFromRequest(request).getPreferredNetworkType(onCompleted);
774:                     getPhoneFromRequest(request).setPreferredNetworkType(networkType, onCompleted);
798:                     getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
810:                     getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
820:                     getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
827:                     getPhoneFromRequest(request).getCallForwardingOption(
884:                     getPhoneFromRequest(request).setCallForwardingOption(
906:                     getPhoneFromRequest(request).getCallWaiting(onCompleted);
950:                     getPhoneFromRequest(request).setCallWaiting(isEnable, onCompleted);
1002:                     getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
1197:                     getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
1218:                     getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
1234:                     getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
1246:                     getPhoneFromRequest(request).setCdmaSubscription(subscriptionMode, onCompleted);
1361:                         mPhoneConfigurationManager.addToPhoneStatusCache(id,
1449:                     getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
1467:                     getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
1670:             return getPhoneFromSubId(request.subId);
1966:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2041:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2058:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2060:                 shutdownRadioUsingPhoneId(i);
2590:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2730:         return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
2760:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2793:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2824:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2965:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3133:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3193:                     .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3230:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3256:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3313:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3353:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3378:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3478:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3515:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3549:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3584:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3636:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3718:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3800:         checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
3864:         checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
4216:                 && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
4250:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4275:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4367:         return mSubscriptionController.getPhoneId(getDefaultSubscription());
4429:         return iccOpenLogicalChannelWithPermission(getPhoneFromSubId(subId), callingPackage, aid,
4442:         return iccOpenLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4477:         return iccCloseLogicalChannelWithPermission(getPhoneFromSubId(subId), channel);
4484:         return iccCloseLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4513:         return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
4527:                 getPhoneFromSlotIdOrThrowException(slotIndex), channel, cla, command, p1, p2, p3,
4566:         return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
4582:                 getPhoneFromSlotIdOrThrowException(slotIndex), callingPackage, cla, command, p1,
4667:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4705:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
5086:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5433:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5482:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5780:         for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
5844:         enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
5850:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
5930:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
5957:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
5980:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6189:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
6239:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6258:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6395:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
6396:                 callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
6631:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7157:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7314:             TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
7352:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7476:                         slot.getPhoneId(),
7612:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7620:             return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
7629:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7669:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7696:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7879:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7914:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
7939:                 mPhoneConfigurationManager.getStaticPhoneCapability();
7979:             mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
8019:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8026:             return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
8035:         metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
8049:                 if (SubscriptionManager.isValidPhoneId(slotInfos[i].getLogicalSlotIdx())) {
8164:                 SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
8282:                     ImsPhoneCallTracker imsPhoneCallTracker =
8284:                     imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
android.googlesource.com/platform/frameworks/opt/telephony:src/java/com/android/internal/telephony/Phone.java: [ master, ]
116: public abstract class Phone extends Handler implements PhoneInternalInterface {
498:     protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
515:     protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
328:     protected Phone mImsPhone = null;
594:     public void createImsPhone() {
3516:     public Phone getImsPhone() {
4164:     public Phone getDefaultPhone() {
193:     protected static final int EVENT_UPDATE_PHONE_OBJECT            = 42;
294:     protected boolean mIsPhoneInEcmState = false;
325:     protected int mPhoneId;
438:     public String getPhoneName() {
442:     protected void setPhoneName(String name) {
1776:     public void updatePhoneObject(int voiceRadioTech) {
2627:     public abstract int getPhoneType();
3639:     public int getPhoneId() {
3647:     public int getVoicePhoneServiceState() {
106:  * A base implementation for the com.android.internal.telephony.Phone interface.
108:  * Note that implementations of Phone.java are expected to be used
117:     private static final String LOG_TAG = "Phone";
242:      * This method is invoked when the Phone exits Emergency Callback Mode.
292:     // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and
433:      * Returns a string identifier for this phone interface for parties
434:      *  outside the phone app process.
489:      * Constructs a Phone in normal (non-unit test) mode.
500:         this(name, notifier, context, ci, unitTestMode, SubscriptionManager.DEFAULT_PHONE_INDEX,
505:      * Constructs a Phone in normal (non-unit test) mode.
513:      * @param phoneId the phone-id of this phone.
541:         * (i.e. voice) phone calls over the telephony network, and is allowed
568:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
583:         if (getPhoneType() != PhoneConstants.PHONE_TYPE_SIP) {
595:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_SIP) {
599:         synchronized(Phone.lockForRadioTechnologyChange) {
662:         // messages to be handled whether or not the phone is being destroyed
664:         // resources of the phone being destroyed
784:         Phone imsPhone = mImsPhone;
823:      * Gets the context for the phone, as set at initialization time.
879:      * Subclasses of Phone probably want to replace this with a
905:      * Subclasses of Phone probably want to replace this with a
929:      * Subclasses of Phone probably want to replace this with a
941:      * Notify the phone that an SMS has been sent. This will be used determine if the SMS was sent
955:      * Determine if the Phone has recently sent an emergency SMS and is still in the interval of
996:     protected void migrateFrom(Phone from) {
1009:         // The emergency state of IMS phone will be cleared in ImsPhone#notifySrvccState after
1072:      *   Connection.getCall() == Phone.getRingingCall()
1092:      * Notifies when phone's video capabilities changes <p>
1097:      *  AsyncResult.result = true if phone supports video calling <p>
1236:      * Example: If Phone.dial is called with "*#31#", then the app will
1548:      * For unit tests; don't send notifications to "Phone"
1565:      * Subclasses of Phone probably want to replace this with a
1670:         // no need for regular phone
1674:      * Subclasses of Phone probably want to replace this with a
1685:      * If this is a simulated phone interface, returns a SimulatedRadioControl.
1699:      * the thread that originally obtained this Phone instance.
1704:                     "com.android.internal.telephony.Phone must be used from within one thread");
1736:      * If the phone has an active call and call waiting occurs,
1737:      * then the phone state is RINGING not OFFHOOK
1746:      * Retrieves the IccFileHandler of the Phone instance
1765:      * Retrieves the Handler of the Phone instance
1772:      * Update the phone object if the voice radio technology has changed
1780:     * Retrieves the ServiceStateTracker of the phone instance.
1788:      * Retrieves the EmergencyNumberTracker of the phone instance.
1810:      * Retrieves the DeviceStateMonitor of the phone instance.
1817:      * Retrieves the DisplayInfoController of the phone instance.
1865:      * Returns the ICC card interface for this phone, or null
1871:         //throw new Exception("getIccCard Shouldn't be called from Phone");
2050:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2218:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
2219:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
2220:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
2221:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
2232:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
2233:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
2234:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
2235:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
2532:     // This property is used to handle phone process crashes, and is the same for CDMA and IMS
2539:      * @return {@code true} if we are in emergency call back mode. This is a period where the phone
2559:      * @return true if this Phone is in an emergency call that caused emergency callback mode to be
2567:      * Set whether or not this Phone has an active emergency call that was placed during emergency
2623:      * Return a numerical identifier for the phone radio interface.
2624:      * @return PHONE_TYPE_XXX as defined above.
2637:     /** sets the voice mail count of the phone and notifies listeners. */
3319:      * Subclasses of Phone probably want to replace this with a
3337:      * Notify registrants if phone is video capable.
3469:         Rlog.e(LOG_TAG, "Error! This function should never be executed, inactive Phone.");
3482:      * Gets the Uicc card corresponding to this phone.
3483:      * @return the UiccCard object corresponding to the phone ID.
3513:      * Return an instance of a IMS phone
3636:      * Returns the phone id.
3648:         Phone imsPhone = mImsPhone;
3722:         Phone imsPhone = mImsPhone;
3741:         Phone imsPhone = mImsPhone;
3755:         Phone imsPhone = mImsPhone;
3769:         Phone imsPhone = mImsPhone;
3779:      * @return the IMS MmTel Registration technology for this Phone, defined in
3783:         Phone imsPhone = mImsPhone;
3793:      * Get the IMS MmTel Registration technology for this Phone, defined in
3797:         Phone imsPhone = mImsPhone;
3806:      * Asynchronously get the IMS MmTel Registration state for this Phone.
3809:         Phone imsPhone = mImsPhone;
3867:      *  Set phone radio capability
3869:      *  @param rc the phone radio capability defined in
3878:      *  Get phone radio access family
3898:      *  Get phone radio capability
3912:      *  @param rc the phone radio capability currently in effect for this phone.
3945:      * Registers the handler when phone radio  capability is changed.
3956:      * Unregister for notifications when phone radio type and access technology is changed.
3991:      * Determines if video calling is enabled for the phone.
3997:         Phone imsPhone = mImsPhone;
4119:     public static void checkWfcWifiOnlyModeBeforeDial(Phone imsPhone, int phoneId, Context context)
4159:      * This function returns the parent phone of the current phone. It is applicable
4160:      * only for IMS phone (function is overridden by ImsPhone). For others the phone
4198:      * none of the phone is in service, and one of them has the capability to make the emergency
4205:         for (Phone phone : PhoneFactory.getPhones()) {
4206:             if (phone != null) {
4207:                 ServiceState ss = phone.getServiceStateTracker().getServiceState();
4208:                 // One of the phone is in service, hence the device is not emergency call only.
4280:         pw.println("Phone: subId=" + getSubId());
4455:         pw.println("Phone Local Log: ");
51: import android.telephony.PhoneStateListener;
80: import com.android.internal.telephony.imsphone.ImsPhoneCall;
110:  * originally called PhoneFactory to obtain the interface.
415:      * PhoneNotifier is an abstraction for all system-wide
420:     protected PhoneNotifier mNotifier;
447:      * Retrieves Nai for phones. Returns null if Nai is not set.
516:                     boolean unitTestMode, int phoneId,
518:         mPhoneId = phoneId;
557:          * By default old phones won't have the property set but do generate
591:      * Start setup of ImsPhone, which will start trying to connect to the ImsResolver. Will not be
600:             if (mImsPhone == null) {
601:                 mImsPhone = PhoneFactory.makeImsPhone(mNotifier, this);
602:                 CallManager.getInstance().registerPhone(mImsPhone);
603:                 mImsPhone.registerForSilentRedial(
678:                     PhoneConstants.State state = getState();
680:                             && ((state == PhoneConstants.State.RINGING) ||
681:                                     (state == PhoneConstants.State.IDLE))) {
692:                 if (getState() == PhoneConstants.State.RINGING) {
710:                         if (mImsPhone != null) {
712:                             mImsPhone.notifyRedialConnectionChanged(cn);
716:                         if (mImsPhone != null) {
717:                             mImsPhone.notifyRedialConnectionChanged(null);
791:                     if (imsPhone != null) {
792:                         conn = imsPhone.getHandoverConnection();
793:                         migrateFrom(imsPhone);
795:                         Rlog.d(LOG_TAG, "HANDOVER_STARTED: mImsPhone null");
800:                     if (imsPhone != null) {
801:                         imsPhone.notifySrvccState(srvccState);
803:                         Rlog.d(LOG_TAG, "HANDOVER_COMPLETED: mImsPhone null");
856:      * {@link PhoneConstants.State} which can be obtained using the {@link PhoneStateListener}
1026:             // Since CallManager has already registered with both CS and IMS phones,
1743:     public abstract PhoneConstants.State getState();
1941:      * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged
1942:      * PhoneStateListener.onCellInfoChanged} will be invoked.
1957:      * available on this interface. Use PhoneStateNotifier or similar instead.
2045:      * available on this interface. Use PhoneStateNotifier or similar instead.
2087:      * interface. Use <code>PhoneStateNotifier</code> or an equivalent.
2457:     public PhoneConstants.DataState getDataConnectionState(String apnType) {
2458:         return PhoneConstants.DataState.DISCONNECTED;
2533:     // phones
2613:         if (mImsPhone != null) {
2614:             isPresent = isVideoCallOrConference(mImsPhone.getForegroundCall()) ||
2615:                     isVideoCallOrConference(mImsPhone.getBackgroundCall()) ||
2616:                     isVideoCallOrConference(mImsPhone.getRingingCall());
2758:      * Retrieves the MIN for CDMA phones.
2774:      *  Retrieves PRL Version for CDMA phones
3413:      * Retrieves the MSISDN from the UICC. For GSM/UMTS phones, this is equivalent to
3414:      * {@link #getLine1Number()}. For CDMA phones, {@link #getLine1Number()} returns
3415:      * the MDN, so this method is provided to return the MSISDN on CDMA/LTE phones.
3423:      * Retrieves the EF_PNN from the UICC For GSM/UMTS phones.
3432:      * {@link android.telephony.PhoneStateListener} instead.
3435:     public PhoneConstants.DataState getDataConnectionState() {
3436:         return getDataConnectionState(PhoneConstants.APN_TYPE_DEFAULT);
3453:      * @return {@link PhoneConstants#LTE_ON_CDMA_UNKNOWN}, {@link PhoneConstants#LTE_ON_CDMA_FALSE}
3454:      * or {@link PhoneConstants#LTE_ON_CDMA_TRUE}
3468:         // This function should be overridden by class GsmCdmaPhone.
3517:         return mImsPhone;
3583:      * Return if UT capability of ImsPhone is enabled or not
3587:         if (mImsPhone != null) {
3588:             return mImsPhone.isUtEnabled();
3607:         // dialInternal shall be overriden by GsmCdmaPhone
3612:      * This function is for CSFB SS. GsmCdmaPhone overrides this function.
3644:      * Return the service state of mImsPhone if it is STATE_IN_SERVICE
3649:         if (imsPhone != null
3650:                 && imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
3724:         if (imsPhone != null) {
3725:             isImsRegistered = imsPhone.isImsRegistered();
3743:         if (imsPhone != null) {
3744:             isWifiCallingEnabled = imsPhone.isWifiCallingEnabled();
3757:         if (imsPhone != null) {
3758:             isAvailable = imsPhone.isImsCapabilityAvailable(capability, regTech);
3771:         if (imsPhone != null) {
3772:             isVolteEnabled = imsPhone.isVolteEnabled();
3785:         if (imsPhone != null) {
3786:             regTech = imsPhone.getImsRegistrationTech();
3798:         if (imsPhone != null) {
3799:             imsPhone.getImsRegistrationTech(callback);
3810:         if (imsPhone != null) {
3811:             imsPhone.getImsRegistrationState(callback);
3928:         int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
3939:             int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
3983:         if (mImsPhone == null) {
3987:         return mImsPhone.isImsAvailable();
3998:         if (imsPhone != null) {
3999:             return imsPhone.isVideoEnabled();
4121:         if (imsPhone == null || !imsPhone.isWifiCallingEnabled()) {
4122:             ImsManager imsManager = ImsManager.getInstance(context, phoneId);
4319:         if (mImsPhone != null) {
4321:                 mImsPhone.dump(fd, pw, args);
416:      * state change notification. DefaultPhoneNotifier is
491:      * @param notifier An instance of DefaultPhoneNotifier,
507:      * @param notifier An instance of DefaultPhoneNotifier,
2414:         // This function is added to send the notification to DefaultPhoneNotifier.
2544:         return mIsPhoneInEcmState;
2555:         mIsPhoneInEcmState = isInEcm;
2599:         if (call instanceof ImsPhoneCall) {
2600:             ImsPhoneCall imsPhoneCall = (ImsPhoneCall) call;
2601:             ImsCall imsCall = imsPhoneCall.getImsCall();
2655:                 mPhoneId, UiccController.APP_FAM_3GPP);
3389:      * A fucntion of type getPhoneProp(propType) where propType is an
3487:         return mUiccController.getUiccCard(mPhoneId);
3632:         return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
3640:         return mPhoneId;
3970:         ImsManager imsManager = ImsManager.getInstance(mContext, mPhoneId);
4281:         pw.println(" mPhoneId=" + mPhoneId);
4308:         pw.println(" getPhoneName()=" + getPhoneName());
4309:         pw.println(" getPhoneType()=" + getPhoneType());
github.com/apache/dubbo-samples:java/dubbo-samples-compatible/src/main/java/org/apache/dubbo/samples/basic/api/Phone.java: [ master, ]
23: public class Phone implements Serializable {
46:         return "Phone{" +
android.googlesource.com/platform/superproject:external/guice/examples/src/example/xml/Phone.java: [ master, ]
3: public class 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/googleapis/java-talent:proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/Phone.java: [ master, ]
30: public final class Phone extends com.google.protobuf.GeneratedMessageV3
36:   private Phone(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
40:   private Phone() {
58:   private Phone(
157:     PHONE_TYPE_UNSPECIFIED(0),
266:     public static final int PHONE_TYPE_UNSPECIFIED_VALUE = 0;
147:   public enum PhoneType implements com.google.protobuf.ProtocolMessageEnum {
450:     private PhoneType(int value) {
28:  * Protobuf type {@code google.cloud.talent.v4beta1.Phone}
32:     // @@protoc_insertion_point(message_implements:google.cloud.talent.v4beta1.Phone)
35:   // Use Phone.newBuilder() to construct.
50:     return new Phone();
125:         .internal_static_google_cloud_talent_v4beta1_Phone_descriptor;
132:         .internal_static_google_cloud_talent_v4beta1_Phone_fieldAccessorTable
134:             com.google.cloud.talent.v4beta1.Phone.class,
135:             com.google.cloud.talent.v4beta1.Phone.Builder.class);
145:    * Protobuf enum {@code google.cloud.talent.v4beta1.Phone.PhoneType}
155:      * <code>PHONE_TYPE_UNSPECIFIED = 0;</code>
225:      * or LANDLINE number. The [phone usage][google.cloud.talent.v4beta1.ContactInfoUsage] should
226:      * be set to PERSONAL for these phone types. Some more information can be
248:      * fixed-line and mobile numbers by looking at the phone number itself.
264:      * <code>PHONE_TYPE_UNSPECIFIED = 0;</code>
334:      * or LANDLINE number. The [phone usage][google.cloud.talent.v4beta1.ContactInfoUsage] should
335:      * be set to PERSONAL for these phone types. Some more information can be
357:      * fixed-line and mobile numbers by looking at the phone number itself.
389:           return PHONE_TYPE_UNSPECIFIED;
433:       return com.google.cloud.talent.v4beta1.Phone.getDescriptor().getEnumTypes().get(0);
454:     // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4beta1.Phone.PhoneType)
463:    * The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
477:    * The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
497:    * The phone type. For example, LANDLINE, MOBILE, FAX.
500:    * <code>.google.cloud.talent.v4beta1.Phone.PhoneType type = 2;</code>
511:    * The phone type. For example, LANDLINE, MOBILE, FAX.
514:    * <code>.google.cloud.talent.v4beta1.Phone.PhoneType type = 2;</code>
518:   public com.google.cloud.talent.v4beta1.Phone.PhoneType getType() {
520:     com.google.cloud.talent.v4beta1.Phone.PhoneType result =
521:         com.google.cloud.talent.v4beta1.Phone.PhoneType.valueOf(type_);
522:     return result == null ? com.google.cloud.talent.v4beta1.Phone.PhoneType.UNRECOGNIZED : result;
531:    * Phone number.
532:    * Any phone formats are supported and only exact matches are performed on
533:    * searches. For example, if a phone number in profile is provided in the
534:    * format of "(xxx)xxx-xxxx", in profile searches the same phone format
558:    * Phone number.
559:    * Any phone formats are supported and only exact matches are performed on
560:    * searches. For example, if a phone number in profile is provided in the
561:    * format of "(xxx)xxx-xxxx", in profile searches the same phone format
651:         != com.google.cloud.talent.v4beta1.Phone.PhoneType.PHONE_TYPE_UNSPECIFIED.getNumber()) {
675:         != com.google.cloud.talent.v4beta1.Phone.PhoneType.PHONE_TYPE_UNSPECIFIED.getNumber()) {
694:     if (!(obj instanceof com.google.cloud.talent.v4beta1.Phone)) {
697:     com.google.cloud.talent.v4beta1.Phone other = (com.google.cloud.talent.v4beta1.Phone) obj;
727:   public static com.google.cloud.talent.v4beta1.Phone parseFrom(java.nio.ByteBuffer data)
732:   public static com.google.cloud.talent.v4beta1.Phone parseFrom(
738:   public static com.google.cloud.talent.v4beta1.Phone parseFrom(com.google.protobuf.ByteString data)
743:   public static com.google.cloud.talent.v4beta1.Phone parseFrom(
750:   public static com.google.cloud.talent.v4beta1.Phone parseFrom(byte[] data)
755:   public static com.google.cloud.talent.v4beta1.Phone parseFrom(
761:   public static com.google.cloud.talent.v4beta1.Phone parseFrom(java.io.InputStream input)
766:   public static com.google.cloud.talent.v4beta1.Phone parseFrom(
773:   public static com.google.cloud.talent.v4beta1.Phone parseDelimitedFrom(java.io.InputStream input)
778:   public static com.google.cloud.talent.v4beta1.Phone parseDelimitedFrom(
785:   public static com.google.cloud.talent.v4beta1.Phone parseFrom(
790:   public static com.google.cloud.talent.v4beta1.Phone parseFrom(
807:   public static Builder newBuilder(com.google.cloud.talent.v4beta1.Phone prototype) {
828:    * Protobuf type {@code google.cloud.talent.v4beta1.Phone}
832:       // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4beta1.Phone)
836:           .internal_static_google_cloud_talent_v4beta1_Phone_descriptor;
843:           .internal_static_google_cloud_talent_v4beta1_Phone_fieldAccessorTable
845:               com.google.cloud.talent.v4beta1.Phone.class,
846:               com.google.cloud.talent.v4beta1.Phone.Builder.class);
849:     // Construct using com.google.cloud.talent.v4beta1.Phone.newBuilder()
880:           .internal_static_google_cloud_talent_v4beta1_Phone_descriptor;
884:     public com.google.cloud.talent.v4beta1.Phone getDefaultInstanceForType() {
885:       return com.google.cloud.talent.v4beta1.Phone.getDefaultInstance();
889:     public com.google.cloud.talent.v4beta1.Phone build() {
890:       com.google.cloud.talent.v4beta1.Phone result = buildPartial();
898:     public com.google.cloud.talent.v4beta1.Phone buildPartial() {
899:       com.google.cloud.talent.v4beta1.Phone result =
900:           new com.google.cloud.talent.v4beta1.Phone(this);
944:       if (other instanceof com.google.cloud.talent.v4beta1.Phone) {
945:         return mergeFrom((com.google.cloud.talent.v4beta1.Phone) other);
952:     public Builder mergeFrom(com.google.cloud.talent.v4beta1.Phone other) {
953:       if (other == com.google.cloud.talent.v4beta1.Phone.getDefaultInstance()) return this;
983:       com.google.cloud.talent.v4beta1.Phone parsedMessage = null;
987:         parsedMessage = (com.google.cloud.talent.v4beta1.Phone) e.getUnfinishedMessage();
1002:      * The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
1016:      * The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
1033:      * The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
1052:      * The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
1073:      * The usage of the phone. For example, SCHOOL, WORK, PERSONAL.
1092:      * The phone type. For example, LANDLINE, MOBILE, FAX.
1095:      * <code>.google.cloud.talent.v4beta1.Phone.PhoneType type = 2;</code>
1106:      * The phone type. For example, LANDLINE, MOBILE, FAX.
1109:      * <code>.google.cloud.talent.v4beta1.Phone.PhoneType type = 2;</code>
1123:      * The phone type. For example, LANDLINE, MOBILE, FAX.
1126:      * <code>.google.cloud.talent.v4beta1.Phone.PhoneType type = 2;</code>
1130:     public com.google.cloud.talent.v4beta1.Phone.PhoneType getType() {
1132:       com.google.cloud.talent.v4beta1.Phone.PhoneType result =
1133:           com.google.cloud.talent.v4beta1.Phone.PhoneType.valueOf(type_);
1134:       return result == null ? com.google.cloud.talent.v4beta1.Phone.PhoneType.UNRECOGNIZED : result;
1140:      * The phone type. For example, LANDLINE, MOBILE, FAX.
1143:      * <code>.google.cloud.talent.v4beta1.Phone.PhoneType type = 2;</code>
1148:     public Builder setType(com.google.cloud.talent.v4beta1.Phone.PhoneType value) {
1161:      * The phone type. For example, LANDLINE, MOBILE, FAX.
1164:      * <code>.google.cloud.talent.v4beta1.Phone.PhoneType type = 2;</code>
1180:      * Phone number.
1181:      * Any phone formats are supported and only exact matches are performed on
1182:      * searches. For example, if a phone number in profile is provided in the
1183:      * format of "(xxx)xxx-xxxx", in profile searches the same phone format
1207:      * Phone number.
1208:      * Any phone formats are supported and only exact matches are performed on
1209:      * searches. For example, if a phone number in profile is provided in the
1210:      * format of "(xxx)xxx-xxxx", in profile searches the same phone format
1234:      * Phone number.
1235:      * Any phone formats are supported and only exact matches are performed on
1236:      * searches. For example, if a phone number in profile is provided in the
1237:      * format of "(xxx)xxx-xxxx", in profile searches the same phone format
1260:      * Phone number.
1261:      * Any phone formats are supported and only exact matches are performed on
1262:      * searches. For example, if a phone number in profile is provided in the
1263:      * format of "(xxx)xxx-xxxx", in profile searches the same phone format
1282:      * Phone number.
1283:      * Any phone formats are supported and only exact matches are performed on
1284:      * searches. For example, if a phone number in profile is provided in the
1285:      * format of "(xxx)xxx-xxxx", in profile searches the same phone format
1428:     // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4beta1.Phone)
1431:   // @@protoc_insertion_point(class_scope:google.cloud.talent.v4beta1.Phone)
1432:   private static final com.google.cloud.talent.v4beta1.Phone DEFAULT_INSTANCE;
1435:     DEFAULT_INSTANCE = new com.google.cloud.talent.v4beta1.Phone();
1438:   public static com.google.cloud.talent.v4beta1.Phone getDefaultInstance() {
1442:   private static final com.google.protobuf.Parser<Phone> PARSER =
1443:       new com.google.protobuf.AbstractParser<Phone>() {
1445:         public Phone parsePartialFrom(
1449:           return new Phone(input, extensionRegistry);
1453:   public static com.google.protobuf.Parser<Phone> parser() {
1458:   public com.google.protobuf.Parser<Phone> getParserForType() {
1463:   public com.google.cloud.talent.v4beta1.Phone getDefaultInstanceForType() {
25:  * Resource that represents a person's telephone number.
33:     PhoneOrBuilder {
142:    * Enum that represents the type of the telephone.
202:      * A TTY (test telephone) or TDD (telecommunication device for the deaf).
222:      * A virtual telephone number is a number that can be routed to another
311:      * A TTY (test telephone) or TDD (telecommunication device for the deaf).
331:      * A virtual telephone number is a number that can be routed to another
378:     public static PhoneType valueOf(int value) {
386:     public static PhoneType forNumber(int value) {
413:     public static com.google.protobuf.Internal.EnumLiteMap<PhoneType> internalGetValueMap() {
417:     private static final com.google.protobuf.Internal.EnumLiteMap<PhoneType> internalValueMap =
418:         new com.google.protobuf.Internal.EnumLiteMap<PhoneType>() {
419:           public PhoneType findValueByNumber(int number) {
420:             return PhoneType.forNumber(number);
436:     private static final PhoneType[] VALUES = values();
438:     public static PhoneType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
825:    * Resource that represents a person's telephone number.
833:       com.google.cloud.talent.v4beta1.PhoneOrBuilder {
github.com/google/guice:examples/src/example/xml/Phone.java: [ master, ] Duplicate result
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/flutter/flutter:examples/layers/services/data.json: [ master, ]
14:   "phone": "+1 (555) 555-2328",
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/create/release-1.2.0_schema/postgresql/dolphinscheduler_ddl.sql: [ dev, ]
627:   phone varchar(11) DEFAULT NULL ,
github.com/google/end-to-end:lib/closure-compiler/contrib/externs/maps/google_maps_api_v3_20.js: [ master, ] Duplicate result
github.com/googleapis/google-api-nodejs-client:src/apis/dfareporting/v3.4.ts: [ master, ]
5970:     phone?: string | null;
5968:      * Primary phone number of this site contact.
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",