Found 143046 results in 30493 files, showing top 50 files (show more).
android.googlesource.com/platform/packages/services/Telephony:src/com/android/phone/PhoneInterfaceManager.java: [ master, ]
482:         public Phone phone;
17: package com.android.phone;
245: public class PhoneInterfaceManager extends ITelephony.Stub {
2330:     private PhoneInterfaceManager(PhoneGlobals app) {
2349:     private Phone getDefaultPhone() {
2384:     private Phone getPhone(int subId) {
3077:     public String getNetworkCountryIsoForPhone(int phoneId) {
6781:     public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
6809:     public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
7396:     public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
381:     private PhoneConfigurationManager mPhoneConfigurationManager;
2363:     private Phone getPhoneFromRequest(MainThreadRequest request) {
2371:     private Phone getPhoneFromSubId(int subId) {
2529:         private final int mPhoneId;
2808:     private void shutdownRadioUsingPhoneId(int phoneId) {
3531:     public int getActivePhoneType() {
3536:     public int getActivePhoneTypeForSlot(int slotIndex) {
4670:     private void checkModifyPhoneStatePermission(int subId, String message) {
5216:     private Phone getPhoneFromSlotPortIndexOrThrowException(int slotIndex, int portIndex) {
5239:     private Phone getPhoneFromValidIccLogicalChannelRequest(
6786:     private int checkCarrierPrivilegesForPackageAnyPhoneWithPermission(String pkgName) {
6837:     public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
7529:     public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
7539:     public int getSubIdForPhoneAccountHandle(
7554:     public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
10156:     private boolean isAnyPhoneInEmergencyState() {
11029:     public PhoneCapability getPhoneCapability() {
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA;
22: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_GSM;
23: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
171: import com.android.internal.telephony.Phone;
209: import com.android.phone.callcomposer.CallComposerPictureManager;
210: import com.android.phone.callcomposer.CallComposerPictureTransfer;
211: import com.android.phone.callcomposer.ImageData;
212: import com.android.phone.settings.PickSmsSubscriptionActivity;
213: import com.android.phone.vvm.PhoneAccountHandleConverter;
214: import com.android.phone.vvm.RemoteVvmTaskManager;
215: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
216: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
481:         // In cases where subId is unavailable, the caller needs to specify the phone.
490:         MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
492:             if (phone != null) {
493:                 this.phone = phone;
521:      * A handler that processes messages on the main thread in the phone process. Since many
522:      * of the Phone calls are not thread safe this is needed to shuttle the requests from the
523:      * inbound binder threads to the main thread in the phone process.  The Binder thread
540:             final Phone defaultPhone = getDefaultPhone();
545:                     final Phone phone = getPhoneFromRequest(request);
564:                         request.result = phone != null
565:                                 ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
576:                     final Phone phone = getPhoneFromRequest(request);
577:                     request.result = phone != null ?
898:                     Phone phone = getPhoneFromRequest(request);
899:                     if (phone != null) {
900:                         phone.isNrDualConnectivityEnabled(onCompleted, request.workSource);
902:                         loge("isNRDualConnectivityEnabled: No phone object");
938:                     Phone phone = getPhoneFromRequest(request);
939:                     if (phone != null) {
940:                         phone.isVoNrEnabled(onCompleted, request.workSource);
942:                         loge("isVoNrEnabled: No phone object");
977:                     Phone phone = getPhoneFromRequest(request);
978:                     if (phone != null) {
979:                         phone.setNrDualConnectivityState((int) request.argument, onCompleted,
982:                         loge("enableNrDualConnectivity: No phone object");
1025:                     Phone phone = getPhoneFromRequest(request);
1026:                     if (phone != null) {
1027:                         phone.setVoNrEnabled((boolean) request.argument, onCompleted,
1030:                         loge("setVoNrEnabled: No phone object");
1158:                     request.phone.getCallForwardingOption(callForwardingReason, onCompleted);
1222:                     request.phone.setCallForwardingOption(
1659:                     request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
1673:                     request.phone.requestCellInfoUpdate(request.workSource,
1701:                     Phone phone = getPhoneFromRequest(request);
1702:                     phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
1711:                         Phone phone = getPhoneFromRequest(request);
1712:                         request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
1735:                             .enablePhone(request.phone, enable, onCompleted);
1741:                     int phoneId = request.phone.getPhoneId();
1757:                             .getPhoneStatusFromModem(request.phone, onCompleted);
1762:                     int id = request.phone.getPhoneId();
1785:                     request.phone.setSystemSelectionChannels(args.first, onCompleted);
1800:                     Phone phone = getPhoneFromRequest(request);
1801:                     if (phone != null) {
1802:                         phone.getSystemSelectionChannels(onCompleted);
1804:                         loge("getSystemSelectionChannels: No phone object");
1951:                     Phone phone = getPhoneFromRequest(request);
1952:                     if (phone != null) {
1953:                         phone.setDataThrottling(onCompleted,
1957:                         loge("setDataThrottling: No phone object");
2001:                     request.phone.setSimPowerState(stateToSet, onCompleted, request.workSource);
2045:                     final Phone phone = getPhoneFromRequest(request);
2046:                     if (phone == null || phone.getServiceStateTracker() == null) {
2047:                         request.result = new IllegalStateException("Phone or SST is null");
2056:                     phone.getSignalStrengthController().setSignalStrengthUpdateRequest(
2073:                     Phone phone = getPhoneFromRequest(request);
2074:                     if (phone == null || phone.getServiceStateTracker() == null) {
2075:                         request.result = new IllegalStateException("Phone or SST is null");
2084:                     phone.getSignalStrengthController().clearSignalStrengthUpdateRequest(
2100:                     request.phone.getSlicingConfig(onCompleted);
2223:     private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
2224:         return sendRequest(command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone,
2234:     private @Nullable Object sendRequest(int command, Object argument, Integer subId, Phone phone,
2241:         if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
2242:             throw new IllegalArgumentException("subId and phone cannot both be specified!");
2243:         } else if (phone != null) {
2244:             request = new MainThreadRequest(argument, phone, workSource);
2304:      * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
2308:             int command, Object argument, Phone phone, WorkSource workSource) {
2309:         MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
2350:         Phone thePhone = getPhone(getDefaultSubscription());
2364:         if (request.phone != null) {
2365:             return request.phone;
2378:         Phone phone = getPhoneFromRequest(request);
2379:         return phone == null ? null :
2380:                 UiccController.getInstance().getUiccPort(phone.getPhoneId());
2383:     // returns phone associated with the subId.
2388:     private void sendEraseModemConfig(@NonNull Phone phone) {
2393:     private void sendEraseDataInSharedPreferences(@NonNull Phone phone) {
2425:             // PENDING: should we just silently fail if phone is offhook or ringing?
2446:         // from the context of the phone app.
2449:         if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
2499:             Phone phone = getPhone(subId);
2500:             final UnlockSim checkSimPin = new UnlockSim(phone.getPhoneId(), phone.getIccCard());
2513:             Phone phone = getPhone(subId);
2514:             final UnlockSim checkSimPuk = new UnlockSim(phone.getPhoneId(), phone.getIccCard());
2676:             final Phone phone = getPhone(getDefaultSubscription());
2677:             if (phone != null) {
2678:                 phone.updateServiceLocation(workSource);
2723:             final Phone phone = getPhone(subId);
2724:             if (phone != null) {
2725:                 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
2743:             final Phone phone = getPhone(subId);
2744:             if (phone != null) {
2745:                 phone.setRadioPower(!isRadioOnForSubscriber(subId));
2761:             final Phone phone = getPhone(subId);
2762:             if (phone == null) {
2765:             if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
2783:                 Phone phone = PhoneFactory.getPhone(i);
2784:                 if (phone != null && phone.isRadioAvailable()) return true;
2800:                 logv("Shutting down Phone " + i);
2809:         Phone phone = PhoneFactory.getPhone(phoneId);
2810:         if (phone != null && phone.isRadioAvailable()) {
2811:             phone.shutdownRadio();
2820:             final Phone defaultPhone = PhoneFactory.getDefaultPhone();
2825:                 loge("There's no default phone.");
2838:             final Phone phone = getPhone(subId);
2839:             if (phone != null) {
2840:                 phone.setRadioPower(turnOn);
2858:             final Phone phone = getPhone(subId);
2859:             if (phone != null) {
2860:                 if (phone.isUsingNewDataStack()) {
2861:                     phone.getDataSettingsManager().setDataEnabled(
2864:                     phone.getDataEnabledSettings().setDataEnabled(
2884:             final Phone phone = getPhone(subId);
2885:             if (phone != null) {
2886:                 if (phone.isUsingNewDataStack()) {
2887:                     phone.getDataSettingsManager().setDataEnabled(
2890:                     phone.getDataEnabledSettings().setDataEnabled(
2906:             final Phone phone = getPhone(subId);
2907:             if (phone != null) {
2908:                 return phone.isDataAllowed();
2967:             Phone phone = getPhone(getDefaultSubscription());
2968:             return phone == null ? TelephonyManager.CALL_STATE_IDLE :
2969:                     PhoneConstantConversions.convertCallState(phone.getState());
2980:             // Check READ_PHONE_STATE for API version 31+
2983:                 throw new SecurityException("getCallState requires READ_PHONE_STATE for apps "
2989:             Phone phone = getPhone(subId);
2990:             return phone == null ? TelephonyManager.CALL_STATE_IDLE :
2991:                     PhoneConstantConversions.convertCallState(phone.getState());
3006:             final Phone phone = getPhone(subId);
3007:             if (phone != null) {
3008:                 if (phone.isUsingNewDataStack()) {
3009:                     return phone.getDataNetworkController().getInternetDataNetworkState();
3011:                 return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
3030:             final Phone phone = getPhone(subId);
3031:             if (phone != null) {
3032:                 return phone.getDataActivityState();
3061:                 return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
3082:             if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
3083:                 // Get default phone in this case.
3084:                 phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
3087:             Phone phone = PhoneFactory.getPhone(phoneId);
3088:             if (phone == null) return "";
3089:             ServiceStateTracker sst = phone.getServiceStateTracker();
3166:         for (Phone phone : PhoneFactory.getPhones()) {
3167:             List<CellInfo> info = phone.getAllCellInfo();
3206:             for (Phone phone : PhoneFactory.getPhones()) {
3208:                         CMD_GET_ALL_CELL_INFO, null, phone, workSource);
3270:         final Phone phone = getPhoneFromSubId(subId);
3271:         if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
3273:         sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
3291:         Phone phone = PhoneFactory.getPhone(slotIndex);
3292:         if (phone == null) {
3295:         int subId = phone.getSubId();
3304:             return phone.getImei();
3312:         Phone phone = PhoneFactory.getPhone(slotIndex);
3314:         if (phone != null) {
3315:             String imei = phone.getImei();
3335:         Phone phone = PhoneFactory.getPhone(slotIndex);
3336:         if (phone == null) {
3340:         int subId = phone.getSubId();
3348:             return phone.getMeid();
3356:         Phone phone = PhoneFactory.getPhone(slotIndex);
3358:         if (phone != null) {
3359:             String meid = phone.getMeid();
3374:         Phone phone = PhoneFactory.getPhone(slotIndex);
3375:         if (phone == null) {
3378:         int subId = phone.getSubId();
3387:             return phone.getDeviceSvn();
3397:             final Phone phone = getPhone(subId);
3398:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
3408:             final Phone phone = getPhone(subId);
3409:             return phone == null ? null : phone.getCarrierName();
3419:             final Phone phone = getPhone(subId);
3420:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
3421:                     : phone.getSpecificCarrierId();
3431:             final Phone phone = getPhone(subId);
3432:             return phone == null ? null : phone.getSpecificCarrierName();
3443:         final Phone phone = PhoneFactory.getPhone(slotIndex);
3444:         if (phone == null) {
3449:             return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
3480:      * Make sure the caller has the MODIFY_PHONE_STATE permission.
3485:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
3494:      * Make sure the caller has the CALL_PHONE permission.
3499:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
3539:             final Phone phone = PhoneFactory.getPhone(slotIndex);
3540:             if (phone == null) {
3541:                 return PhoneConstants.PHONE_TYPE_NONE;
3543:                 return phone.getPhoneType();
3570:             final Phone phone = getPhone(subId);
3571:             if (phone != null) {
3572:                 return phone.getCdmaEriIconIndex();
3603:             final Phone phone = getPhone(subId);
3604:             if (phone != null) {
3605:                 return phone.getCdmaEriIconMode();
3634:             final Phone phone = getPhone(subId);
3635:             if (phone != null) {
3636:                 return phone.getCdmaEriText();
3655:             final Phone phone = getPhone(subId);
3656:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
3657:                 return phone.getLine1Number();
3659:                 loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
3677:             final Phone phone = getPhone(subId);
3678:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
3679:                 return phone.getCdmaMin();
3691:         if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
3693:             throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
3859:             final Phone phone = getPhone(subId);
3860:             if (phone != null) {
3861:                 phone.setVoiceActivationState(activationState);
3880:             final Phone phone = getPhone(subId);
3881:             if (phone != null) {
3882:                 phone.setDataActivationState(activationState);
3898:         final Phone phone = getPhone(subId);
3901:             if (phone != null) {
3902:                 return phone.getVoiceActivationState();
3918:         final Phone phone = getPhone(subId);
3921:             if (phone != null) {
3922:                 return phone.getDataActivationState();
3944:             final Phone phone = getPhone(subId);
3945:             if (phone != null) {
3946:                 return phone.getVoiceMessageCount();
3963:             final Phone phone = getPhone(subId);
3964:             return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
3977:         final Phone defaultPhone = getDefaultPhone();
4015:             for (Phone phone : PhoneFactory.getPhones()) {
4016:                 if (phone.isInEmergencySmsMode()) {
4027:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4054:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4091:             Phone phone = getPhone(subId);
4092:             if (phone == null) {
4097:             phone.getImsRegistrationState(regState -> {
4124:             Phone phone = getPhone(subId);
4125:             if (phone == null) {
4130:             phone.getImsRegistrationTech(regTech -> {
4149:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4175:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4225:             Phone phone = getPhone(subId);
4226:             if (phone == null) return false;
4227:             return phone.isImsCapabilityAvailable(capability, regTech);
4278:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4316:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4353:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4391:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4412:      * Requires MODIFY_PHONE_STATE permission.
4435:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4489:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4575:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
4677:         Phone phone = getPhone(subId);
4678:         if (phone == null) {
4679:             loge("phone instance null for subid " + subId);
4683:             if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
4687:             if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
5022:             final Phone phone = getPhone(subId);
5023:             if (phone != null) {
5024:                 return phone.getServiceState().getDataNetworkType();
5059:             final Phone phone = getPhone(subId);
5060:             if (phone != null) {
5061:                 return phone.getServiceState().getDataNetworkType();
5087:             final Phone phone = getPhone(subId);
5088:             if (phone != null) {
5089:                 return phone.getServiceState().getVoiceNetworkType();
5114:             final Phone phone = PhoneFactory.getPhone(slotIndex);
5115:             if (phone != null) {
5116:                 return phone.getIccCard().hasIccCard();
5131:      * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
5132:      * or {@link Phone#LTE_ON_CDMA_TRUE}
5151:             final Phone phone = getPhone(subId);
5152:             if (phone == null) {
5221:                      + portIndex + " does not correspond to an active phone");
5229:         Phone phone = getPhoneFromValidIccLogicalChannelRequest(request,
5236:         return iccOpenLogicalChannelWithPermission(phone, request);
5241:         Phone phone;
5245:             phone = getPhoneFromSubId(request.subId);
5248:             phone = getPhoneFromSlotPortIndexOrThrowException(request.slotIndex, request.portIndex);
5252:         return phone;
5255:     private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
5272:                     CMD_OPEN_CHANNEL, channelRequest, phone, null /* workSource */);
5282:         Phone phone = getPhoneFromValidIccLogicalChannelRequest(request,
5287:         return iccCloseLogicalChannelWithPermission(phone, request);
5290:     private boolean iccCloseLogicalChannelWithPermission(Phone phone,
5297:             Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, request.channel, phone,
5334:     private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
5343:                     new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
5390:     private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
5408:                     new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
5640:         Phone phone = PhoneFactory.getPhone(slotIndex);
5641:         if (phone != null) {
5643:                     mApp, phone.getSubId(), "resetModemConfig");
5666:         Phone phone = PhoneFactory.getPhone(slotIndex);
5667:         if (phone != null) {
5669:                     mApp, phone.getSubId(), "rebootModem");
5950:      * Sets the ims registration state on all valid {@link Phone}s.
5957:             // NOTE: Before S, this method only set the default phone.
5958:             for (final Phone phone : PhoneFactory.getPhones()) {
5959:                 if (SubscriptionManager.isValidSubscriptionId(phone.getSubId())) {
5960:                     phone.setImsRegistrationState(registered);
6043:             final Phone phone = getPhone(subId);
6044:             if (phone == null) {
6047:             OperatorInfo networkSelection = phone.getSavedNetworkSelection();
6049:                 ? phone.getManualNetworkSelectionPlmn() : networkSelection.getOperatorNumeric();
6106:             Phone phone = getPhone(subId);
6107:             if (phone == null) {
6137:             sendRequestAsync(CMD_GET_CALL_FORWARDING, argument, phone, null);
6158:             Phone phone = getPhone(subId);
6159:             if (phone == null) {
6172:             sendRequestAsync(CMD_SET_CALL_FORWARDING, arguments, phone, null);
6186:             Phone phone = getPhone(subId);
6187:             if (phone == null) {
6195:             CarrierConfigManager configManager = new CarrierConfigManager(phone.getContext());
6202:                 CarrierXmlParser carrierXmlParser = new CarrierXmlParser(phone.getContext(),
6222:                 sendRequestAsync(CMD_GET_CALL_WAITING, argument, phone, null);
6239:             Phone phone = getPhone(subId);
6240:             if (phone == null) {
6249:             CarrierConfigManager configManager = new CarrierConfigManager(phone.getContext());
6256:                 CarrierXmlParser carrierXmlParser = new CarrierXmlParser(phone.getContext(),
6279:                 sendRequestAsync(CMD_SET_CALL_WAITING, arguments, phone, null);
6549:         final Phone phone = getPhone(subId);
6551:             if (phone != null) {
6552:                 return phone.hasMatchedTetherApnSetting();
6582:      * Accepts either READ_BASIC_PHONE_STATE, ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE
6592:                 mApp.enforceCallingOrSelfPermission(permission.READ_BASIC_PHONE_STATE,
6607:             Phone phone = PhoneFactory.getPhone(phoneId);
6608:             if (phone != null) {
6609:                 boolean retVal = phone.isUserDataEnabled();
6613:                 if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
6639:                             android.Manifest.permission.READ_PHONE_STATE,
6643:                             permission.READ_BASIC_PHONE_STATE, functionName);
6653:             Phone phone = PhoneFactory.getPhone(phoneId);
6654:             if (phone != null) {
6656:                 if (phone.isUsingNewDataStack()) {
6657:                     retVal = phone.getDataSettingsManager().isDataEnabled();
6659:                     retVal = phone.getDataEnabledSettings().isDataEnabled();
6664:                 if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
6688:                 mApp.enforceCallingOrSelfPermission(permission.READ_BASIC_PHONE_STATE,
6693:                 mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_STATE,
6709:             Phone phone = PhoneFactory.getPhone(phoneId);
6710:             if (phone != null) {
6712:                 if (phone.isUsingNewDataStack()) {
6713:                     retVal = phone.getDataSettingsManager().isDataEnabledForReason(reason);
6716:                         retVal = phone.isUserDataEnabled();
6718:                         retVal = phone.getDataEnabledSettings().isDataEnabledForReason(reason);
6725:                     loge("isDataEnabledForReason: no phone subId="
6748:         Phone phone = getPhone(subId);
6749:         if (phone == null) {
6753:         CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
6767:         Phone phone = getPhone(subId);
6768:         if (phone == null) {
6772:         CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
6792:             Phone phone = PhoneFactory.getPhone(phoneId);
6793:             if (phone == null) {
6796:             CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
6811:         Phone phone = PhoneFactory.getPhone(phoneId);
6812:         if (phone == null) {
6815:         CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
6825:         Phone phone = PhoneFactory.getPhone(phoneId);
6826:         if (phone == null) {
6829:         CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
6855:         final Phone phone = PhoneFactory.getPhone(logicalSlotIndex);
6856:         if (phone == null) {
6859:         final CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
6867:         final Phone phone = getPhone(subId);
6868:         UiccPort port = phone == null ? null : phone.getUiccPort();
6885:             Phone phone = getPhone(subId);
6886:             if (phone != null) {
6887:                 Phone defaultPhone = phone.getImsPhone();
6888:                 if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
6908:             Phone phone = getPhone(subId);
6909:             if (phone != null) {
6910:                 Phone defaultPhone = phone.getImsPhone();
6911:                 if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
6931:             final Phone phone = getPhone(subId);
6932:             if (phone == null) {
6935:             final String subscriberId = phone.getSubscriberId();
7158:             final Phone phone = getPhone(subId);
7159:             return phone == null ? false : phone.setOperatorBrandOverride(brand);
7174:             final Phone phone = getPhone(subId);
7175:             if (phone == null) {
7178:             return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
7220:         Phone phone = PhoneFactory.getPhone(phoneId);
7224:                             mApp, phone.getSubId(), "getRadioAccessFamily");
7230:         if (phone == null) {
7237:                             mApp, phone.getSubId(), "getRadioAccessFamily");
7339:         final Phone defaultPhone = getDefaultPhone();
7353:         final Phone defaultPhone = getDefaultPhone();
7407:                     .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
7438:         final Phone phone = getPhone(subscriptionId);
7439:         if (phone == null) {
7440:             loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
7447:                     phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
7480:      * Returns the unique device ID of phone, for example, the IMEI for
7484:      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
7495:         final Phone phone = PhoneFactory.getPhone(0);
7496:         if (phone == null) {
7499:         int subId = phone.getSubId();
7507:             return phone.getDeviceId();
7520:         Phone phone = getPhone(subId);
7521:         if (phone != null) {
7522:             return phone.isImsRegistered();
7543:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7562:             Phone phone = getPhone(subscriptionId);
7563:             if (phone == null) {
7566:             return PhoneUtils.makePstnPhoneAccountHandle(phone);
7578:             Phone phone = getPhone(subId);
7579:             if (phone != null) {
7580:                 return phone.isWifiCallingEnabled();
7595:             Phone phone = getPhone(subId);
7596:             if (phone != null) {
7597:                 return phone.isVideoEnabled();
7613:             Phone phone = getPhone(subId);
7614:             if (phone != null) {
7615:                 return phone.getImsRegistrationTech();
7630:         Phone defaultPhone = getDefaultPhone();
7643:                 Phone phone = getPhone(subId);
7644:                 cleanUpAllowedNetworkTypes(phone, subId);
7676:     void cleanUpAllowedNetworkTypes(Phone phone, int subId) {
7677:         if (phone == null || !SubscriptionManager.isUsableSubscriptionId(subId)) {
7685:         phone.loadAllowedNetworksFromSubscriptionDatabase();
7686:         phone.setAllowedNetworkTypes(TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER,
7699:         final Phone phone = getPhone(subId);
7700:         if (phone == null) {
7707:                     phone.getContext().getOpPackageName(), phone.getContext().getAttributionTag());
7716:             final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
7848:         final Phone phone = getPhone(subId);
7849:         if (phone == null) {
7855:         boolean isCallingPackageDataService = phone.getDataServicePackages()
7858:             // isActiveSubId requires READ_PHONE_STATE, which we already check for above
7865:             ServiceState ss = phone.getServiceState();
7878:      * Returns the URI for the per-account voicemail ringtone set in Phone settings.
7889:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
7890:             if (phone == null) {
7891:                 phone = getDefaultPhone();
7894:             return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
7904:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
7914:         final Phone defaultPhone = getDefaultPhone();
7925:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
7926:             if (phone == null) {
7927:                 phone = defaultPhone;
7929:             VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
7936:      * Returns whether vibration is set for voicemail notification in Phone settings.
7946:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
7947:             if (phone == null) {
7948:                 phone = getDefaultPhone();
7951:             return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
7961:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
7971:         final Phone defaultPhone = getDefaultPhone();
7982:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
7983:             if (phone == null) {
7984:                 phone = defaultPhone;
7986:             VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
7993:      * Make sure either called from same process as self (phone) or IPC caller has read privilege.
7998:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
8003:      * Make sure either called from same process as self (phone) or IPC caller has send SMS
8046:         Phone phone = getPhone(subId);
8050:             if (phone == null) {
8055:                 aid = UiccController.getInstance().getUiccPort(phone.getPhoneId())
8075:         Phone phone = getPhone(subId);
8079:             if (phone == null) {
8084:                 esn = phone.getEsn();
8103:         Phone phone = getPhone(subId);
8107:             if (phone == null) {
8112:                 cdmaPrlVersion = phone.getCdmaPrlVersion();
8206:         final Phone phone = getPhone(subId);
8209:         if (phone == null) {
8214:             phone.carrierActionSetRadioEnabled(enabled);
8231:         final Phone phone = getPhone(subId);
8234:         if (phone == null) {
8235:             loge("setVoNrEnabled fails with no phone object for subId: " + subId);
8291:         final Phone phone = getPhone(subId);
8294:         if (phone == null) {
8299:             phone.carrierActionReportDefaultNetworkStatus(report);
8315:         final Phone phone = getPhone(subId);
8316:         if (phone == null) {
8321:             phone.carrierActionResetAll();
8328:      * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
8335:             writer.println("Permission Denial: can't dump Phone from pid="
8379:             Phone phone = getPhone(subId);
8380:             if (phone != null) {
8382:                     phone.carrierActionSetMeteredApnsEnabled(enabled);
8384:                     if (phone.isUsingNewDataStack()) {
8385:                         phone.getDataSettingsManager().setDataEnabled(
8388:                         phone.getDataEnabledSettings().setDataEnabled(reason, enabled);
8409:         Phone phone = getPhone(subId);
8413:             if (phone != null) {
8414:                 return phone.getClientRequestStats();
8432:             // $ adb shell cmd phone ...
8451:         Phone phone = PhoneFactory.getPhone(slotIndex);
8457:             if (phone != null) {
8458:                 phone.setSimPowerState(state, null, workSource);
8480:         Phone phone = PhoneFactory.getPhone(slotIndex);
8486:             if (phone != null) {
8488:                 sendRequestAsync(CMD_SET_SIM_POWER, arguments, phone, workSource);
8510:      * Check if phone is in emergency callback mode
8511:      * @return true if phone is in emergency callback mode
8517:         final Phone phone = getPhone(subId);
8521:             if (phone != null) {
8522:                 return phone.isInEcm();
8542:             Phone p = getPhone(subId);
8562:         Phone phone = PhoneFactory.getPhone(slotIndex);
8563:         if (phone != null) {
8564:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
8571:                 return phone.getRadioPowerState();
8584:      * {@link android.Manifest.permission#READ_BASIC_PHONE_STATE},
8585:      * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
8602:                         permission.READ_BASIC_PHONE_STATE, functionName);
8612:             Phone phone = getPhone(subId);
8613:             isEnabled =  phone != null ? phone.getDataRoamingEnabled() : false;
8625:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
8638:             Phone phone = getPhone(subId);
8639:             if (phone != null) {
8640:                 phone.setDataRoamingEnabled(isEnabled);
8656:             Phone phone = getPhone(subId);
8657:             if (phone != null) {
8658:                 isAllowed = phone.isCspPlmnEnabled();
8671:         Phone phone = PhoneFactory.getPhone(profile.getPhoneId());
8672:         if (phone == null) {
8675:         CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
8692:             // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
8810:             // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
8943:     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
8969:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
8978:             Phone phone = getPhone(subId);
8979:             if (phone == null) {
8982:             UiccPort uiccPort = phone.getUiccPort();
9019:      * not set, return {@link Phone#PREFERRED_NT_MODE}.
9027:         return Phone.PREFERRED_NT_MODE;
9037:             final Phone phone = getPhone(subId);
9038:             if (phone == null) {
9042:             CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
9047:             phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
9065:             final Phone phone = getPhone(subId);
9066:             if (phone == null) {
9070:             return phone.getCarrierIdListVersion();
9153:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
9158:             for (Phone phone: PhoneFactory.getPhones()) {
9159:                 if (phone.getEmergencyNumberTracker() != null
9160:                         && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
9162:                             phone.getSubId(),
9163:                             phone.getEmergencyNumberTracker().getEmergencyNumberList());
9174:         final Phone defaultPhone = getDefaultPhone();
9182:             for (Phone phone: PhoneFactory.getPhones()) {
9183:                 if (phone.getEmergencyNumberTracker() != null
9184:                         && phone.getEmergencyNumberTracker()
9205:             for (Phone phone : PhoneFactory.getPhones()) {
9206:                 Rlog.d(LOG_TAG, "startEmergencyCallbackMode phone type: " + phone.getPhoneType());
9207:                 if (phone != null && ((phone.getPhoneType() == PHONE_TYPE_GSM)
9208:                         || (phone.getPhoneType() == PHONE_TYPE_CDMA))) {
9209:                     GsmCdmaPhone gsmCdmaPhone = (GsmCdmaPhone) phone;
9230:             for (Phone phone: PhoneFactory.getPhones()) {
9231:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
9252:             for (Phone phone: PhoneFactory.getPhones()) {
9253:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
9272:             final Phone phone = getPhone(subId);
9273:             if (phone == null) {
9277:             return phone.getEmergencyNumberDbVersion();
9289:             for (Phone phone: PhoneFactory.getPhones()) {
9290:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
9306:             for (Phone phone: PhoneFactory.getPhones()) {
9307:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
9323:             for (Phone phone: PhoneFactory.getPhones()) {
9324:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
9337:         Phone phone = getPhone(subId);
9338:         if (phone == null) {
9344:                     .getUiccProfileForPhone(phone.getPhoneId());
9363:             Phone phone = PhoneFactory.getPhone(slotIndex);
9364:             if (phone == null) {
9367:                 return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
9380:         Phone phone = PhoneFactory.getPhone(slotIndex);
9381:         if (phone == null) return false;
9384:                 mApp, phone.getSubId(), callingPackage, callingFeatureId,
9386:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
9392:                 return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
9394:                 return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
9462:      * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
9463:      * permission, but the other way around is possible with either MODIFY_PHONE_STATE
9492:         Phone phone = getPhone(subId);
9493:         if (phone == null) {
9498:             UiccPort uiccPort = phone.getUiccPort();
9573:         Phone phone = getDefaultPhone();
9574:         if (phone == null) return -1;
9575:         HalVersion hv = phone.getHalVersion();
9605:         enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
9611:             Phone phone = getPhone(subId);
9612:             if (phone == null) return false;
9616:             if (phone.isUsingNewDataStack()) {
9617:                 isMetered = phone.getDataNetworkController().getDataConfigManager()
9619:                                 phone.getServiceState().getDataRoaming());
9620:                 isDataEnabled = phone.getDataSettingsManager().isDataEnabled(apnType);
9622:                 isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
9623:                 isDataEnabled = phone.getDataEnabledSettings().isDataEnabled(apnType);
9638:             Phone phone = getPhone(subId);
9639:             if (phone == null) return true; // By default return true.
9640:             if (phone.isUsingNewDataStack()) {
9641:                 return phone.getDataNetworkController().getDataConfigManager().isMeteredCapability(
9643:                         phone.getServiceState().getDataRoaming());
9646:             return ApnSettingUtils.isMeteredApnType(apnType, phone);
9658:             Phone phone = getPhone(subscriptionId);
9659:             if (phone == null) {
9679:             sendRequestAsync(CMD_SET_SYSTEM_SELECTION_CHANNELS, argument, phone, null);
9773:             Phone phone = getPhone(subscriptionId);
9774:             if (phone == null) return false;
9778:                     if (phone.isUsingNewDataStack()) {
9779:                         return phone.getDataSettingsManager().isDataAllowedInVoiceCall();
9781:                         return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
9784:                     if (phone.isUsingNewDataStack()) {
9785:                         return phone.getDataSettingsManager().isMmsAlwaysAllowed();
9787:                         return phone.getDataEnabledSettings().isMmsAlwaysAllowed();
9804:             Phone phone = getPhone(subscriptionId);
9805:             if (phone == null) return;
9809:                     if (phone.isUsingNewDataStack()) {
9810:                         phone.getDataSettingsManager().setAllowDataDuringVoiceCall(enabled);
9812:                         phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(enabled);
9816:                     if (phone.isUsingNewDataStack()) {
9817:                         phone.getDataSettingsManager().setAlwaysAllowMmsData(enabled);
9819:                         phone.getDataEnabledSettings().setAlwaysAllowMmsData(enabled);
9842:             for (Phone phone : PhoneFactory.getPhones()) {
9843:                 Phone defaultPhone = phone.getImsPhone();
9844:                 if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
9893:             Phone phone = getPhone(subId);
9894:             if (phone != null && phone.getIccCard() != null) {
9895:                 return phone.getIccCard().getIccLockEnabled();
9919:         Phone phone = getPhone(subId);
9920:         if (phone == null) {
9927:                     new Pair<Boolean, String>(enabled, password), phone, null);
9951:         Phone phone = getPhone(subId);
9952:         if (phone == null) {
9959:                     new Pair<String, String>(oldPassword, newPassword), phone, null);
10018:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
10021:         Phone phone = getPhone(subId);
10022:         if (phone == null) {
10023:             throw new RuntimeException("phone is not available");
10028:             return phone.getEquivalentHomePlmns();
10052:                 Manifest.permission.MODIFY_PHONE_STATE);
10092:      * @return {@code true} if phone setRadioPowerForReason was called. Otherwise, returns {@code
10098:             Phone phone = PhoneFactory.getPhone(i);
10099:             if (phone != null) {
10100:                 phone.setRadioPowerForReason(enable, Phone.RADIO_POWER_REASON_THERMAL);
10105:         // return true if successfully informed the phone object about the thermal radio power
10119:         // Ensure that radio is on. If not able to power on due to phone being unavailable, return
10159:             Log.e(LOG_TAG , "Phone state is not valid. One of the phones is in an emergency call");
10162:         for (Phone phone : PhoneFactory.getPhones()) {
10163:             if (phone.isInEmergencySmsMode() || phone.isInEcm()) {
10164:                 Log.e(LOG_TAG, "Phone state is not valid. isInEmergencySmsMode = "
10165:                     + phone.isInEmergencySmsMode() + " isInEmergencyCallbackMode = "
10166:                     + phone.isInEcm());
10237:                     // Ensure that radio is on. If not able to power on due to phone being
10257:                         Phone phone = getPhone(subId);
10258:                         if (phone == null) {
10282:                     // Turn radio off. If not able to power off due to phone being unavailable,
10406:                 permission.READ_PRIVILEGED_PHONE_STATE);
10437:                 permission.READ_PRIVILEGED_PHONE_STATE);
10468:                 permission.READ_PRIVILEGED_PHONE_STATE);
10645:                         Phone thePhone = p.getImsPhone();
10984:         if (callingUid == Process.PHONE_UID || callingUid == Process.SYSTEM_UID) {
10985:             // phone/system process do not have further restriction on request
11021:      * Gets the current phone capability.
11023:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
11025:      * It's used to evaluate possible phone config change, for example from single
11060:      * Requires carrier privileges or READ_PRIVILEGED_PHONE_STATE permission.
11070:             Phone phone = getDefaultPhone();
11071:             sendRequestAsync(CMD_GET_SLICING_CONFIG, callback, phone, null);
11085:             // The following also checks READ_PRIVILEGED_PHONE_STATE.
11093:                     Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
11094:                     Manifest.permission.READ_PRECISE_PHONE_STATE,
11150:      * com.android.phone.permission.ACCESS_LAST_KNOWN_CELL_ID, otherwise throws
11186:             Phone phone = getPhone(subId);
11187:             if (phone == null) return null;
11188:             ServiceStateTracker sst = phone.getServiceStateTracker();
11244:             Phone phone = getPhone(subId);
11245:             if (phone == null) return;
11246:             phone.setVoiceServiceStateOverride(hasService);
24: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
72: import android.telecom.PhoneAccount;
73: import android.telecom.PhoneAccountHandle;
96: import android.telephony.PhoneCapability;
97: import android.telephony.PhoneNumberRange;
158: import com.android.internal.telephony.GsmCdmaPhone;
172: import com.android.internal.telephony.PhoneConfigurationManager;
173: import com.android.internal.telephony.PhoneConstantConversions;
174: import com.android.internal.telephony.PhoneConstants;
175: import com.android.internal.telephony.PhoneFactory;
191: import com.android.internal.telephony.imsphone.ImsPhone;
192: import com.android.internal.telephony.imsphone.ImsPhoneCallTracker;
246:     private static final String LOG_TAG = "PhoneInterfaceManager";
247:     private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
369:     private static PhoneInterfaceManager sInstance;
372:     private PhoneGlobals mApp;
839:                     defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
866:                     defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
877:                     defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
887:                     defaultPhone.resetModemConfig(onCompleted);
1112:                     defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
1395:                     if (defaultPhone != null) {
1396:                         defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
1472:                     defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
1500:                     defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
1724:                     defaultPhone.rebootModem(onCompleted);
1734:                     PhoneConfigurationManager.getInstance()
1744:                         mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
1756:                     PhoneConfigurationManager.getInstance()
1873:                     defaultPhone.eraseModemConfig(onCompleted);
1881:                     request.result = defaultPhone.eraseDataInSharedPreferences();
1899:                         int phoneId = getPhoneFromRequest(request).getPhoneId();
1901:                                 .storePin(passwords.second, phoneId);
1923:                         int phoneId = getPhoneFromRequest(request).getPhoneId();
1926:                                     .storePin(enabled.second, phoneId);
1928:                             UiccController.getInstance().getPinStorage().clearPin(phoneId);
1942:                     getDefaultPhone().getContext().sendBroadcastAsUser(
2315:      * Initialize the singleton PhoneInterfaceManager instance.
2316:      * This is only done once, at startup, from PhoneApp.onCreate().
2318:     /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
2319:         synchronized (PhoneInterfaceManager.class) {
2321:                 sInstance = new PhoneInterfaceManager(app);
2332:         mCM = PhoneGlobals.getInstance().mCM;
2342:         mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
2351:         return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
2373:                 ? getDefaultPhone() : getPhone(subId);
2385:         return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
2399:         PackageManager pm = getDefaultPhone().getContext().getPackageManager();
2426:             PhoneConstants.State state = mCM.getState(subId);
2427:             if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
2486:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
2491:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
2532:         private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
2541:         UnlockSim(int phoneId, IccCard simCard) {
2542:             mPhoneId = phoneId;
2563:                                             mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
2568:                                             mResult = PhoneConstants.PIN_OPERATION_ABORTED;
2570:                                             mResult = PhoneConstants.PIN_GENERAL_FAILURE;
2573:                                         mResult = PhoneConstants.PIN_RESULT_SUCCESS;
2625:             if (mResult == PhoneConstants.PIN_RESULT_SUCCESS && pin.length() > 0) {
2786:             logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
2821:             if (defaultPhone != null) {
2822:                 defaultPhone.setRadioPower(turnOn);
3013:                 return PhoneConstantConversions.convertDataState(
3014:                         PhoneConstants.DataState.DISCONNECTED);
3086:             final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
3283:             getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
3519:         Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
3523:         Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
3527:         Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
3689:     public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
3720:             return getDefaultPhone().needsOtaServiceProvisioning();
3755:             PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
3756:             if (phoneAccountHandle == null) {
3759:             return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
3844:         SmsController smsController = PhoneFactory.getSmsController();
3979:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
3988:             defaultPhone.sendDialerSpecialCode(inputCode);
4856:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4889:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4916:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4949:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
5146:             return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
5153:                 return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
5156:                         .orElse(PhoneConstants.LTE_ON_CDMA_FALSE);
5217:         int phoneId = UiccController.getInstance().getPhoneIdFromSlotPortIndex(slotIndex,
5219:         if (phoneId == -1) {
5223:         return PhoneFactory.getPhone(phoneId);
5261:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
5397:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
6336:                     renounceFineLocationAccess, request, messenger, binder, getPhone(subId),
6605:             int phoneId = mSubscriptionController.getPhoneId(subId);
6606:             if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
6652:             int phoneId = mSubscriptionController.getPhoneId(subId);
6704:             int phoneId = mSubscriptionController.getPhoneId(subId);
6706:                 log("isDataEnabledForReason: subId=" + subId + " phoneId=" + phoneId
6782:         enforceReadPrivilegedPermission("checkCarrierPrivilegesForPackageAnyPhone");
6791:         for (int phoneId = 0; phoneId < TelephonyManager.getDefault().getPhoneCount(); phoneId++) {
6810:         enforceReadPrivilegedPermission("getCarrierPackageNamesForIntentAndPhone");
6823:     public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
6889:                     ImsPhone imsPhone = (ImsPhone) defaultPhone;
6890:                     imsPhone.setCallComposerStatus(status);
6912:                     ImsPhone imsPhone = (ImsPhone) defaultPhone;
6913:                     return imsPhone.getCallComposerStatus();
7219:     public int getRadioAccessFamily(int phoneId, String callingPackage) {
7238:             raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
7344:             ImsManager.getInstance(defaultPhone.getContext(),
7345:                     defaultPhone.getPhoneId()).setVtSetting(enable);
7354:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
7366:                     ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
7481:      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
7532:             return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
7540:             PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
7547:             return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
7631:         if (defaultPhone != null) {
7633:                     mApp, getDefaultPhone().getSubId(), "factoryReset");
7646:                 getPhone(subId).resetCarrierKeysForImsiEncryption();
7652:             cleanUpSmsRawTable(getDefaultPhone().getContext());
7659:             if (defaultPhone == null) {
7666:                 sendEraseModemConfig(defaultPhone);
7669:             sendEraseDataInSharedPreferences(defaultPhone);
7880:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
7883:      * PhoneAccount.
7886:     public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
7906:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
7909:      * PhoneAccount.
7913:             PhoneAccountHandle phoneAccountHandle, Uri uri) {
7916:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
7919:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
7938:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
7940:      * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
7943:     public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
7963:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
7966:      * specific PhoneAccount.
7970:             PhoneAccountHandle phoneAccountHandle, boolean enabled) {
7973:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
7976:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
8349:         return new TelephonyShellCommand(this, getDefaultPhone().getContext()).exec(
9023:         int phoneId = mSubscriptionController.getPhoneId(subId);
9024:         if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
9025:             return list.get(phoneId);
9178:                             mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
9196:      * Start emergency callback mode for GsmCdmaPhone for testing.
9210:                     gsmCdmaPhone.obtainMessage(
9211:                             GsmCdmaPhone.EVENT_EMERGENCY_CALLBACK_MODE_ENTER).sendToTarget();
9419:                 getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
9442:         PhoneCapability staticCapability =
9717:         SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
9743:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
9760:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
9845:                     ImsPhone imsPhone = (ImsPhone) defaultPhone;
9847:                             (ImsPhoneCallTracker) imsPhone.getCallTracker();
9849:                     Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
9850:                             + imsPhone.getMsisdn());
9988:         // *  Inherited from PhoneWindowManager  *
10086:      * Attempts to set the radio power state for all phones for thermal reason.
10089:      * PhoneInternalInterface#setRadioPowerForReason} for more details.
10212:         if (!getThermalMitigationAllowlist(getDefaultPhone().getContext())
10643:             Arrays.stream(PhoneFactory.getPhones()).forEach(
10646:                         if (thePhone != null && thePhone instanceof ImsPhone) {
10647:                             ImsPhone imsPhone = (ImsPhone) thePhone;
10648:                             CallTracker tracker = imsPhone.getCallTracker();
10728:             return getDefaultPhone().getMobileProvisioningUrl();
10743:             return EabUtil.getContactFromEab(getDefaultPhone().getContext(), contact);
10758:             return EabUtil.getCapabilityFromEab(getDefaultPhone().getContext(), contact);
10773:             return EabUtil.removeContactFromEab(subId, contacts, getDefaultPhone().getContext());
11024:      * @return the PhoneCapability which describes the data connection capability of modem.
11199:         return getDefaultPhone().isUsingNewDataStack();
578:                             getPhoneFromRequest(request).handlePinMmi((String) request.argument)
1069:                     getPhoneFromRequest(request).getAllowedNetworkTypesBitmask(onCompleted);
1099:                     getPhoneFromRequest(request).setAllowedNetworkTypes(
1126:                     getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
1138:                     getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
1148:                     getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
1263:                     getPhoneFromRequest(request).getCallWaiting(onCompleted);
1309:                     getPhoneFromRequest(request).setCallWaiting(enable, onCompleted);
1375:                     getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
1583:                     getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
1604:                     getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
1620:                     getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
1631:                     getPhoneFromRequest(request).queryCdmaSubscriptionMode(onCompleted);
1647:                     getPhoneFromRequest(request).setCdmaSubscriptionMode(
1766:                         mPhoneConfigurationManager.addToPhoneStatusCache(id,
1889:                     getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
1912:                     getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
2367:             return getPhoneFromSubId(request.subId);
2626:                 UiccController.getInstance().getPinStorage().storePin(pin, mPhoneId);
2707:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2782:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2799:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2801:                 shutdownRadioUsingPhoneId(i);
2981:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
3379:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3532:         return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
3562:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3595:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3626:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3769:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3937:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3997:                     .enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4034:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4060:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4116:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4156:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4181:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4283:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4321:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4358:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4396:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4441:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4494:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4580:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4639:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4656:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4697:         checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
4712:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4727:         checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
4740:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4755:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4769:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4851:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
4884:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
5014:                 && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
5049:         if (!TelephonyPermissions.checkCallingOrSelfReadNonDangerousPhoneStateNoThrow(
5051:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
5077:         if (!TelephonyPermissions.checkCallingOrSelfReadNonDangerousPhoneStateNoThrow(
5079:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
5172:         return mSubscriptionController.getPhoneId(getDefaultSubscription());
5316:         return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
5330:                 getPhoneFromSlotPortIndexOrThrowException(slotIndex, portIndex), channel, cla,
5369:         return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
5385:                 getPhoneFromSlotPortIndexOrThrowException(slotIndex, portIndex), callingPackage,
5470:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
5894:                 .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
6034:                     .enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
6396:                 .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
6421:         TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
6425:             return getPhoneFromSubId(subId).getAllowedNetworkTypes(reason);
6474:                 .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
6520:         if (allowedNetworkTypes == getPhoneFromSubId(subId).getAllowedNetworkTypes(reason)) {
6783:         return checkCarrierPrivilegesForPackageAnyPhoneWithPermission(pkgName);
6838:         enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
6842:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
6978:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
7005:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7028:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7223:                     .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7236:                     .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7378:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7397:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7541:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
7542:                 callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
7556:                 .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7559:                 "getPhoneAccountHandleForSubscriptionId, " + "subscriptionId: " + subscriptionId);
7805:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8405:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8605:             TelephonyPermissions.enforceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
8650:                 .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
8694:             if (checkCarrierPrivilegesForPackageAnyPhoneWithPermission(callingPackage)
8812:             if (checkCarrierPrivilegesForPackageAnyPhoneWithPermission(callingPackage)
8884:                                 port.getPhoneId(), true));
9079:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
9087:             return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
9096:                 .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
9123:                 .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
9150:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
9177:                     .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
9383:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
9418:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
9443:                 mPhoneConfigurationManager.getStaticPhoneCapability();
9483:             mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
9523:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
9530:             return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
9539:         metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
9555:                         if (SubscriptionManager.isValidPhoneId(portInfo.getLogicalSlotIndex())) {
9688:                 .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
9846:                     ImsPhoneCallTracker imsPhoneCallTracker =
9848:                     imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
10016:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
10096:         boolean isPhoneAvailable = false;
10101:                 isPhoneAvailable = true;
10107:         return isPhoneAvailable;
10271:                         } else if (isAnyPhoneInEmergencyState()) {
10649:                             if (tracker != null && tracker instanceof ImsPhoneCallTracker) {
10650:                                 ImsPhoneCallTracker imsPhoneCallTracker =
10651:                                         (ImsPhoneCallTracker) tracker;
10652:                                 imsPhoneCallTracker.setDeviceToDeviceForceEnabled(isForceEnabled);
11030:         enforceReadPrivilegedPermission("getPhoneCapability");
11033:             return mPhoneConfigurationManager.getCurrentPhoneCapability();
11065:                 .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
11087:                     .enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
11214:         return mPhoneConfigurationManager.setModemService(serviceName);
11227:                 .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
11230:         result = mPhoneConfigurationManager.getModemService();
android.googlesource.com/platform/superproject:packages/services/Telephony/src/com/android/phone/PhoneInterfaceManager.java: [ master, ]
384:         public Phone phone;
17: package com.android.phone;
198: public class PhoneInterfaceManager extends ITelephony.Stub {
1655:     private PhoneInterfaceManager(PhoneGlobals app) {
1672:     private Phone getDefaultPhone() {
1706:     private Phone getPhone(int subId) {
2347:     public String getNetworkCountryIsoForPhone(int phoneId) {
5936:     public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
5959:     public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
6417:     public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
308:     private PhoneConfigurationManager mPhoneConfigurationManager;
1686:     private Phone getPhoneFromRequest(MainThreadRequest request) {
1694:     private Phone getPhoneFromSubId(int subId) {
2125:     private void shutdownRadioUsingPhoneId(int phoneId) {
2780:     public int getActivePhoneType() {
2785:     public int getActivePhoneTypeForSlot(int slotIndex) {
3824:     private void checkModifyPhoneStatePermission(int subId, String message) {
4463:     private Phone getPhoneFromSlotIdOrThrowException(int slotIndex) {
6003:     public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
6543:     public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
6553:     public int getSubIdForPhoneAccountHandle(
6568:     public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
140: import com.android.internal.telephony.Phone;
174: import com.android.phone.settings.PickSmsSubscriptionActivity;
175: import com.android.phone.vvm.PhoneAccountHandleConverter;
176: import com.android.phone.vvm.RemoteVvmTaskManager;
177: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
178: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
383:         // In cases where subId is unavailable, the caller needs to specify the phone.
392:         MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
394:             if (phone != null) {
395:                 this.phone = phone;
423:      * A handler that processes messages on the main thread in the phone process. Since many
424:      * of the Phone calls are not thread safe this is needed to shuttle the requests from the
425:      * inbound binder threads to the main thread in the phone process.  The Binder thread
442:             final Phone defaultPhone = getDefaultPhone();
447:                     final Phone phone = getPhoneFromRequest(request);
466:                         request.result = phone != null
467:                                 ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
478:                     final Phone phone = getPhoneFromRequest(request);
479:                     request.result = phone != null ?
1266:                     request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
1280:                     request.phone.requestCellInfoUpdate(request.workSource,
1308:                     Phone phone = getPhoneFromRequest(request);
1309:                     phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
1317:                         phone = getPhoneFromRequest(request);
1318:                         request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
1340:                             .enablePhone(request.phone, enable, onCompleted);
1346:                     int phoneId = request.phone.getPhoneId();
1361:                             .getPhoneStatusFromModem(request.phone, onCompleted);
1366:                     int id = request.phone.getPhoneId();
1389:                     request.phone.setSystemSelectionChannels(args.first, onCompleted);
1569:     private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
1571:                 command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone, workSource);
1580:             int command, Object argument, Integer subId, Phone phone, WorkSource workSource) {
1586:         if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
1587:             throw new IllegalArgumentException("subId and phone cannot both be specified!");
1588:         } else if (phone != null) {
1589:             request = new MainThreadRequest(argument, phone, workSource);
1629:      * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
1633:             int command, Object argument, Phone phone, WorkSource workSource) {
1634:         MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
1673:         Phone thePhone = getPhone(getDefaultSubscription());
1687:         if (request.phone != null) {
1688:             return request.phone;
1700:         Phone phone = getPhoneFromRequest(request);
1701:         return phone == null ? null :
1702:                 UiccController.getInstance().getUiccCard(phone.getPhoneId());
1705:     // returns phone associated with the subId.
1710:     private void sendEraseModemConfig(Phone phone) {
1711:         if (phone != null) {
1713:                   mApp, phone.getSubId(), "eraseModemConfig");
1751:             // PENDING: should we just silently fail if phone is offhook or ringing?
1772:         // from the context of the phone app.
1775:         if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
1993:             final Phone phone = getPhone(getDefaultSubscription());
1994:             if (phone != null) {
1995:                 phone.updateServiceLocation(workSource);
2040:             final Phone phone = getPhone(subId);
2041:             if (phone != null) {
2042:                 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
2060:             final Phone phone = getPhone(subId);
2061:             if (phone != null) {
2062:                 phone.setRadioPower(!isRadioOnForSubscriber(subId));
2078:             final Phone phone = getPhone(subId);
2079:             if (phone == null) {
2082:             if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
2100:                 Phone phone = PhoneFactory.getPhone(i);
2101:                 if (phone != null && phone.isRadioAvailable()) return true;
2117:                 logv("Shutting down Phone " + i);
2126:         Phone phone = PhoneFactory.getPhone(phoneId);
2127:         if (phone != null && phone.isRadioAvailable()) {
2128:             phone.shutdownRadio();
2137:             final Phone defaultPhone = PhoneFactory.getDefaultPhone();
2142:                 loge("There's no default phone.");
2155:             final Phone phone = getPhone(subId);
2156:             if (phone != null) {
2157:                 phone.setRadioPower(turnOn);
2175:             final Phone phone = getPhone(subId);
2176:             if (phone != null) {
2177:                 phone.getDataEnabledSettings().setUserDataEnabled(true);
2195:             final Phone phone = getPhone(subId);
2196:             if (phone != null) {
2197:                 phone.getDataEnabledSettings().setUserDataEnabled(false);
2211:             final Phone phone = getPhone(subId);
2212:             if (phone != null) {
2213:                 return phone.isDataAllowed(ApnSetting.TYPE_DEFAULT);
2262:             Phone phone = PhoneFactory.getPhone(slotIndex);
2263:             return phone == null ? TelephonyManager.CALL_STATE_IDLE :
2264:                     PhoneConstantConversions.convertCallState(phone.getState());
2279:             final Phone phone = getPhone(subId);
2280:             if (phone != null) {
2281:                 return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
2300:             final Phone phone = getPhone(subId);
2301:             if (phone != null) {
2302:                 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
2331:                 return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
2352:             if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
2353:                 // Get default phone in this case.
2354:                 phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
2357:             Phone phone = PhoneFactory.getPhone(phoneId);
2358:             if (phone == null) return "";
2359:             ServiceStateTracker sst = phone.getServiceStateTracker();
2364:             EmergencyNumberTracker ent = phone.getEmergencyNumberTracker();
2449:         for (Phone phone : PhoneFactory.getPhones()) {
2450:             List<CellInfo> info = phone.getAllCellInfo();
2489:             for (Phone phone : PhoneFactory.getPhones()) {
2491:                         CMD_GET_ALL_CELL_INFO, null, phone, workSource);
2551:         final Phone phone = getPhoneFromSubId(subId);
2552:         if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
2554:         sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
2572:         Phone phone = PhoneFactory.getPhone(slotIndex);
2573:         if (phone == null) {
2576:         int subId = phone.getSubId();
2584:             return phone.getImei();
2592:         Phone phone = PhoneFactory.getPhone(slotIndex);
2594:         if (phone != null) {
2595:             String imei = phone.getImei();
2603:         Phone phone = PhoneFactory.getPhone(slotIndex);
2604:         if (phone == null) {
2608:         int subId = phone.getSubId();
2616:             return phone.getMeid();
2624:         Phone phone = PhoneFactory.getPhone(slotIndex);
2626:         if (phone != null) {
2627:             String meid = phone.getMeid();
2636:         Phone phone = PhoneFactory.getPhone(slotIndex);
2637:         if (phone == null) {
2640:         int subId = phone.getSubId();
2649:             return phone.getDeviceSvn();
2659:             final Phone phone = getPhone(subId);
2660:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
2670:             final Phone phone = getPhone(subId);
2671:             return phone == null ? null : phone.getCarrierName();
2681:             final Phone phone = getPhone(subId);
2682:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
2683:                     : phone.getSpecificCarrierId();
2693:             final Phone phone = getPhone(subId);
2694:             return phone == null ? null : phone.getSpecificCarrierName();
2705:         final Phone phone = PhoneFactory.getPhone(slotIndex);
2706:         if (phone == null) {
2711:             return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
2722:      * Make sure the caller has the MODIFY_PHONE_STATE permission.
2727:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
2747:      * Make sure the caller has the CALL_PHONE permission.
2752:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
2788:             final Phone phone = PhoneFactory.getPhone(slotIndex);
2789:             if (phone == null) {
2790:                 return PhoneConstants.PHONE_TYPE_NONE;
2792:                 return phone.getPhoneType();
2819:             final Phone phone = getPhone(subId);
2820:             if (phone != null) {
2821:                 return phone.getCdmaEriIconIndex();
2852:             final Phone phone = getPhone(subId);
2853:             if (phone != null) {
2854:                 return phone.getCdmaEriIconMode();
2883:             final Phone phone = getPhone(subId);
2884:             if (phone != null) {
2885:                 return phone.getCdmaEriText();
2904:             final Phone phone = getPhone(subId);
2905:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2906:                 return phone.getLine1Number();
2908:                 loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
2926:             final Phone phone = getPhone(subId);
2927:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2928:                 return phone.getCdmaMin();
2940:         if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
2942:             throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
3106:             final Phone phone = getPhone(subId);
3107:             if (phone != null) {
3108:                 phone.setVoiceActivationState(activationState);
3127:             final Phone phone = getPhone(subId);
3128:             if (phone != null) {
3129:                 phone.setDataActivationState(activationState);
3145:         final Phone phone = getPhone(subId);
3148:             if (phone != null) {
3149:                 return phone.getVoiceActivationState();
3165:         final Phone phone = getPhone(subId);
3168:             if (phone != null) {
3169:                 return phone.getDataActivationState();
3191:             final Phone phone = getPhone(subId);
3192:             if (phone != null) {
3193:                 return phone.getVoiceMessageCount();
3210:             final Phone phone = getPhone(subId);
3211:             return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
3224:         final Phone defaultPhone = getDefaultPhone();
3262:             for (Phone phone : PhoneFactory.getPhones()) {
3263:                 if (phone.isInEmergencySmsMode()) {
3274:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3301:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3339:             Phone phone = getPhone(subId);
3340:             if (phone == null) {
3345:             phone.getImsRegistrationState(regState -> {
3372:             Phone phone = getPhone(subId);
3373:             if (phone == null) {
3378:             phone.getImsRegistrationTech(regTech -> {
3397:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3423:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3474:             Phone phone = getPhone(subId);
3475:             if (phone == null) return false;
3476:             return phone.isImsCapabilityAvailable(capability, regTech);
3524:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3561:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3595:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3630:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3682:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3764:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3831:         Phone phone = getPhone(subId);
3832:         if (phone == null) {
3833:             loge("phone instance null for subid " + subId);
3837:             if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
3841:             if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
4275:             final Phone phone = getPhone(subId);
4276:             if (phone != null) {
4277:                 return phone.getServiceState().getDataNetworkType();
4309:             final Phone phone = getPhone(subId);
4310:             if (phone != null) {
4311:                 return phone.getServiceState().getDataNetworkType();
4334:             final Phone phone = getPhone(subId);
4335:             if (phone != null) {
4336:                 return phone.getServiceState().getVoiceNetworkType();
4361:             final Phone phone = PhoneFactory.getPhone(slotIndex);
4362:             if (phone != null) {
4363:                 return phone.getIccCard().hasIccCard();
4378:      * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
4379:      * or {@link Phone#LTE_ON_CDMA_TRUE}
4398:             final Phone phone = getPhone(subId);
4399:             if (phone == null) {
4467:                     + " does not correspond to an active phone");
4498:     private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
4515:                     CMD_OPEN_CHANNEL, new Pair<String, Integer>(aid, p2), phone,
4540:     private boolean iccCloseLogicalChannelWithPermission(Phone phone, int channel) {
4546:             Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, channel, phone,
4583:     private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
4592:                     new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
4639:     private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
4657:                     new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
4891:         Phone phone = PhoneFactory.getPhone(slotIndex);
4892:         if (phone != null) {
4894:                     mApp, phone.getSubId(), "resetModemConfig");
4917:         Phone phone = PhoneFactory.getPhone(slotIndex);
4918:         if (phone != null) {
4920:                     mApp, phone.getSubId(), "rebootModem");
4936:         final Phone defaultPhone = getDefaultPhone();
5268:             final Phone phone = getPhone(subId);
5269:             if (phone == null) {
5272:             OperatorInfo networkSelection = phone.getSavedNetworkSelection();
5274:                 ? phone.getManualNetworkSelectionPlmn() : networkSelection.getOperatorNumeric();
5484:         final Phone defaultPhone = getDefaultPhone();
5670:         final Phone phone = getPhone(subId);
5672:             if (phone != null) {
5673:                 return phone.hasMatchedTetherApnSetting();
5697:             Phone phone = PhoneFactory.getPhone(phoneId);
5698:             if (phone != null) {
5700:                 phone.getDataEnabledSettings().setUserDataEnabled(enable);
5702:                 loge("setUserDataEnabled: no phone found. Invalid subId=" + subId);
5720:         final Phone phone = getPhone(subId);
5722:             if (phone != null) {
5727:                 phone.setAlwaysReportSignalStrength(isEnable);
5729:                 loge("setAlwaysReportSignalStrength: no phone found for subId="
5758:      * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
5776:             Phone phone = PhoneFactory.getPhone(phoneId);
5777:             if (phone != null) {
5778:                 boolean retVal = phone.isUserDataEnabled();
5782:                 if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
5805:             Phone phone = PhoneFactory.getPhone(phoneId);
5806:             if (phone != null) {
5807:                 boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
5811:                 if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
5820:             Phone phone) {
5821:         if (uid == Process.SYSTEM_UID || uid == Process.PHONE_UID) {
5831:         PackageManager pkgMgr = phone.getContext().getPackageManager();
5836:             int subId = phone.getSubId();
5844:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5856:     private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, Phone phone,
5865:             int subId = phone.getSubId();
5873:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5883:         final Phone phone = getPhone(subId);
5884:         if (phone == null) {
5888:         UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
5896:                 phone.getContext().getPackageManager()), Binder.getCallingUid(), phone);
5902:         final Phone phone = getPhone(subId);
5903:         if (phone == null) {
5908:                 UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
5915:                         phone.getContext().getPackageManager(), uid), uid, phone);
6020:         final Phone phone = getPhone(subId);
6021:         UiccCard card = phone == null ? null : phone.getUiccCard();
6043:             final Phone phone = getPhone(subId);
6044:             if (phone == null) {
6047:             final String subscriberId = phone.getSubscriberId();
6270:             final Phone phone = getPhone(subId);
6271:             return phone == null ? false : phone.setOperatorBrandOverride(brand);
6286:             final Phone phone = getPhone(subId);
6287:             if (phone == null) {
6290:             return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
6341:         Phone phone = PhoneFactory.getPhone(phoneId);
6343:         if (phone == null) {
6350:                             mApp, phone.getSubId(), "getRadioAccessFamily");
6360:         final Phone defaultPhone = getDefaultPhone();
6374:         final Phone defaultPhone = getDefaultPhone();
6428:                     .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
6459:         final Phone phone = getPhone(subscriptionId);
6460:         if (phone == null) {
6461:             loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
6468:                     phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
6501:      * Returns the unique device ID of phone, for example, the IMEI for
6505:      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
6509:         final Phone phone = PhoneFactory.getPhone(0);
6510:         if (phone == null) {
6513:         int subId = phone.getSubId();
6521:             return phone.getDeviceId();
6534:         Phone phone = getPhone(subId);
6535:         if (phone != null) {
6536:             return phone.isImsRegistered();
6557:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
6573:             Phone phone = getPhone(subscriptionId);
6574:             if (phone == null) {
6577:             return PhoneUtils.makePstnPhoneAccountHandle(phone);
6589:             Phone phone = getPhone(subId);
6590:             if (phone != null) {
6591:                 return phone.isWifiCallingEnabled();
6606:             Phone phone = getPhone(subId);
6607:             if (phone != null) {
6608:                 return phone.isVideoEnabled();
6624:             Phone phone = getPhone(subId);
6625:             if (phone != null) {
6626:                 return phone.getImsRegistrationTech();
6684:         final Phone phone = getPhone(subId);
6685:         if (phone == null) {
6692:                     phone.getContext().getOpPackageName(), phone.getContext().getAttributionTag());
6701:             final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
6829:             final Phone phone = getPhone(subId);
6830:             if (phone == null) {
6834:             ServiceState ss = phone.getServiceState();
6847:      * Returns the URI for the per-account voicemail ringtone set in Phone settings.
6858:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6859:             if (phone == null) {
6860:                 phone = getDefaultPhone();
6863:             return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
6873:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6883:         final Phone defaultPhone = getDefaultPhone();
6894:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6895:             if (phone == null) {
6896:                 phone = defaultPhone;
6898:             VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
6905:      * Returns whether vibration is set for voicemail notification in Phone settings.
6915:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6916:             if (phone == null) {
6917:                 phone = getDefaultPhone();
6920:             return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
6930:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6940:         final Phone defaultPhone = getDefaultPhone();
6951:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6952:             if (phone == null) {
6953:                 phone = defaultPhone;
6955:             VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
6962:      * Make sure either called from same process as self (phone) or IPC caller has read privilege.
6967:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
6972:      * Make sure either called from same process as self (phone) or IPC caller has send SMS
7015:         Phone phone = getPhone(subId);
7019:             if (phone == null) {
7024:                 aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
7044:         Phone phone = getPhone(subId);
7048:             if (phone == null) {
7053:                 esn = phone.getEsn();
7072:         Phone phone = getPhone(subId);
7076:             if (phone == null) {
7081:                 cdmaPrlVersion = phone.getCdmaPrlVersion();
7175:         final Phone phone = getPhone(subId);
7178:         if (phone == null) {
7183:             phone.carrierActionSetMeteredApnsEnabled(enabled);
7200:         final Phone phone = getPhone(subId);
7203:         if (phone == null) {
7208:             phone.carrierActionSetRadioEnabled(enabled);
7228:         final Phone phone = getPhone(subId);
7231:         if (phone == null) {
7236:             phone.carrierActionReportDefaultNetworkStatus(report);
7252:         final Phone phone = getPhone(subId);
7253:         if (phone == null) {
7258:             phone.carrierActionResetAll();
7265:      * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
7272:             writer.println("Permission Denial: can't dump Phone from pid="
7303:             Phone phone = getPhone(subId);
7304:             if (phone != null) {
7305:                 phone.getDataEnabledSettings().setPolicyDataEnabled(enabled);
7324:         Phone phone = getPhone(subId);
7328:             if (phone != null) {
7329:                 return phone.getClientRequestStats();
7356:         Phone phone = PhoneFactory.getPhone(slotIndex);
7362:             if (phone != null) {
7363:                 phone.setSimPowerState(state, workSource);
7385:      * Check if phone is in emergency callback mode
7386:      * @return true if phone is in emergency callback mode
7392:         final Phone phone = getPhone(subId);
7396:             if (phone != null) {
7397:                 return phone.isInEcm();
7417:             Phone p = getPhone(subId);
7437:         Phone phone = PhoneFactory.getPhone(slotIndex);
7438:         if (phone != null) {
7439:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
7446:                 return phone.getRadioPowerState();
7459:      * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
7479:             Phone phone = getPhone(subId);
7480:             isEnabled =  phone != null ? phone.getDataRoamingEnabled() : false;
7492:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
7505:             Phone phone = getPhone(subId);
7506:             if (phone != null) {
7507:                 phone.setDataRoamingEnabled(isEnabled);
7523:             Phone phone = getPhone(subId);
7524:             if (phone != null) {
7525:                 isAllowed = phone.isCspPlmnEnabled();
7544:             // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
7681:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
7690:             Phone phone = getPhone(subId);
7691:             if (phone == null) {
7694:             UiccCard uiccCard = phone.getUiccCard();
7731:      * not set, return {@link Phone#PREFERRED_NT_MODE}.
7739:         return Phone.PREFERRED_NT_MODE;
7749:             final Phone phone = getPhone(subId);
7750:             if (phone == null) {
7754:             phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
7772:             final Phone phone = getPhone(subId);
7773:             if (phone == null) {
7777:             return phone.getCarrierIdListVersion();
7846:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7851:             for (Phone phone: PhoneFactory.getPhones()) {
7852:                 if (phone.getEmergencyNumberTracker() != null
7853:                         && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
7855:                             phone.getSubId(),
7856:                             phone.getEmergencyNumberTracker().getEmergencyNumberList());
7867:         final Phone defaultPhone = getDefaultPhone();
7875:             for (Phone phone: PhoneFactory.getPhones()) {
7876:                 if (phone.getEmergencyNumberTracker() != null
7877:                         && phone.getEmergencyNumberTracker()
7898:             for (Phone phone: PhoneFactory.getPhones()) {
7899:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7920:             for (Phone phone: PhoneFactory.getPhones()) {
7921:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7940:             final Phone phone = getPhone(subId);
7941:             if (phone == null) {
7945:             return phone.getEmergencyNumberDbVersion();
7957:             for (Phone phone: PhoneFactory.getPhones()) {
7958:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7974:             for (Phone phone: PhoneFactory.getPhones()) {
7975:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7991:             for (Phone phone: PhoneFactory.getPhones()) {
7992:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
8005:         Phone phone = getPhone(subId);
8006:         if (phone == null) {
8012:                     .getUiccProfileForPhone(phone.getPhoneId());
8031:             Phone phone = PhoneFactory.getPhone(slotIndex);
8032:             if (phone == null) {
8035:                 return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
8048:         Phone phone = PhoneFactory.getPhone(slotIndex);
8049:         if (phone == null) return false;
8052:                 mApp, phone.getSubId(), callingPackage, callingFeatureId,
8054:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
8060:                 return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
8062:                 return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
8130:      * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
8131:      * permission, but the other way around is possible with either MODIFY_PHONE_STATE
8160:         Phone phone = getPhone(subId);
8161:         if (phone == null) {
8166:             UiccCard uiccCard = phone.getUiccCard();
8236:         Phone phone = getDefaultPhone();
8237:         if (phone == null) return -1;
8238:         HalVersion hv = phone.getHalVersion();
8268:         enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
8274:             Phone phone = getPhone(subId);
8275:             if (phone == null) return false;
8277:             boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
8278:             return !isMetered || phone.getDataEnabledSettings().isDataEnabled(apnType);
8291:             Phone phone = getPhone(subId);
8292:             if (phone == null) return true; // By default return true.
8294:             return ApnSettingUtils.isMeteredApnType(apnType, phone);
8306:             Phone phone = getPhone(subscriptionId);
8307:             if (phone == null) {
8327:             sendRequestAsync(CMD_SET_SYSTEM_SELECTION_CHANNELS, argument, phone, null);
8408:             Phone phone = getPhone(subId);
8409:             if (phone == null) return false;
8411:             return phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(allow);
8424:             Phone phone = getPhone(subId);
8425:             if (phone == null) return false;
8427:             return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
8440:             Phone phone = getPhone(subId);
8441:             if (phone == null) return false;
8443:             return phone.getDataEnabledSettings().setAlwaysAllowMmsData(alwaysAllow);
8461:             for (Phone phone : PhoneFactory.getPhones()) {
8462:                 Phone defaultPhone = phone.getImsPhone();
8463:                 if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
8508:             Phone phone = getPhone(subId);
8509:             if (phone != null && phone.getIccCard() != null) {
8510:                 return phone.getIccCard().getIccLockEnabled();
8534:         Phone phone = getPhone(subId);
8535:         if (phone == null) {
8542:                     new Pair<Boolean, String>(enabled, password), phone, null);
8566:         Phone phone = getPhone(subId);
8567:         if (phone == null) {
8574:                     new Pair<String, String>(oldPassword, newPassword), phone, null);
8633:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
8636:         Phone phone = getPhone(subId);
8637:         if (phone == null) {
8638:             throw new RuntimeException("phone is not available");
8643:             return phone.getEquivalentHomePlmns();
22: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
63: import android.telecom.PhoneAccount;
64: import android.telecom.PhoneAccountHandle;
83: import android.telephony.PhoneCapability;
84: import android.telephony.PhoneNumberRange;
141: import com.android.internal.telephony.PhoneConfigurationManager;
142: import com.android.internal.telephony.PhoneConstantConversions;
143: import com.android.internal.telephony.PhoneConstants;
144: import com.android.internal.telephony.PhoneFactory;
158: import com.android.internal.telephony.imsphone.ImsPhone;
159: import com.android.internal.telephony.imsphone.ImsPhoneCallTracker;
199:     private static final String LOG_TAG = "PhoneInterfaceManager";
200:     private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
298:     private static PhoneInterfaceManager sInstance;
300:     private PhoneGlobals mApp;
697:                     defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
724:                     defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
735:                     defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
745:                     defaultPhone.resetModemConfig(onCompleted);
793:                     defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
1031:                     if (defaultPhone != null) {
1032:                         defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
1095:                     defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
1123:                     defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
1329:                     defaultPhone.rebootModem(onCompleted);
1339:                     PhoneConfigurationManager.getInstance()
1349:                         mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
1360:                     PhoneConfigurationManager.getInstance()
1448:                     defaultPhone.eraseModemConfig(onCompleted);
1494:                     getDefaultPhone().getContext().sendBroadcastAsUser(
1640:      * Initialize the singleton PhoneInterfaceManager instance.
1641:      * This is only done once, at startup, from PhoneApp.onCreate().
1643:     /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
1644:         synchronized (PhoneInterfaceManager.class) {
1646:                 sInstance = new PhoneInterfaceManager(app);
1657:         mCM = PhoneGlobals.getInstance().mCM;
1658:         mImsResolver = PhoneGlobals.getInstance().getImsResolver();
1666:         mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
1674:         return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
1696:                 ? getDefaultPhone() : getPhone(subId);
1707:         return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
1725:         PackageManager pm = getDefaultPhone().getContext().getPackageManager();
1752:             PhoneConstants.State state = mCM.getState(subId);
1753:             if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
1812:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1817:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1825:             final UnlockSim checkSimPin = new UnlockSim(getPhone(subId).getIccCard());
1838:             final UnlockSim checkSimPuk = new UnlockSim(getPhone(subId).getIccCard());
1855:         private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1885:                                             mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
1890:                                             mResult = PhoneConstants.PIN_OPERATION_ABORTED;
1892:                                             mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1895:                                         mResult = PhoneConstants.PIN_RESULT_SUCCESS;
2103:             logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
2138:             if (defaultPhone != null) {
2139:                 defaultPhone.setRadioPower(turnOn);
2283:                 return PhoneConstantConversions.convertDataState(
2284:                         PhoneConstants.DataState.DISCONNECTED);
2356:             final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
2564:             getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
2768:         Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
2772:         Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
2776:         Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
2938:     public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
2967:             return getDefaultPhone().needsOtaServiceProvisioning();
3002:             PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
3003:             if (phoneAccountHandle == null) {
3006:             return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
3091:         SmsController smsController = PhoneFactory.getSmsController();
3226:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
3235:             defaultPhone.sendDialerSpecialCode(inputCode);
3290:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3314:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3410:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3437:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3453:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3532:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3550:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3570:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3585:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3604:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3620:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3639:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3655:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3671:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3691:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3707:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3722:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3738:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3754:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3773:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3792:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3810:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3855:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3885:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3918:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3977:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4146:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4171:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4197:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4223:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4393:             return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4400:                 return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4403:                         .orElse(PhoneConstants.LTE_ON_CDMA_FALSE);
4464:         int phoneId = UiccController.getInstance().getPhoneIdFromSlotId(slotIndex);
4465:         if (phoneId == -1) {
4469:         return PhoneFactory.getPhone(phoneId);
4504:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4646:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4937:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
4944:             return defaultPhone.getPcscfAddress(apnType);
5188:             getDefaultPhone().setImsRegistrationState(registered);
5424:                     request, messenger, binder, getPhone(subId),
5485:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
5493:             return PhoneFactory.calculatePreferredNetworkType(defaultPhone.getContext(), 0);
5695:             int phoneId = mSubscriptionController.getPhoneId(subId);
5696:             if (DBG) log("setUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5774:             int phoneId = mSubscriptionController.getPhoneId(subId);
5775:             if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5803:             int phoneId = mSubscriptionController.getPhoneId(subId);
5804:             if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5924:         int phoneId = SubscriptionManager.getPhoneId(subId);
5925:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5932:             getPhone(phoneId), pkgName);
5949:                 getPhone(i), pkgName);
5960:         if (!SubscriptionManager.isValidPhoneId(phoneId)) {
5961:             loge("phoneId " + phoneId + " is not valid.");
5964:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5966:             loge("getCarrierPackageNamesForIntentAndPhone: No UICC");
5973:     public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
5977:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
6340:     public int getRadioAccessFamily(int phoneId, String callingPackage) {
6351:             raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
6365:             ImsManager.getInstance(defaultPhone.getContext(),
6366:                     defaultPhone.getPhoneId()).setVtSetting(enable);
6375:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
6387:                     ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
6502:      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
6546:             return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
6554:             PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
6561:             return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
6657:             cleanUpSmsRawTable(getDefaultPhone().getContext());
6668:               sendEraseModemConfig(getDefaultPhone());
6849:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6852:      * PhoneAccount.
6855:     public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
6875:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6878:      * PhoneAccount.
6882:             PhoneAccountHandle phoneAccountHandle, Uri uri) {
6885:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6888:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
6907:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6909:      * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
6912:     public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
6932:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6935:      * specific PhoneAccount.
6939:             PhoneAccountHandle phoneAccountHandle, boolean enabled) {
6942:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6945:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
7286:         return new TelephonyShellCommand(this, getDefaultPhone().getContext()).exec(
7546:             if (checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
7735:         int phoneId = mSubscriptionController.getPhoneId(subId);
7736:         if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
7737:             return list.get(phoneId);
7871:                             mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
8087:                 getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
8110:         PhoneCapability staticCapability =
8216:             int phoneCount = TelephonyManager.getDefault().getPhoneCount();
8218:             int[] logicalSlotsMapping = new int[phoneCount];
8351:         SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
8377:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8394:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8464:                     ImsPhone imsPhone = (ImsPhone) defaultPhone;
8466:                             (ImsPhoneCallTracker) imsPhone.getCallTracker();
8468:                     Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
8469:                             + imsPhone.getMsisdn());
8603:         // *  Inherited from PhoneWindowManager  *
130: import com.android.internal.telephony.DefaultPhoneNotifier;
480:                             getPhoneFromRequest(request).handlePinMmi((String) request.argument)
755:                     getPhoneFromRequest(request).getPreferredNetworkType(onCompleted);
783:                     getPhoneFromRequest(request).setPreferredNetworkType(networkType, onCompleted);
807:                     getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
819:                     getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
829:                     getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
836:                     getPhoneFromRequest(request).getCallForwardingOption(
893:                     getPhoneFromRequest(request).setCallForwardingOption(
915:                     getPhoneFromRequest(request).getCallWaiting(onCompleted);
959:                     getPhoneFromRequest(request).setCallWaiting(isEnable, onCompleted);
1011:                     getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
1206:                     getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
1227:                     getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
1243:                     getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
1255:                     getPhoneFromRequest(request).setCdmaSubscription(subscriptionMode, onCompleted);
1370:                         mPhoneConfigurationManager.addToPhoneStatusCache(id,
1458:                     getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
1476:                     getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
1690:             return getPhoneFromSubId(request.subId);
2024:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2099:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2116:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2118:                 shutdownRadioUsingPhoneId(i);
2641:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2781:         return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
2811:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2844:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2875:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3016:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3184:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3244:                     .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3281:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3307:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3364:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3404:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3429:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3529:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3566:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3600:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3635:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3687:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3769:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3851:         checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
3915:         checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
4267:                 && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
4301:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4326:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4419:         return mSubscriptionController.getPhoneId(getDefaultSubscription());
4481:         return iccOpenLogicalChannelWithPermission(getPhoneFromSubId(subId), callingPackage, aid,
4494:         return iccOpenLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4529:         return iccCloseLogicalChannelWithPermission(getPhoneFromSubId(subId), channel);
4536:         return iccCloseLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4565:         return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
4579:                 getPhoneFromSlotIdOrThrowException(slotIndex), channel, cla, command, p1, p2, p3,
4618:         return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
4634:                 getPhoneFromSlotIdOrThrowException(slotIndex), callingPackage, cla, command, p1,
4719:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4757:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
5131:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5259:                     .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
5508:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5557:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5602:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5606:             return getPhoneFromSubId(subId).getAllowedNetworkTypes(reason);
5623:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5627:             return getPhoneFromSubId(subId).getEffectiveAllowedNetworkTypes();
5649:             getPhoneFromSubId(subId).setAllowedNetworkTypes(reason, allowedNetworkTypes);
5940:         for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
6004:         enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
6010:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
6090:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
6117:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6140:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6349:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
6399:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6418:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6555:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
6556:                 callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
6569:         enforceReadPrivilegedPermission("getPhoneAccountHandleForSubscriptionId, "
6793:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7320:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7472:             TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
7517:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7645:                         slot.getPhoneId(),
7786:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7794:             return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
7803:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7843:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7870:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
8051:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8086:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
8111:                 mPhoneConfigurationManager.getStaticPhoneCapability();
8151:             mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
8191:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8198:             return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
8207:         metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
8221:                 if (SubscriptionManager.isValidPhoneId(slotInfos[i].getLogicalSlotIdx())) {
8337:                 SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
8465:                     ImsPhoneCallTracker imsPhoneCallTracker =
8467:                     imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
8631:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
android.googlesource.com/platform/frameworks/opt/telephony:src/java/com/android/internal/telephony/Phone.java: [ master, ]
138: public abstract class Phone extends Handler implements PhoneInternalInterface {
545:     protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
562:     protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
358:     protected Phone mImsPhone = null;
645:     public void createImsPhone() {
3931:     public Phone getImsPhone() {
3936:     public void setImsPhone(ImsPhone imsPhone) {
4590:     public Phone getDefaultPhone() {
217:     protected static final int EVENT_UPDATE_PHONE_OBJECT            = 42;
322:     protected boolean mIsPhoneInEcmState = false;
355:     protected int mPhoneId;
485:     public String getPhoneName() {
489:     protected void setPhoneName(String name) {
1858:     public void updatePhoneObject(int voiceRadioTech) {
3028:     public abstract int getPhoneType();
4069:     public int getPhoneId() {
128:  * A base implementation for the com.android.internal.telephony.Phone interface.
130:  * Note that implementations of Phone.java are expected to be used
139:     private static final String LOG_TAG = "Phone";
269:      * This method is invoked when the Phone exits Emergency Callback Mode.
320:     // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and
480:      * Returns a string identifier for this phone interface for parties
481:      *  outside the phone app process.
536:      * Constructs a Phone in normal (non-unit test) mode.
547:         this(name, notifier, context, ci, unitTestMode, SubscriptionManager.DEFAULT_PHONE_INDEX,
552:      * Constructs a Phone in normal (non-unit test) mode.
560:      * @param phoneId the phone-id of this phone.
588:         * (i.e. voice) phone calls over the telephony network, and is allowed
619:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
634:         if (getPhoneType() != PhoneConstants.PHONE_TYPE_SIP) {
646:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_SIP) {
650:         synchronized(Phone.lockForRadioTechnologyChange) {
713:         // messages to be handled whether or not the phone is being destroyed
715:         // resources of the phone being destroyed
767:                         // redial happened over that Phone so that it can be replaced with the
844:         Phone imsPhone = mImsPhone;
883:      * Gets the context for the phone, as set at initialization time.
939:      * Subclasses of Phone probably want to replace this with a
965:      * Subclasses of Phone probably want to replace this with a
989:      * Subclasses of Phone probably want to replace this with a
1001:      * Notify the phone that an SMS has been sent. This will be used determine if the SMS was sent
1015:      * Determine if the Phone has recently sent an emergency SMS and is still in the interval of
1056:     protected void migrateFrom(Phone from) {
1069:         // The emergency state of IMS phone will be cleared in ImsPhone#notifySrvccState after
1132:      *   Connection.getCall() == Phone.getRingingCall()
1152:      * Notifies when phone's video capabilities changes <p>
1157:      *  AsyncResult.result = true if phone supports video calling <p>
1296:      * Example: If Phone.dial is called with "*#31#", then the app will
1619:      * For unit tests; don't send notifications to "Phone"
1636:      * Subclasses of Phone probably want to replace this with a
1741:         // no need for regular phone
1745:      * Subclasses of Phone probably want to replace this with a
1757:      * we send out a final ServiceState update when a phone's subId becomes invalid.
1767:      * If this is a simulated phone interface, returns a SimulatedRadioControl.
1781:      * the thread that originally obtained this Phone instance.
1786:                     "com.android.internal.telephony.Phone must be used from within one thread");
1818:      * If the phone has an active call and call waiting occurs,
1819:      * then the phone state is RINGING not OFFHOOK
1828:      * Retrieves the IccFileHandler of the Phone instance
1847:      * Retrieves the Handler of the Phone instance
1854:      * Update the phone object if the voice radio technology has changed
1862:     * Retrieves the ServiceStateTracker of the phone instance.
1886:                 .contains(Phone.RADIO_POWER_REASON_THERMAL);
1890:      * Retrieves the EmergencyNumberTracker of the phone instance.
1919:      * Retrieves the DeviceStateMonitor of the phone instance.
1926:      * Retrieves the DisplayInfoController of the phone instance.
1933:      * Retrieves the SignalStrengthController of the phone instance.
1982:      * Returns the ICC card interface for this phone, or null
1988:         //throw new Exception("getIccCard Shouldn't be called from Phone");
2175:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2593:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
2594:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
2595:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
2596:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
2607:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
2608:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
2609:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
2610:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
2928:     // This property is used to handle phone process crashes, and is the same for CDMA and IMS
2935:      * @return {@code true} if we are in emergency call back mode. This is a period where the phone
2948:         return getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA && isInEcm()
2960:      * @return true if this Phone is in an emergency call that caused emergency callback mode to be
2968:      * Set whether or not this Phone has an active emergency call that was placed during emergency
3024:      * Return a numerical identifier for the phone radio interface.
3025:      * @return PHONE_TYPE_XXX as defined above.
3038:     /** sets the voice mail count of the phone and notifies listeners. */
3664:         // Populate the iccid, imei and phone number in the provisioning url.
3673:                     phoneNumber /* Phone number */);
3760:      * Subclasses of Phone probably want to replace this with a
3778:      * Notify registrants if phone is video capable.
3892:         Rlog.e(LOG_TAG, "Error! This function should never be executed, inactive Phone.");
3905:      * Gets the Uicc card corresponding to this phone.
3906:      * @return the UiccCard object corresponding to the phone ID.
3914:      * Gets the Uicc port corresponding to this phone.
3915:      * @return the UiccPort object corresponding to the phone ID.
3928:      * Return an instance of a IMS phone
4066:      * Returns the phone id.
4139:         Phone imsPhone = mImsPhone;
4158:         Phone imsPhone = mImsPhone;
4172:         Phone imsPhone = mImsPhone;
4196:         Phone imsPhone = mImsPhone;
4206:      * @return the IMS MmTel Registration technology for this Phone, defined in
4210:         Phone imsPhone = mImsPhone;
4220:      * Get the IMS MmTel Registration technology for this Phone, defined in
4224:         Phone imsPhone = mImsPhone;
4233:      * Asynchronously get the IMS MmTel Registration state for this Phone.
4236:         Phone imsPhone = mImsPhone;
4295:      *  Set phone radio capability
4297:      *  @param rc the phone radio capability defined in
4306:      *  Get phone radio access family
4326:      *  Get phone radio capability
4340:      *  @param rc the phone radio capability currently in effect for this phone.
4355:         // When radio capability switch is done, query IMEI value and update it in Phone objects
4374:      * Registers the handler when phone radio  capability is changed.
4385:      * Unregister for notifications when phone radio type and access technology is changed.
4406:      * Determines if video calling is enabled for the phone.
4412:         Phone imsPhone = mImsPhone;
4545:     public static void checkWfcWifiOnlyModeBeforeDial(Phone imsPhone, int phoneId, Context context)
4585:      * This function returns the parent phone of the current phone. It is applicable
4586:      * only for IMS phone (function is overridden by ImsPhone). For others the phone
4639:      * none of the phone is in service, and one of them has the capability to make the emergency
4646:         for (Phone phone : PhoneFactory.getPhones()) {
4647:             if (phone != null) {
4648:                 ServiceStateTracker sst = phone.getServiceStateTracker();
4711:     /** Returns the {@link VoiceCallSessionStats} for this phone ID. */
4716:     /** Sets the {@link VoiceCallSessionStats} mock for this phone ID during unit testing. */
4722:     /** Returns the {@link SmsStats} for this phone ID. */
4727:     /** Sets the {@link SmsStats} mock for this phone ID during unit testing. */
4806:      * Returns the InboundSmsHandler object for this phone
4849:         pw.println("Phone: subId=" + getSubId());
5046:         pw.println("Phone Local Log: ");
52: import android.telephony.PhoneStateListener;
87: import com.android.internal.telephony.imsphone.ImsPhone;
88: import com.android.internal.telephony.imsphone.ImsPhoneCall;
132:  * originally called PhoneFactory to obtain the interface.
447:      * PhoneNotifier is an abstraction for all system-wide
452:     protected PhoneNotifier mNotifier;
494:      * Retrieves Nai for phones. Returns null if Nai is not set.
563:                     boolean unitTestMode, int phoneId,
565:         mPhoneId = phoneId;
602:          * By default old phones won't have the property set but do generate
642:      * Start setup of ImsPhone, which will start trying to connect to the ImsResolver. Will not be
651:             if (mImsPhone == null) {
652:                 mImsPhone = PhoneFactory.makeImsPhone(mNotifier, this);
653:                 CallManager.getInstance().registerPhone(mImsPhone);
654:                 mImsPhone.registerForSilentRedial(
729:                     PhoneConstants.State state = getState();
731:                             && ((state == PhoneConstants.State.RINGING) ||
732:                                     (state == PhoneConstants.State.IDLE))) {
743:                 if (getState() == PhoneConstants.State.RINGING) {
753:                 // This is an ImsPhone -> GsmCdmaPhone redial
754:                 // See ImsPhone#initiateSilentRedial
765:                         // The ImsPhoneConnection that is owned by the ImsPhone is currently the
770:                         if (mImsPhone != null) {
772:                             mImsPhone.notifyRedialConnectionChanged(cn);
776:                         if (mImsPhone != null) {
777:                             mImsPhone.notifyRedialConnectionChanged(null);
851:                     if (imsPhone != null) {
852:                         conn = imsPhone.getHandoverConnection();
853:                         migrateFrom(imsPhone);
855:                         Rlog.d(LOG_TAG, "HANDOVER_STARTED: mImsPhone null");
860:                     if (imsPhone != null) {
861:                         imsPhone.notifySrvccState(srvccState);
863:                         Rlog.d(LOG_TAG, "HANDOVER_COMPLETED: mImsPhone null");
916:      * {@link PhoneConstants.State} which can be obtained using the {@link PhoneStateListener}
1086:             // Since CallManager has already registered with both CS and IMS phones,
1825:     public abstract PhoneConstants.State getState();
2058:      * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged
2059:      * PhoneStateListener.onCellInfoChanged} will be invoked.
2074:      * available on this interface. Use PhoneStateNotifier or similar instead.
2170:      * available on this interface. Use PhoneStateNotifier or similar instead.
2221:      * interface. Use <code>PhoneStateNotifier</code> or an equivalent.
2845:     public PhoneConstants.DataState getDataConnectionState(String apnType) {
2846:         return PhoneConstants.DataState.DISCONNECTED;
2929:     // phones
2949:                 && (mImsPhone == null || !mImsPhone.isInImsEcm());
3014:         if (mImsPhone != null) {
3015:             isPresent = isVideoCallOrConference(mImsPhone.getForegroundCall()) ||
3016:                     isVideoCallOrConference(mImsPhone.getBackgroundCall()) ||
3017:                     isVideoCallOrConference(mImsPhone.getRingingCall());
3159:      * Retrieves the MIN for CDMA phones.
3175:      *  Retrieves PRL Version for CDMA phones
3666:             String phoneNumber = getLine1Number();
3667:             if (TextUtils.isEmpty(phoneNumber)) {
3668:                 phoneNumber = "0000000000";
3854:      * Retrieves the MSISDN from the UICC. For GSM/UMTS phones, this is equivalent to
3855:      * {@link #getLine1Number()}. For CDMA phones, {@link #getLine1Number()} returns
3856:      * the MDN, so this method is provided to return the MSISDN on CDMA/LTE phones.
3864:      * Retrieves the EF_PNN from the UICC For GSM/UMTS phones.
3873:      * {@link android.telephony.PhoneStateListener} instead.
3876:     public PhoneConstants.DataState getDataConnectionState() {
3891:         // This function should be overridden by class GsmCdmaPhone.
3932:         return mImsPhone;
3937:         mImsPhone = imsPhone;
4013:      * Return if UT capability of ImsPhone is enabled or not
4017:         if (mImsPhone != null) {
4018:             return mImsPhone.isUtEnabled();
4037:         // dialInternal shall be overriden by GsmCdmaPhone
4042:      * This function is for CSFB SS. GsmCdmaPhone overrides this function.
4141:         if (imsPhone != null) {
4142:             isImsRegistered = imsPhone.isImsRegistered();
4160:         if (imsPhone != null) {
4161:             isWifiCallingEnabled = imsPhone.isWifiCallingEnabled();
4174:         if (imsPhone != null) {
4175:             isAvailable = imsPhone.isImsCapabilityAvailable(capability, regTech);
4198:         if (imsPhone != null) {
4199:             isVolteEnabled = imsPhone.isVoiceOverCellularImsEnabled();
4212:         if (imsPhone != null) {
4213:             regTech = imsPhone.getImsRegistrationTech();
4225:         if (imsPhone != null) {
4226:             imsPhone.getImsRegistrationTech(callback);
4237:         if (imsPhone != null) {
4238:             imsPhone.getImsRegistrationState(callback);
4398:         if (mImsPhone == null) {
4402:         return mImsPhone.isImsAvailable();
4413:         if (imsPhone != null) {
4414:             return imsPhone.isVideoEnabled();
4547:         if (imsPhone == null || !imsPhone.isWifiCallingEnabled()) {
4548:             ImsManager imsManager = ImsManager.getInstance(context, phoneId);
4888:         if (mImsPhone != null) {
4890:                 mImsPhone.dump(fd, pw, args);
448:      * state change notification. DefaultPhoneNotifier is
538:      * @param notifier An instance of DefaultPhoneNotifier,
554:      * @param notifier An instance of DefaultPhoneNotifier,
2810:         // This function is added to send the notification to DefaultPhoneNotifier.
2940:         return mIsPhoneInEcmState;
2956:         mIsPhoneInEcmState = isInEcm;
3000:         if (call instanceof ImsPhoneCall) {
3001:             ImsPhoneCall imsPhoneCall = (ImsPhoneCall) call;
3002:             ImsCall imsCall = imsPhoneCall.getImsCall();
3056:                 mPhoneId, UiccController.APP_FAM_3GPP);
3830:      * A fucntion of type getPhoneProp(propType) where propType is an
3910:         return mUiccController.getUiccCard(mPhoneId);
3918:         return mUiccController.getUiccPort(mPhoneId);
4062:         return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
4070:         return mPhoneId;
4850:         pw.println(" mPhoneId=" + mPhoneId);
4877:         pw.println(" getPhoneName()=" + getPhoneName());
4878:         pw.println(" getPhoneType()=" + getPhoneType());
5059:         Rlog.d(LOG_TAG, "[" + mPhoneId + "] " + s);
5063:         Rlog.i(LOG_TAG, "[" + mPhoneId + "] " + s);
5067:         Rlog.e(LOG_TAG, "[" + mPhoneId + "] " + s);
github.com/apache/dubbo-samples:dubbo-samples-compatible/src/main/java/org/apache/dubbo/samples/basic/api/Phone.java: [ master, ]
23: public class Phone implements Serializable {
46:         return "Phone{" +
github.com/apache/openjpa:openjpa-examples/simple/src/main/java/embeddables/Phone.java: [ trunk, ]
25: public class Phone {
26:     public Phone() {
30:     public Phone(String n, String t) {
android.googlesource.com/platform/external/guice:examples/src/example/xml/Phone.java: [ master, ]
3: public class Phone {
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/apache/dolphinscheduler:dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_postgresql.sql: [ dev, ]
831:   phone varchar(11) DEFAULT NULL ,
979: INSERT INTO t_ds_user(user_name, user_password, user_type, email, phone, tenant_id, state, create_time, update_time, time_zone)
github.com/google/closure-compiler:contrib/externs/maps/google_maps_api_v3_49.js: [ master, ]
8297: google.maps.TransitAgency.prototype.phone;
11805: google.maps.places.FindPlaceFromPhoneNumberRequest.prototype.phoneNumber;
5627:   PLACES_FIND_PLACE_FROM_PHONE_NUMBER: 'PLACES_FIND_PLACE_FROM_PHONE_NUMBER',
12207: google.maps.places.PlaceResult.prototype.formatted_phone_number;
12249: google.maps.places.PlaceResult.prototype.international_phone_number;
11768: google.maps.places.FindPlaceFromPhoneNumberRequest = function() {};
11780: google.maps.places.FindPlaceFromPhoneNumberRequest.prototype.fields;
12599: google.maps.places.PlacesService.prototype.findPlaceFromPhoneNumber = function(
8294:  * The transit agency&#39;s phone number.
11801:  * The phone number of the place to look up. Format must be <a
12201:  * The Place’s phone number, formatted according to the <a
12244:  * The Place’s phone number in international format. International format
12586:  * Retrieves a list of places based on a phone number. In most cases there
12202:  * href="http://en.wikipedia.org/wiki/Local_conventions_for_writing_telephone_numbers">
5625:    * Identifies the findPlaceFromPhoneNumber API within the Places API.
11765:  * google.maps.places.PlacesService.findPlaceFromPhoneNumber}.
11791: google.maps.places.FindPlaceFromPhoneNumberRequest.prototype.language;
11798: google.maps.places.FindPlaceFromPhoneNumberRequest.prototype.locationBias;
12594:  * @param {!google.maps.places.FindPlaceFromPhoneNumberRequest} request
github.com/apache/dolphinscheduler:dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_h2.sql: [ dev, ]
939:     phone         varchar(11) DEFAULT NULL,
github.com/apache/incubator-shenyu:db/init/pg/create-table.sql: [ master, ]
59:   "phone" varchar(255) COLLATE "pg_catalog"."default",
71: COMMENT ON COLUMN "public"."app_auth"."phone" IS 'phone number when the user applies';
github.com/google/closure-compiler:contrib/externs/maps/google_maps_api_v3_exp.js: [ master, ] Duplicate result
github.com/apache/incubator-shenyu:db/init/oracle/schema.sql: [ master, ]
323:     phone        VARCHAR2(255),
340: comment on column APP_AUTH.phone
341:   is 'phone number when the user applies';
github.com/google/end-to-end:lib/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/end-to-end:lib/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/google/earthenterprise:earth_enterprise/src/common/packet.h: [ master, ]
1005:   std::uint32_t phone;
1049:   char * phone;
1062:   char * phone;
1044:   std::uint32_t phone_OFFSET;
1083:     phone_OFFSET = reinterpret_cast<std::uint64_t>(phone);
1100:     num = phone_OFFSET;
1101:     phone = reinterpret_cast<char *>(num);
github.com/apache/netbeans:ide/html.parser/src/org/netbeans/modules/html/parser/model/NamedCharacterReference.java: [ master, ]
1559:     phone("phone", 0x0260E),
github.com/googlearchive/caja:src/com/google/caja/apitaming/google.maps.policyFactory.js: [ master, ]
4271: google.maps.TransitAgency.prototype.phone = 1;
5201: google.maps.places.PlaceResult.prototype.formatted_phone_number = 1;
5226: google.maps.places.PlaceResult.prototype.international_phone_number = 1;
github.com/apache/ofbiz:applications/content/dtd/docbook.dtd: [ trunk, ]
744: <!ELEMENT phone (#PCDATA|inlinemediaobject|remark|superscript|subscript|xref|link|olink|anchor|biblioref|alt|annota...(36 bytes skipped)...
669: ...(101 bytes skipped)...ioref|alt|annotation|indexterm|phrase|replaceable|personname|pob|street|city|state|postcode|country|phone|fax|email|uri|otheraddr)*>
746: <!ATTLIST phone
github.com/googleapis/google-api-ruby-client:google-api-client/generated/google/apis/dfareporting_v3_4/classes.rb: [ master, ]
11544:         attr_accessor :phone
11541:         # Primary phone number of this site contact.
11542:         # Corresponds to the JSON property `phone`
11563:           @phone = args[:phone] if args.key?(:phone)
github.com/google/gopacket:layers/lldp.go: [ master, ]
167: 	Phone       bool
152: 	LLDPCapsPhone       uint16 = 1 << 5
573: 	LLDPappTypeSoftphoneVoice      LLDPApplicationType = 5
1224: 	c.Phone = (v&LLDPCapsPhone > 0)
1510: 		s = "Softphone Voice"
1509: 	case LLDPappTypeSoftphoneVoice:
github.com/PolymerElements/app-layout:demo/contacts.json: [ master, ]
21:     "phone": "(817) 426-2901",
43:     "phone": "(901) 441-2582",
65:     "phone": "(956) 428-2996",
87:     "phone": "(823) 415-2224",
109:     "phone": "(814) 488-2063",
131:     "phone": "(887) 497-3612",
153:     "phone": "(957) 412-3261",
175:     "phone": "(946) 404-2511",
197:     "phone": "(910) 533-3832",
219:     "phone": "(876) 584-3746",
241:     "phone": "(842) 503-2389",
263:     "phone": "(914) 461-3510",
285:     "phone": "(800) 559-2165",
307:     "phone": "(988) 478-3842",
329:     "phone": "(882) 531-2818",
351:     "phone": "(996) 557-3624",
373:     "phone": "(923) 461-2312",
395:     "phone": "(964) 543-3486",
417:     "phone": "(946) 414-3492",
439:     "phone": "(802) 539-3360",
461:     "phone": "(818) 424-2348",
483:     "phone": "(810) 406-3416",
505:     "phone": "(975) 451-3272",
527:     "phone": "(961) 443-3343",
549:     "phone": "(839) 591-3993",
571:     "phone": "(852) 538-3232",
593:     "phone": "(967) 410-2522",
615:     "phone": "(812) 540-2032",
637:     "phone": "(902) 544-3976",
659:     "phone": "(812) 545-2648",
681:     "phone": "(937) 481-3812",
703:     "phone": "(807) 556-3727",
725:     "phone": "(968) 546-3854",
747:     "phone": "(816) 465-3014",
769:     "phone": "(810) 510-3744",
791:     "phone": "(982) 438-3850",
813:     "phone": "(887) 500-3974",
835:     "phone": "(897) 481-2359",
857:     "phone": "(867) 520-2422",
879:     "phone": "(968) 541-2220",
901:     "phone": "(822) 493-3031",
923:     "phone": "(821) 517-2066",
945:     "phone": "(875) 561-3839",
967:     "phone": "(980) 527-2867",
989:     "phone": "(893) 423-2241",
1011:     "phone": "(916) 568-2718",
1033:     "phone": "(865) 596-2021",
1055:     "phone": "(829) 562-3502",
1077:     "phone": "(852) 558-3074",
1099:     "phone": "(891) 598-2904",
1121:     "phone": "(908) 488-3939",
1143:     "phone": "(828) 500-2593",
1165:     "phone": "(869) 544-3589",
1187:     "phone": "(808) 507-2955",
1209:     "phone": "(896) 543-3314",
1231:     "phone": "(852) 477-2611",
1253:     "phone": "(812) 415-2585",
1275:     "phone": "(890) 442-3503",
1297:     "phone": "(895) 528-2574",
1319:     "phone": "(944) 564-2803",
1341:     "phone": "(963) 428-3124",
1363:     "phone": "(947) 456-2663",
1385:     "phone": "(811) 480-2342",
1407:     "phone": "(838) 400-3578",
1429:     "phone": "(895) 420-2620",
1451:     "phone": "(857) 415-3707",
1473:     "phone": "(935) 548-2580",
1495:     "phone": "(905) 466-2231",
1517:     "phone": "(898) 517-3041",
1539:     "phone": "(867) 474-2146",
1561:     "phone": "(851) 582-2204",
1583:     "phone": "(819) 482-2099",
1605:     "phone": "(930) 570-3544",
1627:     "phone": "(959) 575-3680",
1649:     "phone": "(816) 520-2774",