android.googlesource.com/platform/packages/services/Telephony:src/com/android/phone/PhoneInterfaceManager.java: [ master, ] |
---|
411: public Phone phone;
|
17: package com.android.phone;
|
211: public class PhoneInterfaceManager extends ITelephony.Stub {
|
1953: private PhoneInterfaceManager(PhoneGlobals app) {
|
1970: private Phone getDefaultPhone() {
|
2004: private Phone getPhone(int subId) {
|
2647: public String getNetworkCountryIsoForPhone(int phoneId) {
|
6433: public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
|
6456: public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
|
6963: public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
|
333: private PhoneConfigurationManager mPhoneConfigurationManager;
|
1984: private Phone getPhoneFromRequest(MainThreadRequest request) {
|
1992: private Phone getPhoneFromSubId(int subId) {
|
2423: private void shutdownRadioUsingPhoneId(int phoneId) {
|
3063: public int getActivePhoneType() {
|
3068: public int getActivePhoneTypeForSlot(int slotIndex) {
|
4109: private void checkModifyPhoneStatePermission(int subId, String message) {
|
4748: private Phone getPhoneFromSlotIdOrThrowException(int slotIndex) {
|
6500: public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
|
7089: public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
|
7099: public int getSubIdForPhoneAccountHandle(
|
7114: public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
|
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
|
150: import com.android.internal.telephony.Phone;
|
185: import com.android.phone.settings.PickSmsSubscriptionActivity;
|
186: import com.android.phone.vvm.PhoneAccountHandleConverter;
|
187: import com.android.phone.vvm.RemoteVvmTaskManager;
|
188: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
|
189: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
|
410: // In cases where subId is unavailable, the caller needs to specify the phone.
|
419: MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
|
421: if (phone != null) {
|
422: this.phone = phone;
|
450: * A handler that processes messages on the main thread in the phone process. Since many
|
451: * of the Phone calls are not thread safe this is needed to shuttle the requests from the
|
452: * inbound binder threads to the main thread in the phone process. The Binder thread
|
469: final Phone defaultPhone = getDefaultPhone();
|
474: final Phone phone = getPhoneFromRequest(request);
|
493: request.result = phone != null
|
494: ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
|
505: final Phone phone = getPhoneFromRequest(request);
|
506: request.result = phone != null ?
|
783: Phone phone = getPhoneFromRequest(request);
|
784: if (phone != null) {
|
785: phone.isNrDualConnectivityEnabled(onCompleted, request.workSource);
|
787: loge("isNRDualConnectivityEnabled: No phone object");
|
822: Phone phone = getPhoneFromRequest(request);
|
823: if (phone != null) {
|
824: phone.setNrDualConnectivityState((int) request.argument, onCompleted,
|
827: loge("enableNrDualConnectivity: No phone object");
|
950: request.phone.getCallForwardingOption(callForwardingReason, onCompleted);
|
1012: request.phone.setCallForwardingOption(
|
1437: request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
|
1451: request.phone.requestCellInfoUpdate(request.workSource,
|
1479: Phone phone = getPhoneFromRequest(request);
|
1480: phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
|
1489: Phone phone = getPhoneFromRequest(request);
|
1490: request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
|
1513: .enablePhone(request.phone, enable, onCompleted);
|
1519: int phoneId = request.phone.getPhoneId();
|
1534: .getPhoneStatusFromModem(request.phone, onCompleted);
|
1539: int id = request.phone.getPhoneId();
|
1562: request.phone.setSystemSelectionChannels(args.first, onCompleted);
|
1577: Phone phone = getPhoneFromRequest(request);
|
1578: if (phone != null) {
|
1579: phone.getSystemSelectionChannels(onCompleted);
|
1581: loge("getSystemSelectionChannels: No phone object");
|
1705: Phone phone = getPhoneFromRequest(request);
|
1706: if (phone != null) {
|
1707: phone.setDataThrottling(onCompleted,
|
1711: loge("setDataThrottling: No phone object");
|
1753: request.phone.setSimPowerState(stateToSet, onCompleted, request.workSource);
|
1867: private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
|
1869: command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone, workSource);
|
1878: int command, Object argument, Integer subId, Phone phone, WorkSource workSource) {
|
1884: if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
|
1885: throw new IllegalArgumentException("subId and phone cannot both be specified!");
|
1886: } else if (phone != null) {
|
1887: request = new MainThreadRequest(argument, phone, workSource);
|
1927: * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
|
1931: int command, Object argument, Phone phone, WorkSource workSource) {
|
1932: MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
|
1971: Phone thePhone = getPhone(getDefaultSubscription());
|
1985: if (request.phone != null) {
|
1986: return request.phone;
|
1998: Phone phone = getPhoneFromRequest(request);
|
1999: return phone == null ? null :
|
2000: UiccController.getInstance().getUiccCard(phone.getPhoneId());
|
2003: // returns phone associated with the subId.
|
2008: private void sendEraseModemConfig(Phone phone) {
|
2009: if (phone != null) {
|
2011: mApp, phone.getSubId(), "eraseModemConfig");
|
2049: // PENDING: should we just silently fail if phone is offhook or ringing?
|
2070: // from the context of the phone app.
|
2073: if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
|
2291: final Phone phone = getPhone(getDefaultSubscription());
|
2292: if (phone != null) {
|
2293: phone.updateServiceLocation(workSource);
|
2338: final Phone phone = getPhone(subId);
|
2339: if (phone != null) {
|
2340: return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
|
2358: final Phone phone = getPhone(subId);
|
2359: if (phone != null) {
|
2360: phone.setRadioPower(!isRadioOnForSubscriber(subId));
|
2376: final Phone phone = getPhone(subId);
|
2377: if (phone == null) {
|
2380: if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
|
2398: Phone phone = PhoneFactory.getPhone(i);
|
2399: if (phone != null && phone.isRadioAvailable()) return true;
|
2415: logv("Shutting down Phone " + i);
|
2424: Phone phone = PhoneFactory.getPhone(phoneId);
|
2425: if (phone != null && phone.isRadioAvailable()) {
|
2426: phone.shutdownRadio();
|
2435: final Phone defaultPhone = PhoneFactory.getDefaultPhone();
|
2440: loge("There's no default phone.");
|
2453: final Phone phone = getPhone(subId);
|
2454: if (phone != null) {
|
2455: phone.setRadioPower(turnOn);
|
2473: final Phone phone = getPhone(subId);
|
2474: if (phone != null) {
|
2475: phone.getDataEnabledSettings().setDataEnabled(
|
2494: final Phone phone = getPhone(subId);
|
2495: if (phone != null) {
|
2496: phone.getDataEnabledSettings().setDataEnabled(
|
2511: final Phone phone = getPhone(subId);
|
2512: if (phone != null) {
|
2513: return phone.isDataAllowed(ApnSetting.TYPE_DEFAULT);
|
2562: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2563: return phone == null ? TelephonyManager.CALL_STATE_IDLE :
|
2564: PhoneConstantConversions.convertCallState(phone.getState());
|
2579: final Phone phone = getPhone(subId);
|
2580: if (phone != null) {
|
2581: return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
|
2600: final Phone phone = getPhone(subId);
|
2601: if (phone != null) {
|
2602: return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
|
2631: return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
|
2652: if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
|
2653: // Get default phone in this case.
|
2654: phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
|
2657: Phone phone = PhoneFactory.getPhone(phoneId);
|
2658: if (phone == null) return "";
|
2659: ServiceStateTracker sst = phone.getServiceStateTracker();
|
2664: EmergencyNumberTracker ent = phone.getEmergencyNumberTracker();
|
2730: for (Phone phone : PhoneFactory.getPhones()) {
|
2731: List<CellInfo> info = phone.getAllCellInfo();
|
2770: for (Phone phone : PhoneFactory.getPhones()) {
|
2772: CMD_GET_ALL_CELL_INFO, null, phone, workSource);
|
2834: final Phone phone = getPhoneFromSubId(subId);
|
2835: if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
|
2837: sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
|
2855: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2856: if (phone == null) {
|
2859: int subId = phone.getSubId();
|
2867: return phone.getImei();
|
2875: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2877: if (phone != null) {
|
2878: String imei = phone.getImei();
|
2886: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2887: if (phone == null) {
|
2891: int subId = phone.getSubId();
|
2899: return phone.getMeid();
|
2907: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2909: if (phone != null) {
|
2910: String meid = phone.getMeid();
|
2919: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2920: if (phone == null) {
|
2923: int subId = phone.getSubId();
|
2932: return phone.getDeviceSvn();
|
2942: final Phone phone = getPhone(subId);
|
2943: return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
|
2953: final Phone phone = getPhone(subId);
|
2954: return phone == null ? null : phone.getCarrierName();
|
2964: final Phone phone = getPhone(subId);
|
2965: return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
|
2966: : phone.getSpecificCarrierId();
|
2976: final Phone phone = getPhone(subId);
|
2977: return phone == null ? null : phone.getSpecificCarrierName();
|
2988: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
2989: if (phone == null) {
|
2994: return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
|
3005: * Make sure the caller has the MODIFY_PHONE_STATE permission.
|
3010: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
|
3030: * Make sure the caller has the CALL_PHONE permission.
|
3035: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
|
3071: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
3072: if (phone == null) {
|
3073: return PhoneConstants.PHONE_TYPE_NONE;
|
3075: return phone.getPhoneType();
|
3102: final Phone phone = getPhone(subId);
|
3103: if (phone != null) {
|
3104: return phone.getCdmaEriIconIndex();
|
3135: final Phone phone = getPhone(subId);
|
3136: if (phone != null) {
|
3137: return phone.getCdmaEriIconMode();
|
3166: final Phone phone = getPhone(subId);
|
3167: if (phone != null) {
|
3168: return phone.getCdmaEriText();
|
3187: final Phone phone = getPhone(subId);
|
3188: if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
3189: return phone.getLine1Number();
|
3191: loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
|
3209: final Phone phone = getPhone(subId);
|
3210: if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
3211: return phone.getCdmaMin();
|
3223: if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
3225: throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
|
3391: final Phone phone = getPhone(subId);
|
3392: if (phone != null) {
|
3393: phone.setVoiceActivationState(activationState);
|
3412: final Phone phone = getPhone(subId);
|
3413: if (phone != null) {
|
3414: phone.setDataActivationState(activationState);
|
3430: final Phone phone = getPhone(subId);
|
3433: if (phone != null) {
|
3434: return phone.getVoiceActivationState();
|
3450: final Phone phone = getPhone(subId);
|
3453: if (phone != null) {
|
3454: return phone.getDataActivationState();
|
3476: final Phone phone = getPhone(subId);
|
3477: if (phone != null) {
|
3478: return phone.getVoiceMessageCount();
|
3495: final Phone phone = getPhone(subId);
|
3496: return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
|
3509: final Phone defaultPhone = getDefaultPhone();
|
3547: for (Phone phone : PhoneFactory.getPhones()) {
|
3548: if (phone.isInEmergencySmsMode()) {
|
3559: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3586: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3624: Phone phone = getPhone(subId);
|
3625: if (phone == null) {
|
3630: phone.getImsRegistrationState(regState -> {
|
3657: Phone phone = getPhone(subId);
|
3658: if (phone == null) {
|
3663: phone.getImsRegistrationTech(regTech -> {
|
3682: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3708: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3759: Phone phone = getPhone(subId);
|
3760: if (phone == null) return false;
|
3761: return phone.isImsCapabilityAvailable(capability, regTech);
|
3809: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3846: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3880: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3915: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3967: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4049: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4116: Phone phone = getPhone(subId);
|
4117: if (phone == null) {
|
4118: loge("phone instance null for subid " + subId);
|
4122: if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
|
4126: if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
|
4560: final Phone phone = getPhone(subId);
|
4561: if (phone != null) {
|
4562: return phone.getServiceState().getDataNetworkType();
|
4594: final Phone phone = getPhone(subId);
|
4595: if (phone != null) {
|
4596: return phone.getServiceState().getDataNetworkType();
|
4619: final Phone phone = getPhone(subId);
|
4620: if (phone != null) {
|
4621: return phone.getServiceState().getVoiceNetworkType();
|
4646: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
4647: if (phone != null) {
|
4648: return phone.getIccCard().hasIccCard();
|
4663: * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
|
4664: * or {@link Phone#LTE_ON_CDMA_TRUE}
|
4683: final Phone phone = getPhone(subId);
|
4684: if (phone == null) {
|
4752: + " does not correspond to an active phone");
|
4783: private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
|
4800: CMD_OPEN_CHANNEL, new Pair<String, Integer>(aid, p2), phone,
|
4825: private boolean iccCloseLogicalChannelWithPermission(Phone phone, int channel) {
|
4831: Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, channel, phone,
|
4868: private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
|
4877: new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
|
4924: private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
|
4942: new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
|
5176: Phone phone = PhoneFactory.getPhone(slotIndex);
|
5177: if (phone != null) {
|
5179: mApp, phone.getSubId(), "resetModemConfig");
|
5202: Phone phone = PhoneFactory.getPhone(slotIndex);
|
5203: if (phone != null) {
|
5205: mApp, phone.getSubId(), "rebootModem");
|
5221: final Phone defaultPhone = getDefaultPhone();
|
5583: final Phone phone = getPhone(subId);
|
5584: if (phone == null) {
|
5587: OperatorInfo networkSelection = phone.getSavedNetworkSelection();
|
5589: ? phone.getManualNetworkSelectionPlmn() : networkSelection.getOperatorNumeric();
|
5644: Phone phone = getPhone(subId);
|
5645: if (phone == null) {
|
5675: sendRequestAsync(CMD_GET_CALL_FORWARDING, argument, phone, null);
|
5696: Phone phone = getPhone(subId);
|
5697: if (phone == null) {
|
5710: sendRequestAsync(CMD_SET_CALL_FORWARDING, arguments, phone, null);
|
5725: Phone phone = getPhone(subId);
|
5726: if (phone == null) {
|
5738: sendRequestAsync(CMD_GET_CALL_WAITING, argument, phone, null);
|
5754: Phone phone = getPhone(subId);
|
5755: if (phone == null) {
|
5767: sendRequestAsync(CMD_SET_CALL_WAITING, arguments, phone, null);
|
5874: final Phone defaultPhone = getDefaultPhone();
|
6136: final Phone phone = getPhone(subId);
|
6138: if (phone != null) {
|
6139: return phone.hasMatchedTetherApnSetting();
|
6159: final Phone phone = getPhone(subId);
|
6161: if (phone != null) {
|
6166: phone.setAlwaysReportSignalStrength(isEnable);
|
6168: loge("setAlwaysReportSignalStrength: no phone found for subId="
|
6197: * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
|
6215: Phone phone = PhoneFactory.getPhone(phoneId);
|
6216: if (phone != null) {
|
6217: boolean retVal = phone.isUserDataEnabled();
|
6221: if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
|
6244: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_STATE,
|
6255: Phone phone = PhoneFactory.getPhone(phoneId);
|
6256: if (phone != null) {
|
6257: boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
|
6261: if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
|
6282: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_STATE,
|
6294: Phone phone = PhoneFactory.getPhone(phoneId);
|
6295: if (phone != null) {
|
6298: retVal = phone.isUserDataEnabled();
|
6300: retVal = phone.getDataEnabledSettings().isDataEnabledForReason(reason);
|
6306: loge("isDataEnabledForReason: no phone subId="
|
6317: Phone phone) {
|
6318: if (uid == Process.SYSTEM_UID || uid == Process.PHONE_UID) {
|
6328: PackageManager pkgMgr = phone.getContext().getPackageManager();
|
6333: int subId = phone.getSubId();
|
6341: phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
|
6353: private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, Phone phone,
|
6362: int subId = phone.getSubId();
|
6370: phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
|
6380: final Phone phone = getPhone(subId);
|
6381: if (phone == null) {
|
6385: UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
|
6393: phone.getContext().getPackageManager()), Binder.getCallingUid(), phone);
|
6399: final Phone phone = getPhone(subId);
|
6400: if (phone == null) {
|
6405: UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
|
6412: phone.getContext().getPackageManager(), uid), uid, phone);
|
6517: final Phone phone = getPhone(subId);
|
6518: UiccCard card = phone == null ? null : phone.getUiccCard();
|
6535: Phone phone = getPhone(subId);
|
6536: if (phone != null) {
|
6537: Phone defaultPhone = phone.getImsPhone();
|
6538: if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
|
6558: Phone phone = getPhone(subId);
|
6559: if (phone != null) {
|
6560: Phone defaultPhone = phone.getImsPhone();
|
6561: if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
|
6581: final Phone phone = getPhone(subId);
|
6582: if (phone == null) {
|
6585: final String subscriberId = phone.getSubscriberId();
|
6808: final Phone phone = getPhone(subId);
|
6809: return phone == null ? false : phone.setOperatorBrandOverride(brand);
|
6824: final Phone phone = getPhone(subId);
|
6825: if (phone == null) {
|
6828: return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
|
6879: Phone phone = PhoneFactory.getPhone(phoneId);
|
6883: mApp, phone.getSubId(), "getRadioAccessFamily");
|
6889: if (phone == null) {
|
6896: mApp, phone.getSubId(), "getRadioAccessFamily");
|
6906: final Phone defaultPhone = getDefaultPhone();
|
6920: final Phone defaultPhone = getDefaultPhone();
|
6974: .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
|
7005: final Phone phone = getPhone(subscriptionId);
|
7006: if (phone == null) {
|
7007: loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
|
7014: phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
|
7047: * Returns the unique device ID of phone, for example, the IMEI for
|
7051: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
7055: final Phone phone = PhoneFactory.getPhone(0);
|
7056: if (phone == null) {
|
7059: int subId = phone.getSubId();
|
7067: return phone.getDeviceId();
|
7080: Phone phone = getPhone(subId);
|
7081: if (phone != null) {
|
7082: return phone.isImsRegistered();
|
7103: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
7119: Phone phone = getPhone(subscriptionId);
|
7120: if (phone == null) {
|
7123: return PhoneUtils.makePstnPhoneAccountHandle(phone);
|
7135: Phone phone = getPhone(subId);
|
7136: if (phone != null) {
|
7137: return phone.isWifiCallingEnabled();
|
7152: Phone phone = getPhone(subId);
|
7153: if (phone != null) {
|
7154: return phone.isVideoEnabled();
|
7170: Phone phone = getPhone(subId);
|
7171: if (phone != null) {
|
7172: return phone.getImsRegistrationTech();
|
7231: final Phone phone = getPhone(subId);
|
7232: if (phone == null) {
|
7239: phone.getContext().getOpPackageName(), phone.getContext().getAttributionTag());
|
7248: final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
|
7376: // isActiveSubId requires READ_PHONE_STATE, which we already check for above
|
7383: final Phone phone = getPhone(subId);
|
7384: if (phone == null) {
|
7388: ServiceState ss = phone.getServiceState();
|
7401: * Returns the URI for the per-account voicemail ringtone set in Phone settings.
|
7412: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
|
7413: if (phone == null) {
|
7414: phone = getDefaultPhone();
|
7417: return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
|
7427: * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
7437: final Phone defaultPhone = getDefaultPhone();
|
7448: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
|
7449: if (phone == null) {
|
7450: phone = defaultPhone;
|
7452: VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
|
7459: * Returns whether vibration is set for voicemail notification in Phone settings.
|
7469: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
|
7470: if (phone == null) {
|
7471: phone = getDefaultPhone();
|
7474: return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
|
7484: * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
7494: final Phone defaultPhone = getDefaultPhone();
|
7505: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
|
7506: if (phone == null) {
|
7507: phone = defaultPhone;
|
7509: VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
|
7516: * Make sure either called from same process as self (phone) or IPC caller has read privilege.
|
7521: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
7526: * Make sure either called from same process as self (phone) or IPC caller has send SMS
|
7569: Phone phone = getPhone(subId);
|
7573: if (phone == null) {
|
7578: aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
|
7598: Phone phone = getPhone(subId);
|
7602: if (phone == null) {
|
7607: esn = phone.getEsn();
|
7626: Phone phone = getPhone(subId);
|
7630: if (phone == null) {
|
7635: cdmaPrlVersion = phone.getCdmaPrlVersion();
|
7729: final Phone phone = getPhone(subId);
|
7732: if (phone == null) {
|
7737: phone.carrierActionSetRadioEnabled(enabled);
|
7757: final Phone phone = getPhone(subId);
|
7760: if (phone == null) {
|
7765: phone.carrierActionReportDefaultNetworkStatus(report);
|
7781: final Phone phone = getPhone(subId);
|
7782: if (phone == null) {
|
7787: phone.carrierActionResetAll();
|
7794: * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
|
7801: writer.println("Permission Denial: can't dump Phone from pid="
|
7844: Phone phone = getPhone(subId);
|
7845: if (phone != null) {
|
7847: phone.carrierActionSetMeteredApnsEnabled(enabled);
|
7849: phone.getDataEnabledSettings().setDataEnabled(reason, enabled);
|
7869: Phone phone = getPhone(subId);
|
7873: if (phone != null) {
|
7874: return phone.getClientRequestStats();
|
7901: Phone phone = PhoneFactory.getPhone(slotIndex);
|
7907: if (phone != null) {
|
7908: phone.setSimPowerState(state, null, workSource);
|
7930: Phone phone = PhoneFactory.getPhone(slotIndex);
|
7936: if (phone != null) {
|
7938: sendRequestAsync(CMD_SET_SIM_POWER, arguments, phone, workSource);
|
7960: * Check if phone is in emergency callback mode
|
7961: * @return true if phone is in emergency callback mode
|
7967: final Phone phone = getPhone(subId);
|
7971: if (phone != null) {
|
7972: return phone.isInEcm();
|
7992: Phone p = getPhone(subId);
|
8012: Phone phone = PhoneFactory.getPhone(slotIndex);
|
8013: if (phone != null) {
|
8014: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
|
8021: return phone.getRadioPowerState();
|
8034: * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
|
8054: Phone phone = getPhone(subId);
|
8055: isEnabled = phone != null ? phone.getDataRoamingEnabled() : false;
|
8067: * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
|
8080: Phone phone = getPhone(subId);
|
8081: if (phone != null) {
|
8082: phone.setDataRoamingEnabled(isEnabled);
|
8098: Phone phone = getPhone(subId);
|
8099: if (phone != null) {
|
8100: isAllowed = phone.isCspPlmnEnabled();
|
8119: // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
|
8256: * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
8265: Phone phone = getPhone(subId);
|
8266: if (phone == null) {
|
8269: UiccCard uiccCard = phone.getUiccCard();
|
8306: * not set, return {@link Phone#PREFERRED_NT_MODE}.
|
8314: return Phone.PREFERRED_NT_MODE;
|
8324: final Phone phone = getPhone(subId);
|
8325: if (phone == null) {
|
8329: phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
|
8347: final Phone phone = getPhone(subId);
|
8348: if (phone == null) {
|
8352: return phone.getCarrierIdListVersion();
|
8435: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
8440: for (Phone phone: PhoneFactory.getPhones()) {
|
8441: if (phone.getEmergencyNumberTracker() != null
|
8442: && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
|
8444: phone.getSubId(),
|
8445: phone.getEmergencyNumberTracker().getEmergencyNumberList());
|
8456: final Phone defaultPhone = getDefaultPhone();
|
8464: for (Phone phone: PhoneFactory.getPhones()) {
|
8465: if (phone.getEmergencyNumberTracker() != null
|
8466: && phone.getEmergencyNumberTracker()
|
8487: for (Phone phone: PhoneFactory.getPhones()) {
|
8488: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
8509: for (Phone phone: PhoneFactory.getPhones()) {
|
8510: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
8529: final Phone phone = getPhone(subId);
|
8530: if (phone == null) {
|
8534: return phone.getEmergencyNumberDbVersion();
|
8546: for (Phone phone: PhoneFactory.getPhones()) {
|
8547: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
8563: for (Phone phone: PhoneFactory.getPhones()) {
|
8564: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
8580: for (Phone phone: PhoneFactory.getPhones()) {
|
8581: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
8594: Phone phone = getPhone(subId);
|
8595: if (phone == null) {
|
8601: .getUiccProfileForPhone(phone.getPhoneId());
|
8620: Phone phone = PhoneFactory.getPhone(slotIndex);
|
8621: if (phone == null) {
|
8624: return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
|
8637: Phone phone = PhoneFactory.getPhone(slotIndex);
|
8638: if (phone == null) return false;
|
8641: mApp, phone.getSubId(), callingPackage, callingFeatureId,
|
8643: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
8649: return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
|
8651: return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
|
8719: * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
|
8720: * permission, but the other way around is possible with either MODIFY_PHONE_STATE
|
8749: Phone phone = getPhone(subId);
|
8750: if (phone == null) {
|
8755: UiccCard uiccCard = phone.getUiccCard();
|
8825: Phone phone = getDefaultPhone();
|
8826: if (phone == null) return -1;
|
8827: HalVersion hv = phone.getHalVersion();
|
8857: enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
|
8863: Phone phone = getPhone(subId);
|
8864: if (phone == null) return false;
|
8866: boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
|
8867: return !isMetered || phone.getDataEnabledSettings().isDataEnabled(apnType);
|
8880: Phone phone = getPhone(subId);
|
8881: if (phone == null) return true; // By default return true.
|
8883: return ApnSettingUtils.isMeteredApnType(apnType, phone);
|
8895: Phone phone = getPhone(subscriptionId);
|
8896: if (phone == null) {
|
8916: sendRequestAsync(CMD_SET_SYSTEM_SELECTION_CHANNELS, argument, phone, null);
|
9014: Phone phone = getPhone(subscriptionId);
|
9015: if (phone == null) return false;
|
9019: return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
|
9021: return phone.getDataEnabledSettings().isMmsAlwaysAllowed();
|
9037: Phone phone = getPhone(subscriptionId);
|
9038: if (phone == null) return;
|
9042: phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(enabled);
|
9045: phone.getDataEnabledSettings().setAlwaysAllowMmsData(enabled);
|
9067: for (Phone phone : PhoneFactory.getPhones()) {
|
9068: Phone defaultPhone = phone.getImsPhone();
|
9069: if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
|
9118: Phone phone = getPhone(subId);
|
9119: if (phone != null && phone.getIccCard() != null) {
|
9120: return phone.getIccCard().getIccLockEnabled();
|
9144: Phone phone = getPhone(subId);
|
9145: if (phone == null) {
|
9152: new Pair<Boolean, String>(enabled, password), phone, null);
|
9176: Phone phone = getPhone(subId);
|
9177: if (phone == null) {
|
9184: new Pair<String, String>(oldPassword, newPassword), phone, null);
|
9243: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
9246: Phone phone = getPhone(subId);
|
9247: if (phone == null) {
|
9248: throw new RuntimeException("phone is not available");
|
9253: return phone.getEquivalentHomePlmns();
|
9302: * @param subId the subscription ID of the phone requesting to set the radio power state.
|
9304: * @return {@code true} if phone setRadioPowerForReason was called. Otherwise, returns {@code
|
9308: Phone phone = getPhone(subId);
|
9309: if (phone != null) {
|
9310: phone.setRadioPowerForReason(enable, Phone.RADIO_POWER_REASON_THERMAL);
|
9318: // Ensure that radio is on. If not able to power on due to phone being unavailable, return
|
9367: // Ensure that radio is on. If not able to power on due to phone being
|
9389: Phone phone = getPhone(subId);
|
9390: if (phone == null) {
|
9396: if (PhoneConstantConversions.convertCallState(phone.getState())
|
9398: || phone.isInEmergencySmsMode() || phone.isInEcm()
|
9400: String errorMessage = "Phone state is not valid. call state = "
|
9401: + PhoneConstantConversions.convertCallState(phone.getState())
|
9402: + " isInEmergencySmsMode = " + phone.isInEmergencySmsMode()
|
9403: + " isInEmergencyCallbackMode = " + phone.isInEcm();
|
9419: // Turn radio off. If not able to power off due to phone being unavailable,
|
22: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
|
62: import android.telecom.PhoneAccount;
|
63: import android.telecom.PhoneAccountHandle;
|
86: import android.telephony.PhoneCapability;
|
87: import android.telephony.PhoneNumberRange;
|
151: import com.android.internal.telephony.PhoneConfigurationManager;
|
152: import com.android.internal.telephony.PhoneConstantConversions;
|
153: import com.android.internal.telephony.PhoneConstants;
|
154: import com.android.internal.telephony.PhoneFactory;
|
168: import com.android.internal.telephony.imsphone.ImsPhone;
|
169: import com.android.internal.telephony.imsphone.ImsPhoneCallTracker;
|
212: private static final String LOG_TAG = "PhoneInterfaceManager";
|
213: private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
|
323: private static PhoneInterfaceManager sInstance;
|
325: private PhoneGlobals mApp;
|
724: defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
|
751: defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
|
762: defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
|
772: defaultPhone.resetModemConfig(onCompleted);
|
904: defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
|
1186: if (defaultPhone != null) {
|
1187: defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
|
1250: defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
|
1278: defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
|
1502: defaultPhone.rebootModem(onCompleted);
|
1512: PhoneConfigurationManager.getInstance()
|
1522: mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
|
1533: PhoneConfigurationManager.getInstance()
|
1650: defaultPhone.eraseModemConfig(onCompleted);
|
1696: getDefaultPhone().getContext().sendBroadcastAsUser(
|
1938: * Initialize the singleton PhoneInterfaceManager instance.
|
1939: * This is only done once, at startup, from PhoneApp.onCreate().
|
1941: /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
|
1942: synchronized (PhoneInterfaceManager.class) {
|
1944: sInstance = new PhoneInterfaceManager(app);
|
1955: mCM = PhoneGlobals.getInstance().mCM;
|
1956: mImsResolver = PhoneGlobals.getInstance().getImsResolver();
|
1964: mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
|
1972: return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
|
1994: ? getDefaultPhone() : getPhone(subId);
|
2005: return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
|
2023: PackageManager pm = getDefaultPhone().getContext().getPackageManager();
|
2050: PhoneConstants.State state = mCM.getState(subId);
|
2051: if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
|
2110: return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
|
2115: return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
|
2123: final UnlockSim checkSimPin = new UnlockSim(getPhone(subId).getIccCard());
|
2136: final UnlockSim checkSimPuk = new UnlockSim(getPhone(subId).getIccCard());
|
2153: private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
|
2183: mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
|
2188: mResult = PhoneConstants.PIN_OPERATION_ABORTED;
|
2190: mResult = PhoneConstants.PIN_GENERAL_FAILURE;
|
2193: mResult = PhoneConstants.PIN_RESULT_SUCCESS;
|
2401: logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
|
2436: if (defaultPhone != null) {
|
2437: defaultPhone.setRadioPower(turnOn);
|
2583: return PhoneConstantConversions.convertDataState(
|
2584: PhoneConstants.DataState.DISCONNECTED);
|
2656: final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
|
2847: getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
|
3051: Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
3055: Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
3059: Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
3221: public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
|
3252: return getDefaultPhone().needsOtaServiceProvisioning();
|
3287: PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
|
3288: if (phoneAccountHandle == null) {
|
3291: return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
|
3376: SmsController smsController = PhoneFactory.getSmsController();
|
3511: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
3520: defaultPhone.sendDialerSpecialCode(inputCode);
|
3575: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3599: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
|
3695: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3722: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
|
3738: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3817: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3835: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3855: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3870: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3889: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3905: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3924: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3940: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3956: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3976: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3992: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4007: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4023: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4039: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4058: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4077: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4095: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4140: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4170: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4203: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4262: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4431: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4456: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4482: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4508: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4678: return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
|
4685: return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
|
4688: .orElse(PhoneConstants.LTE_ON_CDMA_FALSE);
|
4749: int phoneId = UiccController.getInstance().getPhoneIdFromSlotId(slotIndex);
|
4750: if (phoneId == -1) {
|
4754: return PhoneFactory.getPhone(phoneId);
|
4789: ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
|
4931: ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
|
5222: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
|
5229: return defaultPhone.getPcscfAddress(apnType);
|
5503: getDefaultPhone().setImsRegistrationState(registered);
|
5814: request, messenger, binder, getPhone(subId),
|
5875: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
|
5883: return PhoneFactory.calculatePreferredNetworkType(defaultPhone.getContext(), 0);
|
6213: int phoneId = mSubscriptionController.getPhoneId(subId);
|
6214: if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
|
6253: int phoneId = mSubscriptionController.getPhoneId(subId);
|
6254: if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
|
6289: int phoneId = mSubscriptionController.getPhoneId(subId);
|
6291: log("isDataEnabledForReason: subId=" + subId + " phoneId=" + phoneId
|
6421: int phoneId = SubscriptionManager.getPhoneId(subId);
|
6422: UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
|
6429: getPhone(phoneId), pkgName);
|
6446: getPhone(i), pkgName);
|
6457: if (!SubscriptionManager.isValidPhoneId(phoneId)) {
|
6458: loge("phoneId " + phoneId + " is not valid.");
|
6461: UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
|
6463: loge("getCarrierPackageNamesForIntentAndPhone: No UICC");
|
6470: public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
|
6474: UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
|
6539: ImsPhone imsPhone = (ImsPhone) defaultPhone;
|
6540: imsPhone.setCallComposerStatus(status);
|
6562: ImsPhone imsPhone = (ImsPhone) defaultPhone;
|
6563: return imsPhone.getCallComposerStatus();
|
6878: public int getRadioAccessFamily(int phoneId, String callingPackage) {
|
6897: raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
|
6911: ImsManager.getInstance(defaultPhone.getContext(),
|
6912: defaultPhone.getPhoneId()).setVtSetting(enable);
|
6921: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
|
6933: ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
|
7048: * GSM and the MEID for CDMA phones. Return null if device ID is not available.
|
7092: return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
|
7100: PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
|
7107: return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
|
7204: cleanUpSmsRawTable(getDefaultPhone().getContext());
|
7215: sendEraseModemConfig(getDefaultPhone());
|
7403: * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
|
7406: * PhoneAccount.
|
7409: public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
|
7429: * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
|
7432: * PhoneAccount.
|
7436: PhoneAccountHandle phoneAccountHandle, Uri uri) {
|
7439: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
7442: mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
|
7461: * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
|
7463: * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
|
7466: public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
|
7486: * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
|
7489: * specific PhoneAccount.
|
7493: PhoneAccountHandle phoneAccountHandle, boolean enabled) {
|
7496: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
7499: mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
|
7815: return new TelephonyShellCommand(this, getDefaultPhone().getContext()).exec(
|
8121: if (checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
|
8310: int phoneId = mSubscriptionController.getPhoneId(subId);
|
8311: if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
|
8312: return list.get(phoneId);
|
8460: mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
|
8676: getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
|
8699: PhoneCapability staticCapability =
|
8805: int phoneCount = TelephonyManager.getDefault().getPhoneCount();
|
8807: int[] logicalSlotsMapping = new int[phoneCount];
|
8958: SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
|
8984: return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
|
9001: return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
|
9070: ImsPhone imsPhone = (ImsPhone) defaultPhone;
|
9072: (ImsPhoneCallTracker) imsPhone.getCallTracker();
|
9074: Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
|
9075: + imsPhone.getMsisdn());
|
9213: // * Inherited from PhoneWindowManager *
|
9300: * PhoneInternalInterface#setRadioPowerForReason} for more details.
|
9721: return getDefaultPhone().getMobileProvisioningUrl();
|
138: import com.android.internal.telephony.DefaultPhoneNotifier;
|
507: getPhoneFromRequest(request).handlePinMmi((String) request.argument)
|
866: getPhoneFromRequest(request).getPreferredNetworkType(onCompleted);
|
894: getPhoneFromRequest(request).setPreferredNetworkType(networkType, onCompleted);
|
918: getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
|
930: getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
|
940: getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
|
1053: getPhoneFromRequest(request).getCallWaiting(onCompleted);
|
1099: getPhoneFromRequest(request).setCallWaiting(enable, onCompleted);
|
1166: getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
|
1361: getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
|
1382: getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
|
1398: getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
|
1409: getPhoneFromRequest(request).queryCdmaSubscriptionMode(onCompleted);
|
1425: getPhoneFromRequest(request).setCdmaSubscriptionMode(
|
1543: mPhoneConfigurationManager.addToPhoneStatusCache(id,
|
1660: getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
|
1678: getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
|
1988: return getPhoneFromSubId(request.subId);
|
2322: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
2397: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
2414: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
2416: shutdownRadioUsingPhoneId(i);
|
2924: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3064: return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
|
3094: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3127: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3158: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3301: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3469: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3529: .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3566: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3592: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3649: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3689: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3714: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3814: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3851: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3885: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3920: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3972: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4054: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4136: checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
|
4200: checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
|
4552: && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
|
4586: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
4611: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
4704: return mSubscriptionController.getPhoneId(getDefaultSubscription());
|
4766: return iccOpenLogicalChannelWithPermission(getPhoneFromSubId(subId), callingPackage, aid,
|
4779: return iccOpenLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
|
4814: return iccCloseLogicalChannelWithPermission(getPhoneFromSubId(subId), channel);
|
4821: return iccCloseLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
|
4850: return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
|
4864: getPhoneFromSlotIdOrThrowException(slotIndex), channel, cla, command, p1, p2, p3,
|
4903: return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
|
4919: getPhoneFromSlotIdOrThrowException(slotIndex), callingPackage, cla, command, p1,
|
5004: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
5042: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
|
5446: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5574: .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
5898: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5949: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5994: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5998: return getPhoneFromSubId(subId).getAllowedNetworkTypes(reason);
|
6042: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
6064: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
6070: getPhoneFromSubId(subId).getCarrierBandwidth();
|
6089: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
6093: return getPhoneFromSubId(subId).getEffectiveAllowedNetworkTypes();
|
6115: getPhoneFromSubId(subId).setAllowedNetworkTypes(reason, allowedNetworkTypes);
|
6437: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
6501: enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
|
6507: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
6628: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
|
6655: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6678: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6882: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
6895: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
6945: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6964: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7101: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
|
7102: callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
|
7115: enforceReadPrivilegedPermission("getPhoneAccountHandleForSubscriptionId, "
|
7340: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7865: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8047: TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
|
8092: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
8220: slot.getPhoneId(),
|
8361: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8369: return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
|
8378: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
8405: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
8432: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8459: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
8640: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8675: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
|
8700: mPhoneConfigurationManager.getStaticPhoneCapability();
|
8740: mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
|
8780: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8787: return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
|
8796: metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
|
8810: if (SubscriptionManager.isValidPhoneId(slotInfos[i].getLogicalSlotIdx())) {
|
8925: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
8944: SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
|
9071: ImsPhoneCallTracker imsPhoneCallTracker =
|
9073: imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
|
9241: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
android.googlesource.com/platform/superproject:packages/services/Telephony/src/com/android/phone/PhoneInterfaceManager.java: [ master, ] |
---|
384: public Phone phone;
|
17: package com.android.phone;
|
198: public class PhoneInterfaceManager extends ITelephony.Stub {
|
1655: private PhoneInterfaceManager(PhoneGlobals app) {
|
1672: private Phone getDefaultPhone() {
|
1706: private Phone getPhone(int subId) {
|
2347: public String getNetworkCountryIsoForPhone(int phoneId) {
|
5936: public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
|
5959: public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
|
6417: public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
|
308: private PhoneConfigurationManager mPhoneConfigurationManager;
|
1686: private Phone getPhoneFromRequest(MainThreadRequest request) {
|
1694: private Phone getPhoneFromSubId(int subId) {
|
2125: private void shutdownRadioUsingPhoneId(int phoneId) {
|
2780: public int getActivePhoneType() {
|
2785: public int getActivePhoneTypeForSlot(int slotIndex) {
|
3824: private void checkModifyPhoneStatePermission(int subId, String message) {
|
4463: private Phone getPhoneFromSlotIdOrThrowException(int slotIndex) {
|
6003: public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
|
6543: public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
|
6553: public int getSubIdForPhoneAccountHandle(
|
6568: public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
|
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
|
140: import com.android.internal.telephony.Phone;
|
174: import com.android.phone.settings.PickSmsSubscriptionActivity;
|
175: import com.android.phone.vvm.PhoneAccountHandleConverter;
|
176: import com.android.phone.vvm.RemoteVvmTaskManager;
|
177: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
|
178: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
|
383: // In cases where subId is unavailable, the caller needs to specify the phone.
|
392: MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
|
394: if (phone != null) {
|
395: this.phone = phone;
|
423: * A handler that processes messages on the main thread in the phone process. Since many
|
424: * of the Phone calls are not thread safe this is needed to shuttle the requests from the
|
425: * inbound binder threads to the main thread in the phone process. The Binder thread
|
442: final Phone defaultPhone = getDefaultPhone();
|
447: final Phone phone = getPhoneFromRequest(request);
|
466: request.result = phone != null
|
467: ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
|
478: final Phone phone = getPhoneFromRequest(request);
|
479: request.result = phone != null ?
|
1266: request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
|
1280: request.phone.requestCellInfoUpdate(request.workSource,
|
1308: Phone phone = getPhoneFromRequest(request);
|
1309: phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
|
1317: phone = getPhoneFromRequest(request);
|
1318: request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
|
1340: .enablePhone(request.phone, enable, onCompleted);
|
1346: int phoneId = request.phone.getPhoneId();
|
1361: .getPhoneStatusFromModem(request.phone, onCompleted);
|
1366: int id = request.phone.getPhoneId();
|
1389: request.phone.setSystemSelectionChannels(args.first, onCompleted);
|
1569: private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
|
1571: command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone, workSource);
|
1580: int command, Object argument, Integer subId, Phone phone, WorkSource workSource) {
|
1586: if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
|
1587: throw new IllegalArgumentException("subId and phone cannot both be specified!");
|
1588: } else if (phone != null) {
|
1589: request = new MainThreadRequest(argument, phone, workSource);
|
1629: * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
|
1633: int command, Object argument, Phone phone, WorkSource workSource) {
|
1634: MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
|
1673: Phone thePhone = getPhone(getDefaultSubscription());
|
1687: if (request.phone != null) {
|
1688: return request.phone;
|
1700: Phone phone = getPhoneFromRequest(request);
|
1701: return phone == null ? null :
|
1702: UiccController.getInstance().getUiccCard(phone.getPhoneId());
|
1705: // returns phone associated with the subId.
|
1710: private void sendEraseModemConfig(Phone phone) {
|
1711: if (phone != null) {
|
1713: mApp, phone.getSubId(), "eraseModemConfig");
|
1751: // PENDING: should we just silently fail if phone is offhook or ringing?
|
1772: // from the context of the phone app.
|
1775: if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
|
1993: final Phone phone = getPhone(getDefaultSubscription());
|
1994: if (phone != null) {
|
1995: phone.updateServiceLocation(workSource);
|
2040: final Phone phone = getPhone(subId);
|
2041: if (phone != null) {
|
2042: return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
|
2060: final Phone phone = getPhone(subId);
|
2061: if (phone != null) {
|
2062: phone.setRadioPower(!isRadioOnForSubscriber(subId));
|
2078: final Phone phone = getPhone(subId);
|
2079: if (phone == null) {
|
2082: if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
|
2100: Phone phone = PhoneFactory.getPhone(i);
|
2101: if (phone != null && phone.isRadioAvailable()) return true;
|
2117: logv("Shutting down Phone " + i);
|
2126: Phone phone = PhoneFactory.getPhone(phoneId);
|
2127: if (phone != null && phone.isRadioAvailable()) {
|
2128: phone.shutdownRadio();
|
2137: final Phone defaultPhone = PhoneFactory.getDefaultPhone();
|
2142: loge("There's no default phone.");
|
2155: final Phone phone = getPhone(subId);
|
2156: if (phone != null) {
|
2157: phone.setRadioPower(turnOn);
|
2175: final Phone phone = getPhone(subId);
|
2176: if (phone != null) {
|
2177: phone.getDataEnabledSettings().setUserDataEnabled(true);
|
2195: final Phone phone = getPhone(subId);
|
2196: if (phone != null) {
|
2197: phone.getDataEnabledSettings().setUserDataEnabled(false);
|
2211: final Phone phone = getPhone(subId);
|
2212: if (phone != null) {
|
2213: return phone.isDataAllowed(ApnSetting.TYPE_DEFAULT);
|
2262: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2263: return phone == null ? TelephonyManager.CALL_STATE_IDLE :
|
2264: PhoneConstantConversions.convertCallState(phone.getState());
|
2279: final Phone phone = getPhone(subId);
|
2280: if (phone != null) {
|
2281: return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
|
2300: final Phone phone = getPhone(subId);
|
2301: if (phone != null) {
|
2302: return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
|
2331: return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
|
2352: if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
|
2353: // Get default phone in this case.
|
2354: phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
|
2357: Phone phone = PhoneFactory.getPhone(phoneId);
|
2358: if (phone == null) return "";
|
2359: ServiceStateTracker sst = phone.getServiceStateTracker();
|
2364: EmergencyNumberTracker ent = phone.getEmergencyNumberTracker();
|
2449: for (Phone phone : PhoneFactory.getPhones()) {
|
2450: List<CellInfo> info = phone.getAllCellInfo();
|
2489: for (Phone phone : PhoneFactory.getPhones()) {
|
2491: CMD_GET_ALL_CELL_INFO, null, phone, workSource);
|
2551: final Phone phone = getPhoneFromSubId(subId);
|
2552: if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
|
2554: sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
|
2572: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2573: if (phone == null) {
|
2576: int subId = phone.getSubId();
|
2584: return phone.getImei();
|
2592: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2594: if (phone != null) {
|
2595: String imei = phone.getImei();
|
2603: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2604: if (phone == null) {
|
2608: int subId = phone.getSubId();
|
2616: return phone.getMeid();
|
2624: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2626: if (phone != null) {
|
2627: String meid = phone.getMeid();
|
2636: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2637: if (phone == null) {
|
2640: int subId = phone.getSubId();
|
2649: return phone.getDeviceSvn();
|
2659: final Phone phone = getPhone(subId);
|
2660: return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
|
2670: final Phone phone = getPhone(subId);
|
2671: return phone == null ? null : phone.getCarrierName();
|
2681: final Phone phone = getPhone(subId);
|
2682: return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
|
2683: : phone.getSpecificCarrierId();
|
2693: final Phone phone = getPhone(subId);
|
2694: return phone == null ? null : phone.getSpecificCarrierName();
|
2705: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
2706: if (phone == null) {
|
2711: return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
|
2722: * Make sure the caller has the MODIFY_PHONE_STATE permission.
|
2727: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
|
2747: * Make sure the caller has the CALL_PHONE permission.
|
2752: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
|
2788: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
2789: if (phone == null) {
|
2790: return PhoneConstants.PHONE_TYPE_NONE;
|
2792: return phone.getPhoneType();
|
2819: final Phone phone = getPhone(subId);
|
2820: if (phone != null) {
|
2821: return phone.getCdmaEriIconIndex();
|
2852: final Phone phone = getPhone(subId);
|
2853: if (phone != null) {
|
2854: return phone.getCdmaEriIconMode();
|
2883: final Phone phone = getPhone(subId);
|
2884: if (phone != null) {
|
2885: return phone.getCdmaEriText();
|
2904: final Phone phone = getPhone(subId);
|
2905: if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
2906: return phone.getLine1Number();
|
2908: loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
|
2926: final Phone phone = getPhone(subId);
|
2927: if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
2928: return phone.getCdmaMin();
|
2940: if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
2942: throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
|
3106: final Phone phone = getPhone(subId);
|
3107: if (phone != null) {
|
3108: phone.setVoiceActivationState(activationState);
|
3127: final Phone phone = getPhone(subId);
|
3128: if (phone != null) {
|
3129: phone.setDataActivationState(activationState);
|
3145: final Phone phone = getPhone(subId);
|
3148: if (phone != null) {
|
3149: return phone.getVoiceActivationState();
|
3165: final Phone phone = getPhone(subId);
|
3168: if (phone != null) {
|
3169: return phone.getDataActivationState();
|
3191: final Phone phone = getPhone(subId);
|
3192: if (phone != null) {
|
3193: return phone.getVoiceMessageCount();
|
3210: final Phone phone = getPhone(subId);
|
3211: return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
|
3224: final Phone defaultPhone = getDefaultPhone();
|
3262: for (Phone phone : PhoneFactory.getPhones()) {
|
3263: if (phone.isInEmergencySmsMode()) {
|
3274: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3301: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3339: Phone phone = getPhone(subId);
|
3340: if (phone == null) {
|
3345: phone.getImsRegistrationState(regState -> {
|
3372: Phone phone = getPhone(subId);
|
3373: if (phone == null) {
|
3378: phone.getImsRegistrationTech(regTech -> {
|
3397: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3423: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3474: Phone phone = getPhone(subId);
|
3475: if (phone == null) return false;
|
3476: return phone.isImsCapabilityAvailable(capability, regTech);
|
3524: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3561: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3595: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3630: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3682: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3764: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3831: Phone phone = getPhone(subId);
|
3832: if (phone == null) {
|
3833: loge("phone instance null for subid " + subId);
|
3837: if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
|
3841: if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
|
4275: final Phone phone = getPhone(subId);
|
4276: if (phone != null) {
|
4277: return phone.getServiceState().getDataNetworkType();
|
4309: final Phone phone = getPhone(subId);
|
4310: if (phone != null) {
|
4311: return phone.getServiceState().getDataNetworkType();
|
4334: final Phone phone = getPhone(subId);
|
4335: if (phone != null) {
|
4336: return phone.getServiceState().getVoiceNetworkType();
|
4361: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
4362: if (phone != null) {
|
4363: return phone.getIccCard().hasIccCard();
|
4378: * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
|
4379: * or {@link Phone#LTE_ON_CDMA_TRUE}
|
4398: final Phone phone = getPhone(subId);
|
4399: if (phone == null) {
|
4467: + " does not correspond to an active phone");
|
4498: private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
|
4515: CMD_OPEN_CHANNEL, new Pair<String, Integer>(aid, p2), phone,
|
4540: private boolean iccCloseLogicalChannelWithPermission(Phone phone, int channel) {
|
4546: Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, channel, phone,
|
4583: private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
|
4592: new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
|
4639: private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
|
4657: new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
|
4891: Phone phone = PhoneFactory.getPhone(slotIndex);
|
4892: if (phone != null) {
|
4894: mApp, phone.getSubId(), "resetModemConfig");
|
4917: Phone phone = PhoneFactory.getPhone(slotIndex);
|
4918: if (phone != null) {
|
4920: mApp, phone.getSubId(), "rebootModem");
|
4936: final Phone defaultPhone = getDefaultPhone();
|
5268: final Phone phone = getPhone(subId);
|
5269: if (phone == null) {
|
5272: OperatorInfo networkSelection = phone.getSavedNetworkSelection();
|
5274: ? phone.getManualNetworkSelectionPlmn() : networkSelection.getOperatorNumeric();
|
5484: final Phone defaultPhone = getDefaultPhone();
|
5670: final Phone phone = getPhone(subId);
|
5672: if (phone != null) {
|
5673: return phone.hasMatchedTetherApnSetting();
|
5697: Phone phone = PhoneFactory.getPhone(phoneId);
|
5698: if (phone != null) {
|
5700: phone.getDataEnabledSettings().setUserDataEnabled(enable);
|
5702: loge("setUserDataEnabled: no phone found. Invalid subId=" + subId);
|
5720: final Phone phone = getPhone(subId);
|
5722: if (phone != null) {
|
5727: phone.setAlwaysReportSignalStrength(isEnable);
|
5729: loge("setAlwaysReportSignalStrength: no phone found for subId="
|
5758: * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
|
5776: Phone phone = PhoneFactory.getPhone(phoneId);
|
5777: if (phone != null) {
|
5778: boolean retVal = phone.isUserDataEnabled();
|
5782: if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
|
5805: Phone phone = PhoneFactory.getPhone(phoneId);
|
5806: if (phone != null) {
|
5807: boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
|
5811: if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
|
5820: Phone phone) {
|
5821: if (uid == Process.SYSTEM_UID || uid == Process.PHONE_UID) {
|
5831: PackageManager pkgMgr = phone.getContext().getPackageManager();
|
5836: int subId = phone.getSubId();
|
5844: phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
|
5856: private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, Phone phone,
|
5865: int subId = phone.getSubId();
|
5873: phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
|
5883: final Phone phone = getPhone(subId);
|
5884: if (phone == null) {
|
5888: UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
|
5896: phone.getContext().getPackageManager()), Binder.getCallingUid(), phone);
|
5902: final Phone phone = getPhone(subId);
|
5903: if (phone == null) {
|
5908: UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
|
5915: phone.getContext().getPackageManager(), uid), uid, phone);
|
6020: final Phone phone = getPhone(subId);
|
6021: UiccCard card = phone == null ? null : phone.getUiccCard();
|
6043: final Phone phone = getPhone(subId);
|
6044: if (phone == null) {
|
6047: final String subscriberId = phone.getSubscriberId();
|
6270: final Phone phone = getPhone(subId);
|
6271: return phone == null ? false : phone.setOperatorBrandOverride(brand);
|
6286: final Phone phone = getPhone(subId);
|
6287: if (phone == null) {
|
6290: return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
|
6341: Phone phone = PhoneFactory.getPhone(phoneId);
|
6343: if (phone == null) {
|
6350: mApp, phone.getSubId(), "getRadioAccessFamily");
|
6360: final Phone defaultPhone = getDefaultPhone();
|
6374: final Phone defaultPhone = getDefaultPhone();
|
6428: .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
|
6459: final Phone phone = getPhone(subscriptionId);
|
6460: if (phone == null) {
|
6461: loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
|
6468: phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
|
6501: * Returns the unique device ID of phone, for example, the IMEI for
|
6505: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
6509: final Phone phone = PhoneFactory.getPhone(0);
|
6510: if (phone == null) {
|
6513: int subId = phone.getSubId();
|
6521: return phone.getDeviceId();
|
6534: Phone phone = getPhone(subId);
|
6535: if (phone != null) {
|
6536: return phone.isImsRegistered();
|
6557: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
6573: Phone phone = getPhone(subscriptionId);
|
6574: if (phone == null) {
|
6577: return PhoneUtils.makePstnPhoneAccountHandle(phone);
|
6589: Phone phone = getPhone(subId);
|
6590: if (phone != null) {
|
6591: return phone.isWifiCallingEnabled();
|
6606: Phone phone = getPhone(subId);
|
6607: if (phone != null) {
|
6608: return phone.isVideoEnabled();
|
6624: Phone phone = getPhone(subId);
|
6625: if (phone != null) {
|
6626: return phone.getImsRegistrationTech();
|
6684: final Phone phone = getPhone(subId);
|
6685: if (phone == null) {
|
6692: phone.getContext().getOpPackageName(), phone.getContext().getAttributionTag());
|
6701: final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
|
6829: final Phone phone = getPhone(subId);
|
6830: if (phone == null) {
|
6834: ServiceState ss = phone.getServiceState();
|
6847: * Returns the URI for the per-account voicemail ringtone set in Phone settings.
|
6858: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
|
6859: if (phone == null) {
|
6860: phone = getDefaultPhone();
|
6863: return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
|
6873: * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
6883: final Phone defaultPhone = getDefaultPhone();
|
6894: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
|
6895: if (phone == null) {
|
6896: phone = defaultPhone;
|
6898: VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
|
6905: * Returns whether vibration is set for voicemail notification in Phone settings.
|
6915: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
|
6916: if (phone == null) {
|
6917: phone = getDefaultPhone();
|
6920: return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
|
6930: * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
6940: final Phone defaultPhone = getDefaultPhone();
|
6951: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
|
6952: if (phone == null) {
|
6953: phone = defaultPhone;
|
6955: VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
|
6962: * Make sure either called from same process as self (phone) or IPC caller has read privilege.
|
6967: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
6972: * Make sure either called from same process as self (phone) or IPC caller has send SMS
|
7015: Phone phone = getPhone(subId);
|
7019: if (phone == null) {
|
7024: aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
|
7044: Phone phone = getPhone(subId);
|
7048: if (phone == null) {
|
7053: esn = phone.getEsn();
|
7072: Phone phone = getPhone(subId);
|
7076: if (phone == null) {
|
7081: cdmaPrlVersion = phone.getCdmaPrlVersion();
|
7175: final Phone phone = getPhone(subId);
|
7178: if (phone == null) {
|
7183: phone.carrierActionSetMeteredApnsEnabled(enabled);
|
7200: final Phone phone = getPhone(subId);
|
7203: if (phone == null) {
|
7208: phone.carrierActionSetRadioEnabled(enabled);
|
7228: final Phone phone = getPhone(subId);
|
7231: if (phone == null) {
|
7236: phone.carrierActionReportDefaultNetworkStatus(report);
|
7252: final Phone phone = getPhone(subId);
|
7253: if (phone == null) {
|
7258: phone.carrierActionResetAll();
|
7265: * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
|
7272: writer.println("Permission Denial: can't dump Phone from pid="
|
7303: Phone phone = getPhone(subId);
|
7304: if (phone != null) {
|
7305: phone.getDataEnabledSettings().setPolicyDataEnabled(enabled);
|
7324: Phone phone = getPhone(subId);
|
7328: if (phone != null) {
|
7329: return phone.getClientRequestStats();
|
7356: Phone phone = PhoneFactory.getPhone(slotIndex);
|
7362: if (phone != null) {
|
7363: phone.setSimPowerState(state, workSource);
|
7385: * Check if phone is in emergency callback mode
|
7386: * @return true if phone is in emergency callback mode
|
7392: final Phone phone = getPhone(subId);
|
7396: if (phone != null) {
|
7397: return phone.isInEcm();
|
7417: Phone p = getPhone(subId);
|
7437: Phone phone = PhoneFactory.getPhone(slotIndex);
|
7438: if (phone != null) {
|
7439: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
|
7446: return phone.getRadioPowerState();
|
7459: * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
|
7479: Phone phone = getPhone(subId);
|
7480: isEnabled = phone != null ? phone.getDataRoamingEnabled() : false;
|
7492: * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
|
7505: Phone phone = getPhone(subId);
|
7506: if (phone != null) {
|
7507: phone.setDataRoamingEnabled(isEnabled);
|
7523: Phone phone = getPhone(subId);
|
7524: if (phone != null) {
|
7525: isAllowed = phone.isCspPlmnEnabled();
|
7544: // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
|
7681: * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
7690: Phone phone = getPhone(subId);
|
7691: if (phone == null) {
|
7694: UiccCard uiccCard = phone.getUiccCard();
|
7731: * not set, return {@link Phone#PREFERRED_NT_MODE}.
|
7739: return Phone.PREFERRED_NT_MODE;
|
7749: final Phone phone = getPhone(subId);
|
7750: if (phone == null) {
|
7754: phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
|
7772: final Phone phone = getPhone(subId);
|
7773: if (phone == null) {
|
7777: return phone.getCarrierIdListVersion();
|
7846: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
7851: for (Phone phone: PhoneFactory.getPhones()) {
|
7852: if (phone.getEmergencyNumberTracker() != null
|
7853: && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
|
7855: phone.getSubId(),
|
7856: phone.getEmergencyNumberTracker().getEmergencyNumberList());
|
7867: final Phone defaultPhone = getDefaultPhone();
|
7875: for (Phone phone: PhoneFactory.getPhones()) {
|
7876: if (phone.getEmergencyNumberTracker() != null
|
7877: && phone.getEmergencyNumberTracker()
|
7898: for (Phone phone: PhoneFactory.getPhones()) {
|
7899: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
7920: for (Phone phone: PhoneFactory.getPhones()) {
|
7921: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
7940: final Phone phone = getPhone(subId);
|
7941: if (phone == null) {
|
7945: return phone.getEmergencyNumberDbVersion();
|
7957: for (Phone phone: PhoneFactory.getPhones()) {
|
7958: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
7974: for (Phone phone: PhoneFactory.getPhones()) {
|
7975: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
7991: for (Phone phone: PhoneFactory.getPhones()) {
|
7992: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
8005: Phone phone = getPhone(subId);
|
8006: if (phone == null) {
|
8012: .getUiccProfileForPhone(phone.getPhoneId());
|
8031: Phone phone = PhoneFactory.getPhone(slotIndex);
|
8032: if (phone == null) {
|
8035: return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
|
8048: Phone phone = PhoneFactory.getPhone(slotIndex);
|
8049: if (phone == null) return false;
|
8052: mApp, phone.getSubId(), callingPackage, callingFeatureId,
|
8054: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
8060: return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
|
8062: return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
|
8130: * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
|
8131: * permission, but the other way around is possible with either MODIFY_PHONE_STATE
|
8160: Phone phone = getPhone(subId);
|
8161: if (phone == null) {
|
8166: UiccCard uiccCard = phone.getUiccCard();
|
8236: Phone phone = getDefaultPhone();
|
8237: if (phone == null) return -1;
|
8238: HalVersion hv = phone.getHalVersion();
|
8268: enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
|
8274: Phone phone = getPhone(subId);
|
8275: if (phone == null) return false;
|
8277: boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
|
8278: return !isMetered || phone.getDataEnabledSettings().isDataEnabled(apnType);
|
8291: Phone phone = getPhone(subId);
|
8292: if (phone == null) return true; // By default return true.
|
8294: return ApnSettingUtils.isMeteredApnType(apnType, phone);
|
8306: Phone phone = getPhone(subscriptionId);
|
8307: if (phone == null) {
|
8327: sendRequestAsync(CMD_SET_SYSTEM_SELECTION_CHANNELS, argument, phone, null);
|
8408: Phone phone = getPhone(subId);
|
8409: if (phone == null) return false;
|
8411: return phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(allow);
|
8424: Phone phone = getPhone(subId);
|
8425: if (phone == null) return false;
|
8427: return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
|
8440: Phone phone = getPhone(subId);
|
8441: if (phone == null) return false;
|
8443: return phone.getDataEnabledSettings().setAlwaysAllowMmsData(alwaysAllow);
|
8461: for (Phone phone : PhoneFactory.getPhones()) {
|
8462: Phone defaultPhone = phone.getImsPhone();
|
8463: if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
|
8508: Phone phone = getPhone(subId);
|
8509: if (phone != null && phone.getIccCard() != null) {
|
8510: return phone.getIccCard().getIccLockEnabled();
|
8534: Phone phone = getPhone(subId);
|
8535: if (phone == null) {
|
8542: new Pair<Boolean, String>(enabled, password), phone, null);
|
8566: Phone phone = getPhone(subId);
|
8567: if (phone == null) {
|
8574: new Pair<String, String>(oldPassword, newPassword), phone, null);
|
8633: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
8636: Phone phone = getPhone(subId);
|
8637: if (phone == null) {
|
8638: throw new RuntimeException("phone is not available");
|
8643: return phone.getEquivalentHomePlmns();
|
22: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
|
63: import android.telecom.PhoneAccount;
|
64: import android.telecom.PhoneAccountHandle;
|
83: import android.telephony.PhoneCapability;
|
84: import android.telephony.PhoneNumberRange;
|
141: import com.android.internal.telephony.PhoneConfigurationManager;
|
142: import com.android.internal.telephony.PhoneConstantConversions;
|
143: import com.android.internal.telephony.PhoneConstants;
|
144: import com.android.internal.telephony.PhoneFactory;
|
158: import com.android.internal.telephony.imsphone.ImsPhone;
|
159: import com.android.internal.telephony.imsphone.ImsPhoneCallTracker;
|
199: private static final String LOG_TAG = "PhoneInterfaceManager";
|
200: private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
|
298: private static PhoneInterfaceManager sInstance;
|
300: private PhoneGlobals mApp;
|
697: defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
|
724: defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
|
735: defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
|
745: defaultPhone.resetModemConfig(onCompleted);
|
793: defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
|
1031: if (defaultPhone != null) {
|
1032: defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
|
1095: defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
|
1123: defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
|
1329: defaultPhone.rebootModem(onCompleted);
|
1339: PhoneConfigurationManager.getInstance()
|
1349: mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
|
1360: PhoneConfigurationManager.getInstance()
|
1448: defaultPhone.eraseModemConfig(onCompleted);
|
1494: getDefaultPhone().getContext().sendBroadcastAsUser(
|
1640: * Initialize the singleton PhoneInterfaceManager instance.
|
1641: * This is only done once, at startup, from PhoneApp.onCreate().
|
1643: /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
|
1644: synchronized (PhoneInterfaceManager.class) {
|
1646: sInstance = new PhoneInterfaceManager(app);
|
1657: mCM = PhoneGlobals.getInstance().mCM;
|
1658: mImsResolver = PhoneGlobals.getInstance().getImsResolver();
|
1666: mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
|
1674: return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
|
1696: ? getDefaultPhone() : getPhone(subId);
|
1707: return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
|
1725: PackageManager pm = getDefaultPhone().getContext().getPackageManager();
|
1752: PhoneConstants.State state = mCM.getState(subId);
|
1753: if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
|
1812: return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
|
1817: return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
|
1825: final UnlockSim checkSimPin = new UnlockSim(getPhone(subId).getIccCard());
|
1838: final UnlockSim checkSimPuk = new UnlockSim(getPhone(subId).getIccCard());
|
1855: private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
|
1885: mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
|
1890: mResult = PhoneConstants.PIN_OPERATION_ABORTED;
|
1892: mResult = PhoneConstants.PIN_GENERAL_FAILURE;
|
1895: mResult = PhoneConstants.PIN_RESULT_SUCCESS;
|
2103: logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
|
2138: if (defaultPhone != null) {
|
2139: defaultPhone.setRadioPower(turnOn);
|
2283: return PhoneConstantConversions.convertDataState(
|
2284: PhoneConstants.DataState.DISCONNECTED);
|
2356: final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
|
2564: getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
|
2768: Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
2772: Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
2776: Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
2938: public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
|
2967: return getDefaultPhone().needsOtaServiceProvisioning();
|
3002: PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
|
3003: if (phoneAccountHandle == null) {
|
3006: return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
|
3091: SmsController smsController = PhoneFactory.getSmsController();
|
3226: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
3235: defaultPhone.sendDialerSpecialCode(inputCode);
|
3290: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3314: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
|
3410: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3437: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
|
3453: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3532: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3550: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3570: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3585: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3604: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3620: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3639: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3655: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3671: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3691: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3707: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3722: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3738: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3754: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3773: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3792: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3810: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3855: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3885: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3918: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3977: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4146: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4171: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4197: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4223: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4393: return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
|
4400: return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
|
4403: .orElse(PhoneConstants.LTE_ON_CDMA_FALSE);
|
4464: int phoneId = UiccController.getInstance().getPhoneIdFromSlotId(slotIndex);
|
4465: if (phoneId == -1) {
|
4469: return PhoneFactory.getPhone(phoneId);
|
4504: ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
|
4646: ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
|
4937: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
|
4944: return defaultPhone.getPcscfAddress(apnType);
|
5188: getDefaultPhone().setImsRegistrationState(registered);
|
5424: request, messenger, binder, getPhone(subId),
|
5485: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
|
5493: return PhoneFactory.calculatePreferredNetworkType(defaultPhone.getContext(), 0);
|
5695: int phoneId = mSubscriptionController.getPhoneId(subId);
|
5696: if (DBG) log("setUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
|
5774: int phoneId = mSubscriptionController.getPhoneId(subId);
|
5775: if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
|
5803: int phoneId = mSubscriptionController.getPhoneId(subId);
|
5804: if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
|
5924: int phoneId = SubscriptionManager.getPhoneId(subId);
|
5925: UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
|
5932: getPhone(phoneId), pkgName);
|
5949: getPhone(i), pkgName);
|
5960: if (!SubscriptionManager.isValidPhoneId(phoneId)) {
|
5961: loge("phoneId " + phoneId + " is not valid.");
|
5964: UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
|
5966: loge("getCarrierPackageNamesForIntentAndPhone: No UICC");
|
5973: public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
|
5977: UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
|
6340: public int getRadioAccessFamily(int phoneId, String callingPackage) {
|
6351: raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
|
6365: ImsManager.getInstance(defaultPhone.getContext(),
|
6366: defaultPhone.getPhoneId()).setVtSetting(enable);
|
6375: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
|
6387: ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
|
6502: * GSM and the MEID for CDMA phones. Return null if device ID is not available.
|
6546: return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
|
6554: PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
|
6561: return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
|
6657: cleanUpSmsRawTable(getDefaultPhone().getContext());
|
6668: sendEraseModemConfig(getDefaultPhone());
|
6849: * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
|
6852: * PhoneAccount.
|
6855: public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
|
6875: * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
|
6878: * PhoneAccount.
|
6882: PhoneAccountHandle phoneAccountHandle, Uri uri) {
|
6885: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
6888: mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
|
6907: * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
|
6909: * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
|
6912: public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
|
6932: * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
|
6935: * specific PhoneAccount.
|
6939: PhoneAccountHandle phoneAccountHandle, boolean enabled) {
|
6942: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
6945: mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
|
7286: return new TelephonyShellCommand(this, getDefaultPhone().getContext()).exec(
|
7546: if (checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
|
7735: int phoneId = mSubscriptionController.getPhoneId(subId);
|
7736: if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
|
7737: return list.get(phoneId);
|
7871: mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
|
8087: getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
|
8110: PhoneCapability staticCapability =
|
8216: int phoneCount = TelephonyManager.getDefault().getPhoneCount();
|
8218: int[] logicalSlotsMapping = new int[phoneCount];
|
8351: SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
|
8377: return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
|
8394: return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
|
8464: ImsPhone imsPhone = (ImsPhone) defaultPhone;
|
8466: (ImsPhoneCallTracker) imsPhone.getCallTracker();
|
8468: Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
|
8469: + imsPhone.getMsisdn());
|
8603: // * Inherited from PhoneWindowManager *
|
130: import com.android.internal.telephony.DefaultPhoneNotifier;
|
480: getPhoneFromRequest(request).handlePinMmi((String) request.argument)
|
755: getPhoneFromRequest(request).getPreferredNetworkType(onCompleted);
|
783: getPhoneFromRequest(request).setPreferredNetworkType(networkType, onCompleted);
|
807: getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
|
819: getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
|
829: getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
|
836: getPhoneFromRequest(request).getCallForwardingOption(
|
893: getPhoneFromRequest(request).setCallForwardingOption(
|
915: getPhoneFromRequest(request).getCallWaiting(onCompleted);
|
959: getPhoneFromRequest(request).setCallWaiting(isEnable, onCompleted);
|
1011: getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
|
1206: getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
|
1227: getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
|
1243: getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
|
1255: getPhoneFromRequest(request).setCdmaSubscription(subscriptionMode, onCompleted);
|
1370: mPhoneConfigurationManager.addToPhoneStatusCache(id,
|
1458: getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
|
1476: getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
|
1690: return getPhoneFromSubId(request.subId);
|
2024: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
2099: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
2116: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
2118: shutdownRadioUsingPhoneId(i);
|
2641: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
2781: return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
|
2811: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
2844: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
2875: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3016: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3184: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3244: .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3281: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3307: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3364: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3404: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3429: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3529: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3566: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3600: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3635: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3687: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3769: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3851: checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
|
3915: checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
|
4267: && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
|
4301: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
4326: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
4419: return mSubscriptionController.getPhoneId(getDefaultSubscription());
|
4481: return iccOpenLogicalChannelWithPermission(getPhoneFromSubId(subId), callingPackage, aid,
|
4494: return iccOpenLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
|
4529: return iccCloseLogicalChannelWithPermission(getPhoneFromSubId(subId), channel);
|
4536: return iccCloseLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
|
4565: return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
|
4579: getPhoneFromSlotIdOrThrowException(slotIndex), channel, cla, command, p1, p2, p3,
|
4618: return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
|
4634: getPhoneFromSlotIdOrThrowException(slotIndex), callingPackage, cla, command, p1,
|
4719: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
4757: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
|
5131: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5259: .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
5508: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5557: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5602: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5606: return getPhoneFromSubId(subId).getAllowedNetworkTypes(reason);
|
5623: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5627: return getPhoneFromSubId(subId).getEffectiveAllowedNetworkTypes();
|
5649: getPhoneFromSubId(subId).setAllowedNetworkTypes(reason, allowedNetworkTypes);
|
5940: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
6004: enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
|
6010: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
6090: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
|
6117: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6140: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6349: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
6399: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6418: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6555: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
|
6556: callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
|
6569: enforceReadPrivilegedPermission("getPhoneAccountHandleForSubscriptionId, "
|
6793: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7320: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7472: TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
|
7517: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
7645: slot.getPhoneId(),
|
7786: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7794: return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
|
7803: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
7843: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7870: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
8051: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8086: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
|
8111: mPhoneConfigurationManager.getStaticPhoneCapability();
|
8151: mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
|
8191: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8198: return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
|
8207: metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
|
8221: if (SubscriptionManager.isValidPhoneId(slotInfos[i].getLogicalSlotIdx())) {
|
8337: SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
|
8465: ImsPhoneCallTracker imsPhoneCallTracker =
|
8467: imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
|
8631: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
android.googlesource.com/platform/superproject:frameworks/opt/telephony/src/java/com/android/internal/telephony/Phone.java: [ master, ] |
---|
119: public abstract class Phone extends Handler implements PhoneInternalInterface {
|
505: protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
|
522: protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
|
331: protected Phone mImsPhone = null;
|
601: public void createImsPhone() {
|
3621: public Phone getImsPhone() {
|
4272: public Phone getDefaultPhone() {
|
196: protected static final int EVENT_UPDATE_PHONE_OBJECT = 42;
|
297: protected boolean mIsPhoneInEcmState = false;
|
328: protected int mPhoneId;
|
445: public String getPhoneName() {
|
449: protected void setPhoneName(String name) {
|
1811: public void updatePhoneObject(int voiceRadioTech) {
|
2743: public abstract int getPhoneType();
|
3744: public int getPhoneId() {
|
3752: public int getVoicePhoneServiceState() {
|
109: * A base implementation for the com.android.internal.telephony.Phone interface.
|
111: * Note that implementations of Phone.java are expected to be used
|
120: private static final String LOG_TAG = "Phone";
|
245: * This method is invoked when the Phone exits Emergency Callback Mode.
|
295: // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and
|
440: * Returns a string identifier for this phone interface for parties
|
441: * outside the phone app process.
|
496: * Constructs a Phone in normal (non-unit test) mode.
|
507: this(name, notifier, context, ci, unitTestMode, SubscriptionManager.DEFAULT_PHONE_INDEX,
|
512: * Constructs a Phone in normal (non-unit test) mode.
|
520: * @param phoneId the phone-id of this phone.
|
548: * (i.e. voice) phone calls over the telephony network, and is allowed
|
575: if (getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
|
590: if (getPhoneType() != PhoneConstants.PHONE_TYPE_SIP) {
|
602: if (getPhoneType() == PhoneConstants.PHONE_TYPE_SIP) {
|
606: synchronized(Phone.lockForRadioTechnologyChange) {
|
669: // messages to be handled whether or not the phone is being destroyed
|
671: // resources of the phone being destroyed
|
791: Phone imsPhone = mImsPhone;
|
830: * Gets the context for the phone, as set at initialization time.
|
886: * Subclasses of Phone probably want to replace this with a
|
912: * Subclasses of Phone probably want to replace this with a
|
936: * Subclasses of Phone probably want to replace this with a
|
948: * Notify the phone that an SMS has been sent. This will be used determine if the SMS was sent
|
962: * Determine if the Phone has recently sent an emergency SMS and is still in the interval of
|
1003: protected void migrateFrom(Phone from) {
|
1016: // The emergency state of IMS phone will be cleared in ImsPhone#notifySrvccState after
|
1079: * Connection.getCall() == Phone.getRingingCall()
|
1099: * Notifies when phone's video capabilities changes <p>
|
1104: * AsyncResult.result = true if phone supports video calling <p>
|
1243: * Example: If Phone.dial is called with "*#31#", then the app will
|
1566: * For unit tests; don't send notifications to "Phone"
|
1583: * Subclasses of Phone probably want to replace this with a
|
1688: // no need for regular phone
|
1692: * Subclasses of Phone probably want to replace this with a
|
1703: * If this is a simulated phone interface, returns a SimulatedRadioControl.
|
1717: * the thread that originally obtained this Phone instance.
|
1722: "com.android.internal.telephony.Phone must be used from within one thread");
|
1771: * If the phone has an active call and call waiting occurs,
|
1772: * then the phone state is RINGING not OFFHOOK
|
1781: * Retrieves the IccFileHandler of the Phone instance
|
1800: * Retrieves the Handler of the Phone instance
|
1807: * Update the phone object if the voice radio technology has changed
|
1815: * Retrieves the ServiceStateTracker of the phone instance.
|
1823: * Retrieves the EmergencyNumberTracker of the phone instance.
|
1845: * Retrieves the DeviceStateMonitor of the phone instance.
|
1852: * Retrieves the DisplayInfoController of the phone instance.
|
1900: * Returns the ICC card interface for this phone, or null
|
1906: //throw new Exception("getIccCard Shouldn't be called from Phone");
|
2103: if (getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
2342: * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
|
2343: * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
|
2344: * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
|
2345: * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
|
2356: * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
|
2357: * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
|
2358: * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
|
2359: * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
|
2648: // This property is used to handle phone process crashes, and is the same for CDMA and IMS
|
2655: * @return {@code true} if we are in emergency call back mode. This is a period where the phone
|
2675: * @return true if this Phone is in an emergency call that caused emergency callback mode to be
|
2683: * Set whether or not this Phone has an active emergency call that was placed during emergency
|
2739: * Return a numerical identifier for the phone radio interface.
|
2740: * @return PHONE_TYPE_XXX as defined above.
|
2753: /** sets the voice mail count of the phone and notifies listeners. */
|
3442: * Subclasses of Phone probably want to replace this with a
|
3460: * Notify registrants if phone is video capable.
|
3574: Rlog.e(LOG_TAG, "Error! This function should never be executed, inactive Phone.");
|
3587: * Gets the Uicc card corresponding to this phone.
|
3588: * @return the UiccCard object corresponding to the phone ID.
|
3618: * Return an instance of a IMS phone
|
3741: * Returns the phone id.
|
3753: Phone imsPhone = mImsPhone;
|
3827: Phone imsPhone = mImsPhone;
|
3846: Phone imsPhone = mImsPhone;
|
3860: Phone imsPhone = mImsPhone;
|
3875: Phone imsPhone = mImsPhone;
|
3885: * @return the IMS MmTel Registration technology for this Phone, defined in
|
3889: Phone imsPhone = mImsPhone;
|
3899: * Get the IMS MmTel Registration technology for this Phone, defined in
|
3903: Phone imsPhone = mImsPhone;
|
3912: * Asynchronously get the IMS MmTel Registration state for this Phone.
|
3915: Phone imsPhone = mImsPhone;
|
3973: * Set phone radio capability
|
3975: * @param rc the phone radio capability defined in
|
3984: * Get phone radio access family
|
4004: * Get phone radio capability
|
4018: * @param rc the phone radio capability currently in effect for this phone.
|
4051: * Registers the handler when phone radio capability is changed.
|
4062: * Unregister for notifications when phone radio type and access technology is changed.
|
4097: * Determines if video calling is enabled for the phone.
|
4103: Phone imsPhone = mImsPhone;
|
4227: public static void checkWfcWifiOnlyModeBeforeDial(Phone imsPhone, int phoneId, Context context)
|
4267: * This function returns the parent phone of the current phone. It is applicable
|
4268: * only for IMS phone (function is overridden by ImsPhone). For others the phone
|
4306: * none of the phone is in service, and one of them has the capability to make the emergency
|
4313: for (Phone phone : PhoneFactory.getPhones()) {
|
4314: if (phone != null) {
|
4315: ServiceState ss = phone.getServiceStateTracker().getServiceState();
|
4316: // One of the phone is in service, hence the device is not emergency call only.
|
4378: /** Returns the {@link VoiceCallSessionStats} for this phone ID. */
|
4383: /** Sets the {@link VoiceCallSessionStats} mock for this phone ID during unit testing. */
|
4409: pw.println("Phone: subId=" + getSubId());
|
4584: pw.println("Phone Local Log: ");
|
50: import android.telephony.PhoneStateListener;
|
79: import com.android.internal.telephony.imsphone.ImsPhoneCall;
|
113: * originally called PhoneFactory to obtain the interface.
|
420: * PhoneNotifier is an abstraction for all system-wide
|
425: protected PhoneNotifier mNotifier;
|
454: * Retrieves Nai for phones. Returns null if Nai is not set.
|
523: boolean unitTestMode, int phoneId,
|
525: mPhoneId = phoneId;
|
564: * By default old phones won't have the property set but do generate
|
598: * Start setup of ImsPhone, which will start trying to connect to the ImsResolver. Will not be
|
607: if (mImsPhone == null) {
|
608: mImsPhone = PhoneFactory.makeImsPhone(mNotifier, this);
|
609: CallManager.getInstance().registerPhone(mImsPhone);
|
610: mImsPhone.registerForSilentRedial(
|
685: PhoneConstants.State state = getState();
|
687: && ((state == PhoneConstants.State.RINGING) ||
|
688: (state == PhoneConstants.State.IDLE))) {
|
699: if (getState() == PhoneConstants.State.RINGING) {
|
717: if (mImsPhone != null) {
|
719: mImsPhone.notifyRedialConnectionChanged(cn);
|
723: if (mImsPhone != null) {
|
724: mImsPhone.notifyRedialConnectionChanged(null);
|
798: if (imsPhone != null) {
|
799: conn = imsPhone.getHandoverConnection();
|
800: migrateFrom(imsPhone);
|
802: Rlog.d(LOG_TAG, "HANDOVER_STARTED: mImsPhone null");
|
807: if (imsPhone != null) {
|
808: imsPhone.notifySrvccState(srvccState);
|
810: Rlog.d(LOG_TAG, "HANDOVER_COMPLETED: mImsPhone null");
|
863: * {@link PhoneConstants.State} which can be obtained using the {@link PhoneStateListener}
|
1033: // Since CallManager has already registered with both CS and IMS phones,
|
1778: public abstract PhoneConstants.State getState();
|
1976: * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged
|
1977: * PhoneStateListener.onCellInfoChanged} will be invoked.
|
1992: * available on this interface. Use PhoneStateNotifier or similar instead.
|
2098: * available on this interface. Use PhoneStateNotifier or similar instead.
|
2140: * interface. Use <code>PhoneStateNotifier</code> or an equivalent.
|
2573: public PhoneConstants.DataState getDataConnectionState(String apnType) {
|
2574: return PhoneConstants.DataState.DISCONNECTED;
|
2649: // phones
|
2729: if (mImsPhone != null) {
|
2730: isPresent = isVideoCallOrConference(mImsPhone.getForegroundCall()) ||
|
2731: isVideoCallOrConference(mImsPhone.getBackgroundCall()) ||
|
2732: isVideoCallOrConference(mImsPhone.getRingingCall());
|
2874: * Retrieves the MIN for CDMA phones.
|
2890: * Retrieves PRL Version for CDMA phones
|
3536: * Retrieves the MSISDN from the UICC. For GSM/UMTS phones, this is equivalent to
|
3537: * {@link #getLine1Number()}. For CDMA phones, {@link #getLine1Number()} returns
|
3538: * the MDN, so this method is provided to return the MSISDN on CDMA/LTE phones.
|
3546: * Retrieves the EF_PNN from the UICC For GSM/UMTS phones.
|
3555: * {@link android.telephony.PhoneStateListener} instead.
|
3558: public PhoneConstants.DataState getDataConnectionState() {
|
3559: return getDataConnectionState(PhoneConstants.APN_TYPE_DEFAULT);
|
3573: // This function should be overridden by class GsmCdmaPhone.
|
3622: return mImsPhone;
|
3688: * Return if UT capability of ImsPhone is enabled or not
|
3692: if (mImsPhone != null) {
|
3693: return mImsPhone.isUtEnabled();
|
3712: // dialInternal shall be overriden by GsmCdmaPhone
|
3717: * This function is for CSFB SS. GsmCdmaPhone overrides this function.
|
3749: * Return the service state of mImsPhone if it is STATE_IN_SERVICE
|
3754: if (imsPhone != null
|
3755: && imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
|
3829: if (imsPhone != null) {
|
3830: isImsRegistered = imsPhone.isImsRegistered();
|
3848: if (imsPhone != null) {
|
3849: isWifiCallingEnabled = imsPhone.isWifiCallingEnabled();
|
3862: if (imsPhone != null) {
|
3863: isAvailable = imsPhone.isImsCapabilityAvailable(capability, regTech);
|
3877: if (imsPhone != null) {
|
3878: isVolteEnabled = imsPhone.isVolteEnabled();
|
3891: if (imsPhone != null) {
|
3892: regTech = imsPhone.getImsRegistrationTech();
|
3904: if (imsPhone != null) {
|
3905: imsPhone.getImsRegistrationTech(callback);
|
3916: if (imsPhone != null) {
|
3917: imsPhone.getImsRegistrationState(callback);
|
4034: int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
|
4045: int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
|
4089: if (mImsPhone == null) {
|
4093: return mImsPhone.isImsAvailable();
|
4104: if (imsPhone != null) {
|
4105: return imsPhone.isVideoEnabled();
|
4229: if (imsPhone == null || !imsPhone.isWifiCallingEnabled()) {
|
4230: ImsManager imsManager = ImsManager.getInstance(context, phoneId);
|
4448: if (mImsPhone != null) {
|
4450: mImsPhone.dump(fd, pw, args);
|
421: * state change notification. DefaultPhoneNotifier is
|
498: * @param notifier An instance of DefaultPhoneNotifier,
|
514: * @param notifier An instance of DefaultPhoneNotifier,
|
2538: // This function is added to send the notification to DefaultPhoneNotifier.
|
2660: return mIsPhoneInEcmState;
|
2671: mIsPhoneInEcmState = isInEcm;
|
2715: if (call instanceof ImsPhoneCall) {
|
2716: ImsPhoneCall imsPhoneCall = (ImsPhoneCall) call;
|
2717: ImsCall imsCall = imsPhoneCall.getImsCall();
|
2771: mPhoneId, UiccController.APP_FAM_3GPP);
|
3512: * A fucntion of type getPhoneProp(propType) where propType is an
|
3592: return mUiccController.getUiccCard(mPhoneId);
|
3737: return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
|
3745: return mPhoneId;
|
4076: ImsManager imsManager = ImsManager.getInstance(mContext, mPhoneId);
|
4410: pw.println(" mPhoneId=" + mPhoneId);
|
4437: pw.println(" getPhoneName()=" + getPhoneName());
|
4438: pw.println(" getPhoneType()=" + getPhoneType());
|
android.googlesource.com/platform/frameworks/opt/telephony:src/java/com/android/internal/telephony/Phone.java: [ master, ] |
---|
132: public abstract class Phone extends Handler implements PhoneInternalInterface {
|
520: protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
|
537: protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
|
345: protected Phone mImsPhone = null;
|
619: public void createImsPhone() {
|
3791: public Phone getImsPhone() {
|
4465: public Phone getDefaultPhone() {
|
209: protected static final int EVENT_UPDATE_PHONE_OBJECT = 42;
|
311: protected boolean mIsPhoneInEcmState = false;
|
342: protected int mPhoneId;
|
460: public String getPhoneName() {
|
464: protected void setPhoneName(String name) {
|
1843: public void updatePhoneObject(int voiceRadioTech) {
|
2821: public abstract int getPhoneType();
|
3914: public int getPhoneId() {
|
3922: public int getVoicePhoneServiceState() {
|
122: * A base implementation for the com.android.internal.telephony.Phone interface.
|
124: * Note that implementations of Phone.java are expected to be used
|
133: private static final String LOG_TAG = "Phone";
|
259: * This method is invoked when the Phone exits Emergency Callback Mode.
|
309: // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and
|
455: * Returns a string identifier for this phone interface for parties
|
456: * outside the phone app process.
|
511: * Constructs a Phone in normal (non-unit test) mode.
|
522: this(name, notifier, context, ci, unitTestMode, SubscriptionManager.DEFAULT_PHONE_INDEX,
|
527: * Constructs a Phone in normal (non-unit test) mode.
|
535: * @param phoneId the phone-id of this phone.
|
563: * (i.e. voice) phone calls over the telephony network, and is allowed
|
593: if (getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
|
608: if (getPhoneType() != PhoneConstants.PHONE_TYPE_SIP) {
|
620: if (getPhoneType() == PhoneConstants.PHONE_TYPE_SIP) {
|
624: synchronized(Phone.lockForRadioTechnologyChange) {
|
687: // messages to be handled whether or not the phone is being destroyed
|
689: // resources of the phone being destroyed
|
812: Phone imsPhone = mImsPhone;
|
851: * Gets the context for the phone, as set at initialization time.
|
907: * Subclasses of Phone probably want to replace this with a
|
933: * Subclasses of Phone probably want to replace this with a
|
957: * Subclasses of Phone probably want to replace this with a
|
969: * Notify the phone that an SMS has been sent. This will be used determine if the SMS was sent
|
983: * Determine if the Phone has recently sent an emergency SMS and is still in the interval of
|
1024: protected void migrateFrom(Phone from) {
|
1037: // The emergency state of IMS phone will be cleared in ImsPhone#notifySrvccState after
|
1100: * Connection.getCall() == Phone.getRingingCall()
|
1120: * Notifies when phone's video capabilities changes <p>
|
1125: * AsyncResult.result = true if phone supports video calling <p>
|
1264: * Example: If Phone.dial is called with "*#31#", then the app will
|
1587: * For unit tests; don't send notifications to "Phone"
|
1604: * Subclasses of Phone probably want to replace this with a
|
1709: // no need for regular phone
|
1713: * Subclasses of Phone probably want to replace this with a
|
1725: * we send out a final ServiceState update when a phone's subId becomes invalid.
|
1735: * If this is a simulated phone interface, returns a SimulatedRadioControl.
|
1749: * the thread that originally obtained this Phone instance.
|
1754: "com.android.internal.telephony.Phone must be used from within one thread");
|
1803: * If the phone has an active call and call waiting occurs,
|
1804: * then the phone state is RINGING not OFFHOOK
|
1813: * Retrieves the IccFileHandler of the Phone instance
|
1832: * Retrieves the Handler of the Phone instance
|
1839: * Update the phone object if the voice radio technology has changed
|
1847: * Retrieves the ServiceStateTracker of the phone instance.
|
1855: * Retrieves the EmergencyNumberTracker of the phone instance.
|
1877: * Retrieves the DeviceStateMonitor of the phone instance.
|
1884: * Retrieves the DisplayInfoController of the phone instance.
|
1932: * Returns the ICC card interface for this phone, or null
|
1938: //throw new Exception("getIccCard Shouldn't be called from Phone");
|
2135: if (getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
2415: * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
|
2416: * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
|
2417: * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
|
2418: * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
|
2429: * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
|
2430: * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
|
2431: * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
|
2432: * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
|
2726: // This property is used to handle phone process crashes, and is the same for CDMA and IMS
|
2733: * @return {@code true} if we are in emergency call back mode. This is a period where the phone
|
2753: * @return true if this Phone is in an emergency call that caused emergency callback mode to be
|
2761: * Set whether or not this Phone has an active emergency call that was placed during emergency
|
2817: * Return a numerical identifier for the phone radio interface.
|
2818: * @return PHONE_TYPE_XXX as defined above.
|
2831: /** sets the voice mail count of the phone and notifies listeners. */
|
3482: // Populate the iccid, imei and phone number in the provisioning url.
|
3491: phoneNumber /* Phone number */);
|
3612: * Subclasses of Phone probably want to replace this with a
|
3630: * Notify registrants if phone is video capable.
|
3744: Rlog.e(LOG_TAG, "Error! This function should never be executed, inactive Phone.");
|
3757: * Gets the Uicc card corresponding to this phone.
|
3758: * @return the UiccCard object corresponding to the phone ID.
|
3788: * Return an instance of a IMS phone
|
3911: * Returns the phone id.
|
3923: Phone imsPhone = mImsPhone;
|
3997: Phone imsPhone = mImsPhone;
|
4016: Phone imsPhone = mImsPhone;
|
4030: Phone imsPhone = mImsPhone;
|
4045: Phone imsPhone = mImsPhone;
|
4055: * @return the IMS MmTel Registration technology for this Phone, defined in
|
4059: Phone imsPhone = mImsPhone;
|
4069: * Get the IMS MmTel Registration technology for this Phone, defined in
|
4073: Phone imsPhone = mImsPhone;
|
4082: * Asynchronously get the IMS MmTel Registration state for this Phone.
|
4085: Phone imsPhone = mImsPhone;
|
4143: * Set phone radio capability
|
4145: * @param rc the phone radio capability defined in
|
4154: * Get phone radio access family
|
4174: * Get phone radio capability
|
4188: * @param rc the phone radio capability currently in effect for this phone.
|
4203: // When radio capability switch is done, query IMEI value and update it in Phone objects
|
4229: * Registers the handler when phone radio capability is changed.
|
4240: * Unregister for notifications when phone radio type and access technology is changed.
|
4275: * Determines if video calling is enabled for the phone.
|
4281: Phone imsPhone = mImsPhone;
|
4420: public static void checkWfcWifiOnlyModeBeforeDial(Phone imsPhone, int phoneId, Context context)
|
4460: * This function returns the parent phone of the current phone. It is applicable
|
4461: * only for IMS phone (function is overridden by ImsPhone). For others the phone
|
4499: * none of the phone is in service, and one of them has the capability to make the emergency
|
4506: for (Phone phone : PhoneFactory.getPhones()) {
|
4507: if (phone != null) {
|
4508: ServiceState ss = phone.getServiceStateTracker().getServiceState();
|
4509: // One of the phone is in service, hence the device is not emergency call only.
|
4571: /** Returns the {@link VoiceCallSessionStats} for this phone ID. */
|
4576: /** Sets the {@link VoiceCallSessionStats} mock for this phone ID during unit testing. */
|
4582: /** Returns the {@link SmsStats} for this phone ID. */
|
4587: /** Sets the {@link SmsStats} mock for this phone ID during unit testing. */
|
4613: pw.println("Phone: subId=" + getSubId());
|
4788: pw.println("Phone Local Log: ");
|
53: import android.telephony.PhoneStateListener;
|
83: import com.android.internal.telephony.imsphone.ImsPhoneCall;
|
126: * originally called PhoneFactory to obtain the interface.
|
434: * PhoneNotifier is an abstraction for all system-wide
|
439: protected PhoneNotifier mNotifier;
|
469: * Retrieves Nai for phones. Returns null if Nai is not set.
|
538: boolean unitTestMode, int phoneId,
|
540: mPhoneId = phoneId;
|
579: * By default old phones won't have the property set but do generate
|
616: * Start setup of ImsPhone, which will start trying to connect to the ImsResolver. Will not be
|
625: if (mImsPhone == null) {
|
626: mImsPhone = PhoneFactory.makeImsPhone(mNotifier, this);
|
627: CallManager.getInstance().registerPhone(mImsPhone);
|
628: mImsPhone.registerForSilentRedial(
|
703: PhoneConstants.State state = getState();
|
705: && ((state == PhoneConstants.State.RINGING) ||
|
706: (state == PhoneConstants.State.IDLE))) {
|
717: if (getState() == PhoneConstants.State.RINGING) {
|
738: if (mImsPhone != null) {
|
740: mImsPhone.notifyRedialConnectionChanged(cn);
|
744: if (mImsPhone != null) {
|
745: mImsPhone.notifyRedialConnectionChanged(null);
|
819: if (imsPhone != null) {
|
820: conn = imsPhone.getHandoverConnection();
|
821: migrateFrom(imsPhone);
|
823: Rlog.d(LOG_TAG, "HANDOVER_STARTED: mImsPhone null");
|
828: if (imsPhone != null) {
|
829: imsPhone.notifySrvccState(srvccState);
|
831: Rlog.d(LOG_TAG, "HANDOVER_COMPLETED: mImsPhone null");
|
884: * {@link PhoneConstants.State} which can be obtained using the {@link PhoneStateListener}
|
1054: // Since CallManager has already registered with both CS and IMS phones,
|
1810: public abstract PhoneConstants.State getState();
|
2008: * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged
|
2009: * PhoneStateListener.onCellInfoChanged} will be invoked.
|
2024: * available on this interface. Use PhoneStateNotifier or similar instead.
|
2130: * available on this interface. Use PhoneStateNotifier or similar instead.
|
2181: * interface. Use <code>PhoneStateNotifier</code> or an equivalent.
|
2655: public PhoneConstants.DataState getDataConnectionState(String apnType) {
|
2656: return PhoneConstants.DataState.DISCONNECTED;
|
2727: // phones
|
2807: if (mImsPhone != null) {
|
2808: isPresent = isVideoCallOrConference(mImsPhone.getForegroundCall()) ||
|
2809: isVideoCallOrConference(mImsPhone.getBackgroundCall()) ||
|
2810: isVideoCallOrConference(mImsPhone.getRingingCall());
|
2952: * Retrieves the MIN for CDMA phones.
|
2968: * Retrieves PRL Version for CDMA phones
|
3484: String phoneNumber = getLine1Number();
|
3485: if (TextUtils.isEmpty(phoneNumber)) {
|
3486: phoneNumber = "0000000000";
|
3706: * Retrieves the MSISDN from the UICC. For GSM/UMTS phones, this is equivalent to
|
3707: * {@link #getLine1Number()}. For CDMA phones, {@link #getLine1Number()} returns
|
3708: * the MDN, so this method is provided to return the MSISDN on CDMA/LTE phones.
|
3716: * Retrieves the EF_PNN from the UICC For GSM/UMTS phones.
|
3725: * {@link android.telephony.PhoneStateListener} instead.
|
3728: public PhoneConstants.DataState getDataConnectionState() {
|
3729: return getDataConnectionState(PhoneConstants.APN_TYPE_DEFAULT);
|
3743: // This function should be overridden by class GsmCdmaPhone.
|
3792: return mImsPhone;
|
3858: * Return if UT capability of ImsPhone is enabled or not
|
3862: if (mImsPhone != null) {
|
3863: return mImsPhone.isUtEnabled();
|
3882: // dialInternal shall be overriden by GsmCdmaPhone
|
3887: * This function is for CSFB SS. GsmCdmaPhone overrides this function.
|
3919: * Return the service state of mImsPhone if it is STATE_IN_SERVICE
|
3924: if (imsPhone != null
|
3925: && imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
|
3999: if (imsPhone != null) {
|
4000: isImsRegistered = imsPhone.isImsRegistered();
|
4018: if (imsPhone != null) {
|
4019: isWifiCallingEnabled = imsPhone.isWifiCallingEnabled();
|
4032: if (imsPhone != null) {
|
4033: isAvailable = imsPhone.isImsCapabilityAvailable(capability, regTech);
|
4047: if (imsPhone != null) {
|
4048: isVolteEnabled = imsPhone.isVolteEnabled();
|
4061: if (imsPhone != null) {
|
4062: regTech = imsPhone.getImsRegistrationTech();
|
4074: if (imsPhone != null) {
|
4075: imsPhone.getImsRegistrationTech(callback);
|
4086: if (imsPhone != null) {
|
4087: imsPhone.getImsRegistrationState(callback);
|
4212: int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
|
4223: int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
|
4267: if (mImsPhone == null) {
|
4271: return mImsPhone.isImsAvailable();
|
4282: if (imsPhone != null) {
|
4283: return imsPhone.isVideoEnabled();
|
4422: if (imsPhone == null || !imsPhone.isWifiCallingEnabled()) {
|
4423: ImsManager imsManager = ImsManager.getInstance(context, phoneId);
|
4652: if (mImsPhone != null) {
|
4654: mImsPhone.dump(fd, pw, args);
|
435: * state change notification. DefaultPhoneNotifier is
|
513: * @param notifier An instance of DefaultPhoneNotifier,
|
529: * @param notifier An instance of DefaultPhoneNotifier,
|
2620: // This function is added to send the notification to DefaultPhoneNotifier.
|
2738: return mIsPhoneInEcmState;
|
2749: mIsPhoneInEcmState = isInEcm;
|
2793: if (call instanceof ImsPhoneCall) {
|
2794: ImsPhoneCall imsPhoneCall = (ImsPhoneCall) call;
|
2795: ImsCall imsCall = imsPhoneCall.getImsCall();
|
2849: mPhoneId, UiccController.APP_FAM_3GPP);
|
3682: * A fucntion of type getPhoneProp(propType) where propType is an
|
3762: return mUiccController.getUiccCard(mPhoneId);
|
3907: return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
|
3915: return mPhoneId;
|
4254: ImsManager imsManager = ImsManager.getInstance(mContext, mPhoneId);
|
4614: pw.println(" mPhoneId=" + mPhoneId);
|
4641: pw.println(" getPhoneName()=" + getPhoneName());
|
4642: pw.println(" getPhoneType()=" + getPhoneType());
|
github.com/grpc/grpc:examples/python/async_streaming/phone.proto: [ master, ] |
---|
49: service Phone {
|
39: string phone_number = 1;
|
50: // Makes a phone call and communicate states via a stream.
|
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/grpc/grpc:examples/python/async_streaming/phone_pb2_grpc.py: [ master, ] |
---|
48: class Phone(object):
|
4: import phone_pb2 as phone__pb2
|
7: class PhoneStub(object):
|
23: class PhoneServicer(object):
|
34: def add_PhoneServicer_to_server(servicer, server):
|
17: '/grpc.testing.Phone/StreamCall',
|
18: request_serializer=phone__pb2.StreamCallRequest.SerializeToString,
|
19: response_deserializer=phone__pb2.StreamCallResponse.FromString,
|
27: """Makes a phone call and communicate states via a stream.
|
38: request_deserializer=phone__pb2.StreamCallRequest.FromString,
|
39: response_serializer=phone__pb2.StreamCallResponse.SerializeToString,
|
43: 'grpc.testing.Phone', rpc_method_handlers)
|
61: return grpc.experimental.stream_stream(request_iterator, target, '/grpc.testing.Phone/StreamCall',
|
62: phone__pb2.StreamCallRequest.SerializeToString,
|
63: phone__pb2.StreamCallResponse.FromString,
|
github.com/sparkfun/MG2639_Cellular_Shield:Libraries/Arduino/src/util/MG2639_Phone.cpp: [ master, ] |
---|
180: MG2639_Phone phone;
|
30: MG2639_Phone::MG2639_Phone()
|
2: MG2639_Phone.cpp
|
3: MG2639 Cellular Shield Library - Phone Functionality Source
|
8: This library within SFE_MG2639_CellShield defines phone-call functions of
|
9: the MG2639. MG2639_Phone a friend class of MG2639_Cell is defined, with member
|
23: #include "MG2639_Phone.h"
|
38: bool MG2639_Phone::available()
|
50: int8_t MG2639_Phone::status()
|
92: int8_t MG2639_Phone::callerID(char * phoneNumber)
|
121: int8_t MG2639_Phone::answer()
|
132: int8_t MG2639_Phone::hangUp()
|
144: int8_t MG2639_Phone::dial(char * phoneNumber)
|
159: int8_t MG2639_Phone::dialLast()
|
167: int8_t MG2639_Phone::setAudioChannel(audio_channel channel)
|
110: strncpy(phoneNumber, start + 1, (end - start - 1));
|
151: sprintf(temp, "%s%s;", DIAL, phoneNumber);
|
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/incubator-retired-ripple:lib/client/ui/plugins/phone.js: [ master, ] |
---|
22: Phone = ripple('platform/webworks.handset/2.0.0/client/Phone'),
|
30: function _firePhoneLogEvents(type, number) {
|
26: eventSelect = document.getElementById("phone-event-types"),
|
27: eventErrorContainer = document.getElementById("phone-event-error-container"),
|
28: eventErrorSelect = document.getElementById("phone-event-error-types");
|
31: if (type === Phone.CB_CALL_INITIATED ||
|
32: type === Phone.CB_CALL_ANSWERED) {
|
39: } else if (type === Phone.CB_CALL_ENDED_BYUSER ||
|
40: type === Phone.CB_CALL_FAILED) {
|
51: if (type === Phone.CB_CALL_INITIATED ||
|
52: type === Phone.CB_CALL_CONNECTED ||
|
53: type === Phone.CB_CALL_CONFERENCECALL_ESTABLISHED ||
|
54: type === Phone.CB_CALL_DIRECTCONNECT_CONNECTED ||
|
55: type === Phone.CB_CALL_ANSWERED) {
|
65: } else if (type === Phone.CB_CALL_ENDED_BYUSER ||
|
66: type === Phone.CB_CALL_FAILED ||
|
67: type === Phone.CB_CALL_DISCONNECTED ||
|
68: type === Phone.CB_CONFERENCECALL_DISCONNECTED ||
|
69: type === Phone.CB_CALL_DIRECTCONNECT_DISCONNECTED) {
|
78: domId: "phone-container",
|
83: utils.forEach(Phone, function (value, prop) {
|
99: document.getElementById("phone-event-types").addEventListener("change", function () {
|
100: eventErrorContainer.setAttribute("style", parseInt(eventSelect.value, 10) === Phone.CB_CALL_FAILED ? "" : "display: none");
|
103: document.getElementById("phone-logs-clear").addEventListener("click", function () {
|
107: document.getElementById("phone-event-send").addEventListener("click", function () {
|
109: error = type === Phone.CB_CALL_FAILED ? eventErrorSelect.value : undefined,
|
110: callId = document.getElementById("phone-call-id").value;
|
33: event.trigger("PhoneCallLogAdded", [{
|
41: event.trigger("PhoneCallLogAdded", [{
|
56: event.trigger("PhoneCallInitiated", [{
|
70: event.trigger("PhoneCallEnded", [{
|
104: event.trigger("PhoneCallLogReset");
|
|