android.googlesource.com/platform/packages/services/Telephony:src/com/android/phone/PhoneInterfaceManager.java: [ master, ] |
---|
482: public Phone phone;
|
17: package com.android.phone;
|
245: public class PhoneInterfaceManager extends ITelephony.Stub {
|
2322: private PhoneInterfaceManager(PhoneGlobals app) {
|
2341: private Phone getDefaultPhone() {
|
2375: private Phone getPhone(int subId) {
|
3068: public String getNetworkCountryIsoForPhone(int phoneId) {
|
6772: public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
|
6800: public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
|
7387: public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
|
381: private PhoneConfigurationManager mPhoneConfigurationManager;
|
2355: private Phone getPhoneFromRequest(MainThreadRequest request) {
|
2363: private Phone getPhoneFromSubId(int subId) {
|
2520: private final int mPhoneId;
|
2799: private void shutdownRadioUsingPhoneId(int phoneId) {
|
3522: public int getActivePhoneType() {
|
3527: public int getActivePhoneTypeForSlot(int slotIndex) {
|
4661: private void checkModifyPhoneStatePermission(int subId, String message) {
|
5207: private Phone getPhoneFromSlotPortIndexOrThrowException(int slotIndex, int portIndex) {
|
5230: private Phone getPhoneFromValidIccLogicalChannelRequest(
|
6777: private int checkCarrierPrivilegesForPackageAnyPhoneWithPermission(String pkgName) {
|
6828: public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
|
7520: public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
|
7530: public int getSubIdForPhoneAccountHandle(
|
7545: public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
|
10144: private boolean isAnyPhoneInEmergencyState() {
|
11017: public PhoneCapability getPhoneCapability() {
|
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_CDMA;
|
22: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_GSM;
|
23: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
|
171: import com.android.internal.telephony.Phone;
|
209: import com.android.phone.callcomposer.CallComposerPictureManager;
|
210: import com.android.phone.callcomposer.CallComposerPictureTransfer;
|
211: import com.android.phone.callcomposer.ImageData;
|
212: import com.android.phone.settings.PickSmsSubscriptionActivity;
|
213: import com.android.phone.vvm.PhoneAccountHandleConverter;
|
214: import com.android.phone.vvm.RemoteVvmTaskManager;
|
215: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
|
216: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
|
481: // In cases where subId is unavailable, the caller needs to specify the phone.
|
490: MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
|
492: if (phone != null) {
|
493: this.phone = phone;
|
521: * A handler that processes messages on the main thread in the phone process. Since many
|
522: * of the Phone calls are not thread safe this is needed to shuttle the requests from the
|
523: * inbound binder threads to the main thread in the phone process. The Binder thread
|
540: final Phone defaultPhone = getDefaultPhone();
|
545: final Phone phone = getPhoneFromRequest(request);
|
564: request.result = phone != null
|
565: ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
|
576: final Phone phone = getPhoneFromRequest(request);
|
577: request.result = phone != null ?
|
890: Phone phone = getPhoneFromRequest(request);
|
891: if (phone != null) {
|
892: phone.isNrDualConnectivityEnabled(onCompleted, request.workSource);
|
894: loge("isNRDualConnectivityEnabled: No phone object");
|
930: Phone phone = getPhoneFromRequest(request);
|
931: if (phone != null) {
|
932: phone.isVoNrEnabled(onCompleted, request.workSource);
|
934: loge("isVoNrEnabled: No phone object");
|
969: Phone phone = getPhoneFromRequest(request);
|
970: if (phone != null) {
|
971: phone.setNrDualConnectivityState((int) request.argument, onCompleted,
|
974: loge("enableNrDualConnectivity: No phone object");
|
1017: Phone phone = getPhoneFromRequest(request);
|
1018: if (phone != null) {
|
1019: phone.setVoNrEnabled((boolean) request.argument, onCompleted,
|
1022: loge("setVoNrEnabled: No phone object");
|
1150: request.phone.getCallForwardingOption(callForwardingReason, onCompleted);
|
1214: request.phone.setCallForwardingOption(
|
1651: request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
|
1665: request.phone.requestCellInfoUpdate(request.workSource,
|
1693: Phone phone = getPhoneFromRequest(request);
|
1694: phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
|
1703: Phone phone = getPhoneFromRequest(request);
|
1704: request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
|
1727: .enablePhone(request.phone, enable, onCompleted);
|
1733: int phoneId = request.phone.getPhoneId();
|
1749: .getPhoneStatusFromModem(request.phone, onCompleted);
|
1754: int id = request.phone.getPhoneId();
|
1777: request.phone.setSystemSelectionChannels(args.first, onCompleted);
|
1792: Phone phone = getPhoneFromRequest(request);
|
1793: if (phone != null) {
|
1794: phone.getSystemSelectionChannels(onCompleted);
|
1796: loge("getSystemSelectionChannels: No phone object");
|
1943: Phone phone = getPhoneFromRequest(request);
|
1944: if (phone != null) {
|
1945: phone.setDataThrottling(onCompleted,
|
1949: loge("setDataThrottling: No phone object");
|
1993: request.phone.setSimPowerState(stateToSet, onCompleted, request.workSource);
|
2037: final Phone phone = getPhoneFromRequest(request);
|
2038: if (phone == null || phone.getServiceStateTracker() == null) {
|
2039: request.result = new IllegalStateException("Phone or SST is null");
|
2048: phone.getSignalStrengthController().setSignalStrengthUpdateRequest(
|
2065: Phone phone = getPhoneFromRequest(request);
|
2066: if (phone == null || phone.getServiceStateTracker() == null) {
|
2067: request.result = new IllegalStateException("Phone or SST is null");
|
2076: phone.getSignalStrengthController().clearSignalStrengthUpdateRequest(
|
2092: request.phone.getSlicingConfig(onCompleted);
|
2215: private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
|
2216: return sendRequest(command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone,
|
2226: private @Nullable Object sendRequest(int command, Object argument, Integer subId, Phone phone,
|
2233: if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
|
2234: throw new IllegalArgumentException("subId and phone cannot both be specified!");
|
2235: } else if (phone != null) {
|
2236: request = new MainThreadRequest(argument, phone, workSource);
|
2296: * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
|
2300: int command, Object argument, Phone phone, WorkSource workSource) {
|
2301: MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
|
2342: Phone thePhone = getPhone(getDefaultSubscription());
|
2356: if (request.phone != null) {
|
2357: return request.phone;
|
2369: Phone phone = getPhoneFromRequest(request);
|
2370: return phone == null ? null :
|
2371: UiccController.getInstance().getUiccPort(phone.getPhoneId());
|
2374: // returns phone associated with the subId.
|
2379: private void sendEraseModemConfig(@NonNull Phone phone) {
|
2384: private void sendEraseDataInSharedPreferences(@NonNull Phone phone) {
|
2416: // PENDING: should we just silently fail if phone is offhook or ringing?
|
2437: // from the context of the phone app.
|
2440: if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
|
2490: Phone phone = getPhone(subId);
|
2491: final UnlockSim checkSimPin = new UnlockSim(phone.getPhoneId(), phone.getIccCard());
|
2504: Phone phone = getPhone(subId);
|
2505: final UnlockSim checkSimPuk = new UnlockSim(phone.getPhoneId(), phone.getIccCard());
|
2667: final Phone phone = getPhone(getDefaultSubscription());
|
2668: if (phone != null) {
|
2669: phone.updateServiceLocation(workSource);
|
2714: final Phone phone = getPhone(subId);
|
2715: if (phone != null) {
|
2716: return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
|
2734: final Phone phone = getPhone(subId);
|
2735: if (phone != null) {
|
2736: phone.setRadioPower(!isRadioOnForSubscriber(subId));
|
2752: final Phone phone = getPhone(subId);
|
2753: if (phone == null) {
|
2756: if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
|
2774: Phone phone = PhoneFactory.getPhone(i);
|
2775: if (phone != null && phone.isRadioAvailable()) return true;
|
2791: logv("Shutting down Phone " + i);
|
2800: Phone phone = PhoneFactory.getPhone(phoneId);
|
2801: if (phone != null && phone.isRadioAvailable()) {
|
2802: phone.shutdownRadio();
|
2811: final Phone defaultPhone = PhoneFactory.getDefaultPhone();
|
2816: loge("There's no default phone.");
|
2829: final Phone phone = getPhone(subId);
|
2830: if (phone != null) {
|
2831: phone.setRadioPower(turnOn);
|
2849: final Phone phone = getPhone(subId);
|
2850: if (phone != null) {
|
2851: if (phone.isUsingNewDataStack()) {
|
2852: phone.getDataSettingsManager().setDataEnabled(
|
2855: phone.getDataEnabledSettings().setDataEnabled(
|
2875: final Phone phone = getPhone(subId);
|
2876: if (phone != null) {
|
2877: if (phone.isUsingNewDataStack()) {
|
2878: phone.getDataSettingsManager().setDataEnabled(
|
2881: phone.getDataEnabledSettings().setDataEnabled(
|
2897: final Phone phone = getPhone(subId);
|
2898: if (phone != null) {
|
2899: return phone.isDataAllowed();
|
2958: Phone phone = getPhone(getDefaultSubscription());
|
2959: return phone == null ? TelephonyManager.CALL_STATE_IDLE :
|
2960: PhoneConstantConversions.convertCallState(phone.getState());
|
2971: // Check READ_PHONE_STATE for API version 31+
|
2974: throw new SecurityException("getCallState requires READ_PHONE_STATE for apps "
|
2980: Phone phone = getPhone(subId);
|
2981: return phone == null ? TelephonyManager.CALL_STATE_IDLE :
|
2982: PhoneConstantConversions.convertCallState(phone.getState());
|
2997: final Phone phone = getPhone(subId);
|
2998: if (phone != null) {
|
2999: if (phone.isUsingNewDataStack()) {
|
3000: return phone.getDataNetworkController().getInternetDataNetworkState();
|
3002: return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
|
3021: final Phone phone = getPhone(subId);
|
3022: if (phone != null) {
|
3023: return phone.getDataActivityState();
|
3052: return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
|
3073: if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
|
3074: // Get default phone in this case.
|
3075: phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
|
3078: Phone phone = PhoneFactory.getPhone(phoneId);
|
3079: if (phone == null) return "";
|
3080: ServiceStateTracker sst = phone.getServiceStateTracker();
|
3157: for (Phone phone : PhoneFactory.getPhones()) {
|
3158: List<CellInfo> info = phone.getAllCellInfo();
|
3197: for (Phone phone : PhoneFactory.getPhones()) {
|
3199: CMD_GET_ALL_CELL_INFO, null, phone, workSource);
|
3261: final Phone phone = getPhoneFromSubId(subId);
|
3262: if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
|
3264: sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
|
3282: Phone phone = PhoneFactory.getPhone(slotIndex);
|
3283: if (phone == null) {
|
3286: int subId = phone.getSubId();
|
3295: return phone.getImei();
|
3303: Phone phone = PhoneFactory.getPhone(slotIndex);
|
3305: if (phone != null) {
|
3306: String imei = phone.getImei();
|
3326: Phone phone = PhoneFactory.getPhone(slotIndex);
|
3327: if (phone == null) {
|
3331: int subId = phone.getSubId();
|
3339: return phone.getMeid();
|
3347: Phone phone = PhoneFactory.getPhone(slotIndex);
|
3349: if (phone != null) {
|
3350: String meid = phone.getMeid();
|
3365: Phone phone = PhoneFactory.getPhone(slotIndex);
|
3366: if (phone == null) {
|
3369: int subId = phone.getSubId();
|
3378: return phone.getDeviceSvn();
|
3388: final Phone phone = getPhone(subId);
|
3389: return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
|
3399: final Phone phone = getPhone(subId);
|
3400: return phone == null ? null : phone.getCarrierName();
|
3410: final Phone phone = getPhone(subId);
|
3411: return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
|
3412: : phone.getSpecificCarrierId();
|
3422: final Phone phone = getPhone(subId);
|
3423: return phone == null ? null : phone.getSpecificCarrierName();
|
3434: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
3435: if (phone == null) {
|
3440: return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
|
3471: * Make sure the caller has the MODIFY_PHONE_STATE permission.
|
3476: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
|
3485: * Make sure the caller has the CALL_PHONE permission.
|
3490: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
|
3530: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
3531: if (phone == null) {
|
3532: return PhoneConstants.PHONE_TYPE_NONE;
|
3534: return phone.getPhoneType();
|
3561: final Phone phone = getPhone(subId);
|
3562: if (phone != null) {
|
3563: return phone.getCdmaEriIconIndex();
|
3594: final Phone phone = getPhone(subId);
|
3595: if (phone != null) {
|
3596: return phone.getCdmaEriIconMode();
|
3625: final Phone phone = getPhone(subId);
|
3626: if (phone != null) {
|
3627: return phone.getCdmaEriText();
|
3646: final Phone phone = getPhone(subId);
|
3647: if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
3648: return phone.getLine1Number();
|
3650: loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
|
3668: final Phone phone = getPhone(subId);
|
3669: if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
3670: return phone.getCdmaMin();
|
3682: if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
3684: throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
|
3850: final Phone phone = getPhone(subId);
|
3851: if (phone != null) {
|
3852: phone.setVoiceActivationState(activationState);
|
3871: final Phone phone = getPhone(subId);
|
3872: if (phone != null) {
|
3873: phone.setDataActivationState(activationState);
|
3889: final Phone phone = getPhone(subId);
|
3892: if (phone != null) {
|
3893: return phone.getVoiceActivationState();
|
3909: final Phone phone = getPhone(subId);
|
3912: if (phone != null) {
|
3913: return phone.getDataActivationState();
|
3935: final Phone phone = getPhone(subId);
|
3936: if (phone != null) {
|
3937: return phone.getVoiceMessageCount();
|
3954: final Phone phone = getPhone(subId);
|
3955: return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
|
3968: final Phone defaultPhone = getDefaultPhone();
|
4006: for (Phone phone : PhoneFactory.getPhones()) {
|
4007: if (phone.isInEmergencySmsMode()) {
|
4018: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4045: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4082: Phone phone = getPhone(subId);
|
4083: if (phone == null) {
|
4088: phone.getImsRegistrationState(regState -> {
|
4115: Phone phone = getPhone(subId);
|
4116: if (phone == null) {
|
4121: phone.getImsRegistrationTech(regTech -> {
|
4140: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4166: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4216: Phone phone = getPhone(subId);
|
4217: if (phone == null) return false;
|
4218: return phone.isImsCapabilityAvailable(capability, regTech);
|
4269: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4307: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4344: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4382: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4403: * Requires MODIFY_PHONE_STATE permission.
|
4426: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4480: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4566: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
4668: Phone phone = getPhone(subId);
|
4669: if (phone == null) {
|
4670: loge("phone instance null for subid " + subId);
|
4674: if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
|
4678: if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
|
5013: final Phone phone = getPhone(subId);
|
5014: if (phone != null) {
|
5015: return phone.getServiceState().getDataNetworkType();
|
5050: final Phone phone = getPhone(subId);
|
5051: if (phone != null) {
|
5052: return phone.getServiceState().getDataNetworkType();
|
5078: final Phone phone = getPhone(subId);
|
5079: if (phone != null) {
|
5080: return phone.getServiceState().getVoiceNetworkType();
|
5105: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
5106: if (phone != null) {
|
5107: return phone.getIccCard().hasIccCard();
|
5122: * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
|
5123: * or {@link Phone#LTE_ON_CDMA_TRUE}
|
5142: final Phone phone = getPhone(subId);
|
5143: if (phone == null) {
|
5212: + portIndex + " does not correspond to an active phone");
|
5220: Phone phone = getPhoneFromValidIccLogicalChannelRequest(request,
|
5227: return iccOpenLogicalChannelWithPermission(phone, request);
|
5232: Phone phone;
|
5236: phone = getPhoneFromSubId(request.subId);
|
5239: phone = getPhoneFromSlotPortIndexOrThrowException(request.slotIndex, request.portIndex);
|
5243: return phone;
|
5246: private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
|
5263: CMD_OPEN_CHANNEL, channelRequest, phone, null /* workSource */);
|
5273: Phone phone = getPhoneFromValidIccLogicalChannelRequest(request,
|
5278: return iccCloseLogicalChannelWithPermission(phone, request);
|
5281: private boolean iccCloseLogicalChannelWithPermission(Phone phone,
|
5288: Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, request.channel, phone,
|
5325: private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
|
5334: new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
|
5381: private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
|
5399: new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
|
5631: Phone phone = PhoneFactory.getPhone(slotIndex);
|
5632: if (phone != null) {
|
5634: mApp, phone.getSubId(), "resetModemConfig");
|
5657: Phone phone = PhoneFactory.getPhone(slotIndex);
|
5658: if (phone != null) {
|
5660: mApp, phone.getSubId(), "rebootModem");
|
5941: * Sets the ims registration state on all valid {@link Phone}s.
|
5948: // NOTE: Before S, this method only set the default phone.
|
5949: for (final Phone phone : PhoneFactory.getPhones()) {
|
5950: if (SubscriptionManager.isValidSubscriptionId(phone.getSubId())) {
|
5951: phone.setImsRegistrationState(registered);
|
6034: final Phone phone = getPhone(subId);
|
6035: if (phone == null) {
|
6038: OperatorInfo networkSelection = phone.getSavedNetworkSelection();
|
6040: ? phone.getManualNetworkSelectionPlmn() : networkSelection.getOperatorNumeric();
|
6097: Phone phone = getPhone(subId);
|
6098: if (phone == null) {
|
6128: sendRequestAsync(CMD_GET_CALL_FORWARDING, argument, phone, null);
|
6149: Phone phone = getPhone(subId);
|
6150: if (phone == null) {
|
6163: sendRequestAsync(CMD_SET_CALL_FORWARDING, arguments, phone, null);
|
6177: Phone phone = getPhone(subId);
|
6178: if (phone == null) {
|
6186: CarrierConfigManager configManager = new CarrierConfigManager(phone.getContext());
|
6193: CarrierXmlParser carrierXmlParser = new CarrierXmlParser(phone.getContext(),
|
6213: sendRequestAsync(CMD_GET_CALL_WAITING, argument, phone, null);
|
6230: Phone phone = getPhone(subId);
|
6231: if (phone == null) {
|
6240: CarrierConfigManager configManager = new CarrierConfigManager(phone.getContext());
|
6247: CarrierXmlParser carrierXmlParser = new CarrierXmlParser(phone.getContext(),
|
6270: sendRequestAsync(CMD_SET_CALL_WAITING, arguments, phone, null);
|
6540: final Phone phone = getPhone(subId);
|
6542: if (phone != null) {
|
6543: return phone.hasMatchedTetherApnSetting();
|
6573: * Accepts either READ_BASIC_PHONE_STATE, ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE
|
6583: mApp.enforceCallingOrSelfPermission(permission.READ_BASIC_PHONE_STATE,
|
6598: Phone phone = PhoneFactory.getPhone(phoneId);
|
6599: if (phone != null) {
|
6600: boolean retVal = phone.isUserDataEnabled();
|
6604: if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
|
6630: android.Manifest.permission.READ_PHONE_STATE,
|
6634: permission.READ_BASIC_PHONE_STATE, functionName);
|
6644: Phone phone = PhoneFactory.getPhone(phoneId);
|
6645: if (phone != null) {
|
6647: if (phone.isUsingNewDataStack()) {
|
6648: retVal = phone.getDataSettingsManager().isDataEnabled();
|
6650: retVal = phone.getDataEnabledSettings().isDataEnabled();
|
6655: if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
|
6679: mApp.enforceCallingOrSelfPermission(permission.READ_BASIC_PHONE_STATE,
|
6684: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PHONE_STATE,
|
6700: Phone phone = PhoneFactory.getPhone(phoneId);
|
6701: if (phone != null) {
|
6703: if (phone.isUsingNewDataStack()) {
|
6704: retVal = phone.getDataSettingsManager().isDataEnabledForReason(reason);
|
6707: retVal = phone.isUserDataEnabled();
|
6709: retVal = phone.getDataEnabledSettings().isDataEnabledForReason(reason);
|
6716: loge("isDataEnabledForReason: no phone subId="
|
6739: Phone phone = getPhone(subId);
|
6740: if (phone == null) {
|
6744: CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
|
6758: Phone phone = getPhone(subId);
|
6759: if (phone == null) {
|
6763: CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
|
6783: Phone phone = PhoneFactory.getPhone(phoneId);
|
6784: if (phone == null) {
|
6787: CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
|
6802: Phone phone = PhoneFactory.getPhone(phoneId);
|
6803: if (phone == null) {
|
6806: CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
|
6816: Phone phone = PhoneFactory.getPhone(phoneId);
|
6817: if (phone == null) {
|
6820: CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
|
6846: final Phone phone = PhoneFactory.getPhone(logicalSlotIndex);
|
6847: if (phone == null) {
|
6850: final CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
|
6858: final Phone phone = getPhone(subId);
|
6859: UiccPort port = phone == null ? null : phone.getUiccPort();
|
6876: Phone phone = getPhone(subId);
|
6877: if (phone != null) {
|
6878: Phone defaultPhone = phone.getImsPhone();
|
6879: if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
|
6899: Phone phone = getPhone(subId);
|
6900: if (phone != null) {
|
6901: Phone defaultPhone = phone.getImsPhone();
|
6902: if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
|
6922: final Phone phone = getPhone(subId);
|
6923: if (phone == null) {
|
6926: final String subscriberId = phone.getSubscriberId();
|
7149: final Phone phone = getPhone(subId);
|
7150: return phone == null ? false : phone.setOperatorBrandOverride(brand);
|
7165: final Phone phone = getPhone(subId);
|
7166: if (phone == null) {
|
7169: return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
|
7211: Phone phone = PhoneFactory.getPhone(phoneId);
|
7215: mApp, phone.getSubId(), "getRadioAccessFamily");
|
7221: if (phone == null) {
|
7228: mApp, phone.getSubId(), "getRadioAccessFamily");
|
7330: final Phone defaultPhone = getDefaultPhone();
|
7344: final Phone defaultPhone = getDefaultPhone();
|
7398: .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
|
7429: final Phone phone = getPhone(subscriptionId);
|
7430: if (phone == null) {
|
7431: loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
|
7438: phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
|
7471: * Returns the unique device ID of phone, for example, the IMEI for
|
7475: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
7486: final Phone phone = PhoneFactory.getPhone(0);
|
7487: if (phone == null) {
|
7490: int subId = phone.getSubId();
|
7498: return phone.getDeviceId();
|
7511: Phone phone = getPhone(subId);
|
7512: if (phone != null) {
|
7513: return phone.isImsRegistered();
|
7534: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
7553: Phone phone = getPhone(subscriptionId);
|
7554: if (phone == null) {
|
7557: return PhoneUtils.makePstnPhoneAccountHandle(phone);
|
7569: Phone phone = getPhone(subId);
|
7570: if (phone != null) {
|
7571: return phone.isWifiCallingEnabled();
|
7586: Phone phone = getPhone(subId);
|
7587: if (phone != null) {
|
7588: return phone.isVideoEnabled();
|
7604: Phone phone = getPhone(subId);
|
7605: if (phone != null) {
|
7606: return phone.getImsRegistrationTech();
|
7621: Phone defaultPhone = getDefaultPhone();
|
7634: Phone phone = getPhone(subId);
|
7635: cleanUpAllowedNetworkTypes(phone, subId);
|
7667: void cleanUpAllowedNetworkTypes(Phone phone, int subId) {
|
7668: if (phone == null || !SubscriptionManager.isUsableSubscriptionId(subId)) {
|
7676: phone.loadAllowedNetworksFromSubscriptionDatabase();
|
7677: phone.setAllowedNetworkTypes(TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER,
|
7690: final Phone phone = getPhone(subId);
|
7691: if (phone == null) {
|
7698: phone.getContext().getOpPackageName(), phone.getContext().getAttributionTag());
|
7707: final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
|
7839: final Phone phone = getPhone(subId);
|
7840: if (phone == null) {
|
7846: boolean isCallingPackageDataService = phone.getDataServicePackages()
|
7849: // isActiveSubId requires READ_PHONE_STATE, which we already check for above
|
7856: ServiceState ss = phone.getServiceState();
|
7869: * Returns the URI for the per-account voicemail ringtone set in Phone settings.
|
7880: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
|
7881: if (phone == null) {
|
7882: phone = getDefaultPhone();
|
7885: return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
|
7895: * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
7905: final Phone defaultPhone = getDefaultPhone();
|
7916: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
|
7917: if (phone == null) {
|
7918: phone = defaultPhone;
|
7920: VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
|
7927: * Returns whether vibration is set for voicemail notification in Phone settings.
|
7937: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
|
7938: if (phone == null) {
|
7939: phone = getDefaultPhone();
|
7942: return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
|
7952: * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
7962: final Phone defaultPhone = getDefaultPhone();
|
7973: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
|
7974: if (phone == null) {
|
7975: phone = defaultPhone;
|
7977: VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
|
7984: * Make sure either called from same process as self (phone) or IPC caller has read privilege.
|
7989: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
7994: * Make sure either called from same process as self (phone) or IPC caller has send SMS
|
8037: Phone phone = getPhone(subId);
|
8041: if (phone == null) {
|
8046: aid = UiccController.getInstance().getUiccPort(phone.getPhoneId())
|
8066: Phone phone = getPhone(subId);
|
8070: if (phone == null) {
|
8075: esn = phone.getEsn();
|
8094: Phone phone = getPhone(subId);
|
8098: if (phone == null) {
|
8103: cdmaPrlVersion = phone.getCdmaPrlVersion();
|
8197: final Phone phone = getPhone(subId);
|
8200: if (phone == null) {
|
8205: phone.carrierActionSetRadioEnabled(enabled);
|
8222: final Phone phone = getPhone(subId);
|
8225: if (phone == null) {
|
8226: loge("setVoNrEnabled fails with no phone object for subId: " + subId);
|
8282: final Phone phone = getPhone(subId);
|
8285: if (phone == null) {
|
8290: phone.carrierActionReportDefaultNetworkStatus(report);
|
8306: final Phone phone = getPhone(subId);
|
8307: if (phone == null) {
|
8312: phone.carrierActionResetAll();
|
8319: * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
|
8326: writer.println("Permission Denial: can't dump Phone from pid="
|
8370: Phone phone = getPhone(subId);
|
8371: if (phone != null) {
|
8373: phone.carrierActionSetMeteredApnsEnabled(enabled);
|
8375: if (phone.isUsingNewDataStack()) {
|
8376: phone.getDataSettingsManager().setDataEnabled(
|
8379: phone.getDataEnabledSettings().setDataEnabled(reason, enabled);
|
8400: Phone phone = getPhone(subId);
|
8404: if (phone != null) {
|
8405: return phone.getClientRequestStats();
|
8423: // $ adb shell cmd phone ...
|
8442: Phone phone = PhoneFactory.getPhone(slotIndex);
|
8448: if (phone != null) {
|
8449: phone.setSimPowerState(state, null, workSource);
|
8471: Phone phone = PhoneFactory.getPhone(slotIndex);
|
8477: if (phone != null) {
|
8479: sendRequestAsync(CMD_SET_SIM_POWER, arguments, phone, workSource);
|
8501: * Check if phone is in emergency callback mode
|
8502: * @return true if phone is in emergency callback mode
|
8508: final Phone phone = getPhone(subId);
|
8512: if (phone != null) {
|
8513: return phone.isInEcm();
|
8533: Phone p = getPhone(subId);
|
8553: Phone phone = PhoneFactory.getPhone(slotIndex);
|
8554: if (phone != null) {
|
8555: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
|
8562: return phone.getRadioPowerState();
|
8575: * {@link android.Manifest.permission#READ_BASIC_PHONE_STATE},
|
8576: * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
|
8593: permission.READ_BASIC_PHONE_STATE, functionName);
|
8603: Phone phone = getPhone(subId);
|
8604: isEnabled = phone != null ? phone.getDataRoamingEnabled() : false;
|
8616: * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
|
8629: Phone phone = getPhone(subId);
|
8630: if (phone != null) {
|
8631: phone.setDataRoamingEnabled(isEnabled);
|
8647: Phone phone = getPhone(subId);
|
8648: if (phone != null) {
|
8649: isAllowed = phone.isCspPlmnEnabled();
|
8662: Phone phone = PhoneFactory.getPhone(profile.getPhoneId());
|
8663: if (phone == null) {
|
8666: CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
|
8683: // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
|
8801: // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
|
8934: @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
8960: * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
8969: Phone phone = getPhone(subId);
|
8970: if (phone == null) {
|
8973: UiccPort uiccPort = phone.getUiccPort();
|
9010: * not set, return {@link Phone#PREFERRED_NT_MODE}.
|
9018: return Phone.PREFERRED_NT_MODE;
|
9028: final Phone phone = getPhone(subId);
|
9029: if (phone == null) {
|
9033: CarrierPrivilegesTracker cpt = phone.getCarrierPrivilegesTracker();
|
9038: phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
|
9056: final Phone phone = getPhone(subId);
|
9057: if (phone == null) {
|
9061: return phone.getCarrierIdListVersion();
|
9144: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
9149: for (Phone phone: PhoneFactory.getPhones()) {
|
9150: if (phone.getEmergencyNumberTracker() != null
|
9151: && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
|
9153: phone.getSubId(),
|
9154: phone.getEmergencyNumberTracker().getEmergencyNumberList());
|
9165: final Phone defaultPhone = getDefaultPhone();
|
9173: for (Phone phone: PhoneFactory.getPhones()) {
|
9174: if (phone.getEmergencyNumberTracker() != null
|
9175: && phone.getEmergencyNumberTracker()
|
9196: for (Phone phone : PhoneFactory.getPhones()) {
|
9197: Rlog.d(LOG_TAG, "startEmergencyCallbackMode phone type: " + phone.getPhoneType());
|
9198: if (phone != null && ((phone.getPhoneType() == PHONE_TYPE_GSM)
|
9199: || (phone.getPhoneType() == PHONE_TYPE_CDMA))) {
|
9200: GsmCdmaPhone gsmCdmaPhone = (GsmCdmaPhone) phone;
|
9221: for (Phone phone: PhoneFactory.getPhones()) {
|
9222: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
9243: for (Phone phone: PhoneFactory.getPhones()) {
|
9244: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
9263: final Phone phone = getPhone(subId);
|
9264: if (phone == null) {
|
9268: return phone.getEmergencyNumberDbVersion();
|
9280: for (Phone phone: PhoneFactory.getPhones()) {
|
9281: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
9297: for (Phone phone: PhoneFactory.getPhones()) {
|
9298: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
9314: for (Phone phone: PhoneFactory.getPhones()) {
|
9315: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
9328: Phone phone = getPhone(subId);
|
9329: if (phone == null) {
|
9335: .getUiccProfileForPhone(phone.getPhoneId());
|
9354: Phone phone = PhoneFactory.getPhone(slotIndex);
|
9355: if (phone == null) {
|
9358: return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
|
9371: Phone phone = PhoneFactory.getPhone(slotIndex);
|
9372: if (phone == null) return false;
|
9375: mApp, phone.getSubId(), callingPackage, callingFeatureId,
|
9377: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
9383: return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
|
9385: return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
|
9453: * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
|
9454: * permission, but the other way around is possible with either MODIFY_PHONE_STATE
|
9483: Phone phone = getPhone(subId);
|
9484: if (phone == null) {
|
9489: UiccPort uiccPort = phone.getUiccPort();
|
9564: Phone phone = getDefaultPhone();
|
9565: if (phone == null) return -1;
|
9566: HalVersion hv = phone.getHalVersion();
|
9596: enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
|
9602: Phone phone = getPhone(subId);
|
9603: if (phone == null) return false;
|
9605: boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
|
9607: if (phone.isUsingNewDataStack()) {
|
9608: isDataEnabled = phone.getDataSettingsManager().isDataEnabled(apnType);
|
9610: isDataEnabled = phone.getDataEnabledSettings().isDataEnabled(apnType);
|
9625: Phone phone = getPhone(subId);
|
9626: if (phone == null) return true; // By default return true.
|
9628: return ApnSettingUtils.isMeteredApnType(apnType, phone);
|
9640: Phone phone = getPhone(subscriptionId);
|
9641: if (phone == null) {
|
9661: sendRequestAsync(CMD_SET_SYSTEM_SELECTION_CHANNELS, argument, phone, null);
|
9761: Phone phone = getPhone(subscriptionId);
|
9762: if (phone == null) return false;
|
9766: if (phone.isUsingNewDataStack()) {
|
9767: return phone.getDataSettingsManager().isDataAllowedInVoiceCall();
|
9769: return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
|
9772: if (phone.isUsingNewDataStack()) {
|
9773: return phone.getDataSettingsManager().isMmsAlwaysAllowed();
|
9775: return phone.getDataEnabledSettings().isMmsAlwaysAllowed();
|
9792: Phone phone = getPhone(subscriptionId);
|
9793: if (phone == null) return;
|
9797: if (phone.isUsingNewDataStack()) {
|
9798: phone.getDataSettingsManager().setAllowDataDuringVoiceCall(enabled);
|
9800: phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(enabled);
|
9804: if (phone.isUsingNewDataStack()) {
|
9805: phone.getDataSettingsManager().setAlwaysAllowMmsData(enabled);
|
9807: phone.getDataEnabledSettings().setAlwaysAllowMmsData(enabled);
|
9830: for (Phone phone : PhoneFactory.getPhones()) {
|
9831: Phone defaultPhone = phone.getImsPhone();
|
9832: if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
|
9881: Phone phone = getPhone(subId);
|
9882: if (phone != null && phone.getIccCard() != null) {
|
9883: return phone.getIccCard().getIccLockEnabled();
|
9907: Phone phone = getPhone(subId);
|
9908: if (phone == null) {
|
9915: new Pair<Boolean, String>(enabled, password), phone, null);
|
9939: Phone phone = getPhone(subId);
|
9940: if (phone == null) {
|
9947: new Pair<String, String>(oldPassword, newPassword), phone, null);
|
10006: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
10009: Phone phone = getPhone(subId);
|
10010: if (phone == null) {
|
10011: throw new RuntimeException("phone is not available");
|
10016: return phone.getEquivalentHomePlmns();
|
10040: Manifest.permission.MODIFY_PHONE_STATE);
|
10080: * @return {@code true} if phone setRadioPowerForReason was called. Otherwise, returns {@code
|
10086: Phone phone = PhoneFactory.getPhone(i);
|
10087: if (phone != null) {
|
10088: phone.setRadioPowerForReason(enable, Phone.RADIO_POWER_REASON_THERMAL);
|
10093: // return true if successfully informed the phone object about the thermal radio power
|
10107: // Ensure that radio is on. If not able to power on due to phone being unavailable, return
|
10147: Log.e(LOG_TAG , "Phone state is not valid. One of the phones is in an emergency call");
|
10150: for (Phone phone : PhoneFactory.getPhones()) {
|
10151: if (phone.isInEmergencySmsMode() || phone.isInEcm()) {
|
10152: Log.e(LOG_TAG, "Phone state is not valid. isInEmergencySmsMode = "
|
10153: + phone.isInEmergencySmsMode() + " isInEmergencyCallbackMode = "
|
10154: + phone.isInEcm());
|
10225: // Ensure that radio is on. If not able to power on due to phone being
|
10245: Phone phone = getPhone(subId);
|
10246: if (phone == null) {
|
10270: // Turn radio off. If not able to power off due to phone being unavailable,
|
10394: permission.READ_PRIVILEGED_PHONE_STATE);
|
10425: permission.READ_PRIVILEGED_PHONE_STATE);
|
10456: permission.READ_PRIVILEGED_PHONE_STATE);
|
10633: Phone thePhone = p.getImsPhone();
|
10972: if (callingUid == Process.PHONE_UID || callingUid == Process.SYSTEM_UID) {
|
10973: // phone/system process do not have further restriction on request
|
11009: * Gets the current phone capability.
|
11011: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
11013: * It's used to evaluate possible phone config change, for example from single
|
11048: * Requires carrier privileges or READ_PRIVILEGED_PHONE_STATE permission.
|
11058: Phone phone = getDefaultPhone();
|
11059: sendRequestAsync(CMD_GET_SLICING_CONFIG, callback, phone, null);
|
11073: // The following also checks READ_PRIVILEGED_PHONE_STATE.
|
11081: Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
11082: Manifest.permission.READ_PRECISE_PHONE_STATE,
|
11138: * com.android.phone.permission.ACCESS_LAST_KNOWN_CELL_ID, otherwise throws
|
11174: Phone phone = getPhone(subId);
|
11175: if (phone == null) return null;
|
11176: ServiceStateTracker sst = phone.getServiceStateTracker();
|
24: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
|
72: import android.telecom.PhoneAccount;
|
73: import android.telecom.PhoneAccountHandle;
|
96: import android.telephony.PhoneCapability;
|
97: import android.telephony.PhoneNumberRange;
|
158: import com.android.internal.telephony.GsmCdmaPhone;
|
172: import com.android.internal.telephony.PhoneConfigurationManager;
|
173: import com.android.internal.telephony.PhoneConstantConversions;
|
174: import com.android.internal.telephony.PhoneConstants;
|
175: import com.android.internal.telephony.PhoneFactory;
|
190: import com.android.internal.telephony.imsphone.ImsPhone;
|
191: import com.android.internal.telephony.imsphone.ImsPhoneCallTracker;
|
246: private static final String LOG_TAG = "PhoneInterfaceManager";
|
247: private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
|
369: private static PhoneInterfaceManager sInstance;
|
372: private PhoneGlobals mApp;
|
831: defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
|
858: defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
|
869: defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
|
879: defaultPhone.resetModemConfig(onCompleted);
|
1104: defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
|
1387: if (defaultPhone != null) {
|
1388: defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
|
1464: defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
|
1492: defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
|
1716: defaultPhone.rebootModem(onCompleted);
|
1726: PhoneConfigurationManager.getInstance()
|
1736: mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
|
1748: PhoneConfigurationManager.getInstance()
|
1865: defaultPhone.eraseModemConfig(onCompleted);
|
1873: request.result = defaultPhone.eraseDataInSharedPreferences();
|
1891: int phoneId = getPhoneFromRequest(request).getPhoneId();
|
1893: .storePin(passwords.second, phoneId);
|
1915: int phoneId = getPhoneFromRequest(request).getPhoneId();
|
1918: .storePin(enabled.second, phoneId);
|
1920: UiccController.getInstance().getPinStorage().clearPin(phoneId);
|
1934: getDefaultPhone().getContext().sendBroadcastAsUser(
|
2307: * Initialize the singleton PhoneInterfaceManager instance.
|
2308: * This is only done once, at startup, from PhoneApp.onCreate().
|
2310: /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
|
2311: synchronized (PhoneInterfaceManager.class) {
|
2313: sInstance = new PhoneInterfaceManager(app);
|
2324: mCM = PhoneGlobals.getInstance().mCM;
|
2334: mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
|
2343: return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
|
2365: ? getDefaultPhone() : getPhone(subId);
|
2376: return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
|
2390: PackageManager pm = getDefaultPhone().getContext().getPackageManager();
|
2417: PhoneConstants.State state = mCM.getState(subId);
|
2418: if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
|
2477: return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
|
2482: return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
|
2523: private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
|
2532: UnlockSim(int phoneId, IccCard simCard) {
|
2533: mPhoneId = phoneId;
|
2554: mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
|
2559: mResult = PhoneConstants.PIN_OPERATION_ABORTED;
|
2561: mResult = PhoneConstants.PIN_GENERAL_FAILURE;
|
2564: mResult = PhoneConstants.PIN_RESULT_SUCCESS;
|
2616: if (mResult == PhoneConstants.PIN_RESULT_SUCCESS && pin.length() > 0) {
|
2777: logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
|
2812: if (defaultPhone != null) {
|
2813: defaultPhone.setRadioPower(turnOn);
|
3004: return PhoneConstantConversions.convertDataState(
|
3005: PhoneConstants.DataState.DISCONNECTED);
|
3077: final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
|
3274: getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
|
3510: Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
3514: Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
3518: Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
3680: public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
|
3711: return getDefaultPhone().needsOtaServiceProvisioning();
|
3746: PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
|
3747: if (phoneAccountHandle == null) {
|
3750: return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
|
3835: SmsController smsController = PhoneFactory.getSmsController();
|
3970: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
3979: defaultPhone.sendDialerSpecialCode(inputCode);
|
4847: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4880: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4907: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4940: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
5137: return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
|
5144: return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
|
5147: .orElse(PhoneConstants.LTE_ON_CDMA_FALSE);
|
5208: int phoneId = UiccController.getInstance().getPhoneIdFromSlotPortIndex(slotIndex,
|
5210: if (phoneId == -1) {
|
5214: return PhoneFactory.getPhone(phoneId);
|
5252: ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
|
5388: ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
|
6327: renounceFineLocationAccess, request, messenger, binder, getPhone(subId),
|
6596: int phoneId = mSubscriptionController.getPhoneId(subId);
|
6597: if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
|
6643: int phoneId = mSubscriptionController.getPhoneId(subId);
|
6695: int phoneId = mSubscriptionController.getPhoneId(subId);
|
6697: log("isDataEnabledForReason: subId=" + subId + " phoneId=" + phoneId
|
6773: enforceReadPrivilegedPermission("checkCarrierPrivilegesForPackageAnyPhone");
|
6782: for (int phoneId = 0; phoneId < TelephonyManager.getDefault().getPhoneCount(); phoneId++) {
|
6801: enforceReadPrivilegedPermission("getCarrierPackageNamesForIntentAndPhone");
|
6814: public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
|
6880: ImsPhone imsPhone = (ImsPhone) defaultPhone;
|
6881: imsPhone.setCallComposerStatus(status);
|
6903: ImsPhone imsPhone = (ImsPhone) defaultPhone;
|
6904: return imsPhone.getCallComposerStatus();
|
7210: public int getRadioAccessFamily(int phoneId, String callingPackage) {
|
7229: raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
|
7335: ImsManager.getInstance(defaultPhone.getContext(),
|
7336: defaultPhone.getPhoneId()).setVtSetting(enable);
|
7345: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
|
7357: ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
|
7472: * GSM and the MEID for CDMA phones. Return null if device ID is not available.
|
7523: return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
|
7531: PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
|
7538: return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
|
7622: if (defaultPhone != null) {
|
7624: mApp, getDefaultPhone().getSubId(), "factoryReset");
|
7637: getPhone(subId).resetCarrierKeysForImsiEncryption();
|
7643: cleanUpSmsRawTable(getDefaultPhone().getContext());
|
7650: if (defaultPhone == null) {
|
7657: sendEraseModemConfig(defaultPhone);
|
7660: sendEraseDataInSharedPreferences(defaultPhone);
|
7871: * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
|
7874: * PhoneAccount.
|
7877: public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
|
7897: * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
|
7900: * PhoneAccount.
|
7904: PhoneAccountHandle phoneAccountHandle, Uri uri) {
|
7907: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
7910: mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
|
7929: * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
|
7931: * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
|
7934: public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
|
7954: * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
|
7957: * specific PhoneAccount.
|
7961: PhoneAccountHandle phoneAccountHandle, boolean enabled) {
|
7964: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
7967: mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
|
8340: return new TelephonyShellCommand(this, getDefaultPhone().getContext()).exec(
|
9014: int phoneId = mSubscriptionController.getPhoneId(subId);
|
9015: if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
|
9016: return list.get(phoneId);
|
9169: mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
|
9187: * Start emergency callback mode for GsmCdmaPhone for testing.
|
9201: gsmCdmaPhone.obtainMessage(
|
9202: GsmCdmaPhone.EVENT_EMERGENCY_CALLBACK_MODE_ENTER).sendToTarget();
|
9410: getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
|
9433: PhoneCapability staticCapability =
|
9705: SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
|
9731: return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
|
9748: return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
|
9833: ImsPhone imsPhone = (ImsPhone) defaultPhone;
|
9835: (ImsPhoneCallTracker) imsPhone.getCallTracker();
|
9837: Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
|
9838: + imsPhone.getMsisdn());
|
9976: // * Inherited from PhoneWindowManager *
|
10074: * Attempts to set the radio power state for all phones for thermal reason.
|
10077: * PhoneInternalInterface#setRadioPowerForReason} for more details.
|
10200: if (!getThermalMitigationAllowlist(getDefaultPhone().getContext())
|
10631: Arrays.stream(PhoneFactory.getPhones()).forEach(
|
10634: if (thePhone != null && thePhone instanceof ImsPhone) {
|
10635: ImsPhone imsPhone = (ImsPhone) thePhone;
|
10636: CallTracker tracker = imsPhone.getCallTracker();
|
10716: return getDefaultPhone().getMobileProvisioningUrl();
|
10731: return EabUtil.getContactFromEab(getDefaultPhone().getContext(), contact);
|
10746: return EabUtil.getCapabilityFromEab(getDefaultPhone().getContext(), contact);
|
10761: return EabUtil.removeContactFromEab(subId, contacts, getDefaultPhone().getContext());
|
11012: * @return the PhoneCapability which describes the data connection capability of modem.
|
11220: return getDefaultPhone().isUsingNewDataStack();
|
578: getPhoneFromRequest(request).handlePinMmi((String) request.argument)
|
1061: getPhoneFromRequest(request).getAllowedNetworkTypesBitmask(onCompleted);
|
1091: getPhoneFromRequest(request).setAllowedNetworkTypes(
|
1118: getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
|
1130: getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
|
1140: getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
|
1255: getPhoneFromRequest(request).getCallWaiting(onCompleted);
|
1301: getPhoneFromRequest(request).setCallWaiting(enable, onCompleted);
|
1367: getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
|
1575: getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
|
1596: getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
|
1612: getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
|
1623: getPhoneFromRequest(request).queryCdmaSubscriptionMode(onCompleted);
|
1639: getPhoneFromRequest(request).setCdmaSubscriptionMode(
|
1758: mPhoneConfigurationManager.addToPhoneStatusCache(id,
|
1881: getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
|
1904: getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
|
2359: return getPhoneFromSubId(request.subId);
|
2617: UiccController.getInstance().getPinStorage().storePin(pin, mPhoneId);
|
2698: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
2773: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
2790: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
2792: shutdownRadioUsingPhoneId(i);
|
2972: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
|
3370: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3523: return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
|
3553: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3586: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3617: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3760: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3928: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3988: .enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4025: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4051: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4107: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4147: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4172: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4274: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4312: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4349: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4387: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4432: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4485: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4571: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4630: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4647: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4688: checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
|
4703: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4718: checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
|
4731: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4746: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4760: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4842: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
4875: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
5005: && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
|
5040: if (!TelephonyPermissions.checkCallingOrSelfReadNonDangerousPhoneStateNoThrow(
|
5042: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
5068: if (!TelephonyPermissions.checkCallingOrSelfReadNonDangerousPhoneStateNoThrow(
|
5070: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
5163: return mSubscriptionController.getPhoneId(getDefaultSubscription());
|
5307: return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
|
5321: getPhoneFromSlotPortIndexOrThrowException(slotIndex, portIndex), channel, cla,
|
5360: return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
|
5376: getPhoneFromSlotPortIndexOrThrowException(slotIndex, portIndex), callingPackage,
|
5461: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
5885: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
6025: .enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
6387: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
6412: TelephonyPermissions.enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
6416: return getPhoneFromSubId(subId).getAllowedNetworkTypes(reason);
|
6465: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
6511: if (allowedNetworkTypes == getPhoneFromSubId(subId).getAllowedNetworkTypes(reason)) {
|
6774: return checkCarrierPrivilegesForPackageAnyPhoneWithPermission(pkgName);
|
6829: enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
|
6833: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
6969: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
|
6996: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7019: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7214: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
7227: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
7369: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7388: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7532: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
|
7533: callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
|
7547: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
7550: "getPhoneAccountHandleForSubscriptionId, " + "subscriptionId: " + subscriptionId);
|
7796: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8396: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8596: TelephonyPermissions.enforceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
|
8641: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
8685: if (checkCarrierPrivilegesForPackageAnyPhoneWithPermission(callingPackage)
|
8803: if (checkCarrierPrivilegesForPackageAnyPhoneWithPermission(callingPackage)
|
8875: port.getPhoneId(), true));
|
9070: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
9078: return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
|
9087: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
9114: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
9141: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
9168: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
9374: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
9409: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
|
9434: mPhoneConfigurationManager.getStaticPhoneCapability();
|
9474: mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
|
9514: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
9521: return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
|
9530: metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
|
9546: if (SubscriptionManager.isValidPhoneId(portInfo.getLogicalSlotIndex())) {
|
9670: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
9691: SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
|
9834: ImsPhoneCallTracker imsPhoneCallTracker =
|
9836: imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
|
10004: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
10084: boolean isPhoneAvailable = false;
|
10089: isPhoneAvailable = true;
|
10095: return isPhoneAvailable;
|
10259: } else if (isAnyPhoneInEmergencyState()) {
|
10637: if (tracker != null && tracker instanceof ImsPhoneCallTracker) {
|
10638: ImsPhoneCallTracker imsPhoneCallTracker =
|
10639: (ImsPhoneCallTracker) tracker;
|
10640: imsPhoneCallTracker.setDeviceToDeviceForceEnabled(isForceEnabled);
|
11018: enforceReadPrivilegedPermission("getPhoneCapability");
|
11021: return mPhoneConfigurationManager.getCurrentPhoneCapability();
|
11053: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
11075: .enforceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
11196: return mPhoneConfigurationManager.setModemService(serviceName);
|
11209: .enforceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
11212: result = mPhoneConfigurationManager.getModemService();
|
android.googlesource.com/platform/superproject:packages/services/Telephony/src/com/android/phone/PhoneInterfaceManager.java: [ master, ] |
---|
384: public Phone phone;
|
17: package com.android.phone;
|
198: public class PhoneInterfaceManager extends ITelephony.Stub {
|
1655: private PhoneInterfaceManager(PhoneGlobals app) {
|
1672: private Phone getDefaultPhone() {
|
1706: private Phone getPhone(int subId) {
|
2347: public String getNetworkCountryIsoForPhone(int phoneId) {
|
5936: public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
|
5959: public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
|
6417: public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
|
308: private PhoneConfigurationManager mPhoneConfigurationManager;
|
1686: private Phone getPhoneFromRequest(MainThreadRequest request) {
|
1694: private Phone getPhoneFromSubId(int subId) {
|
2125: private void shutdownRadioUsingPhoneId(int phoneId) {
|
2780: public int getActivePhoneType() {
|
2785: public int getActivePhoneTypeForSlot(int slotIndex) {
|
3824: private void checkModifyPhoneStatePermission(int subId, String message) {
|
4463: private Phone getPhoneFromSlotIdOrThrowException(int slotIndex) {
|
6003: public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
|
6543: public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
|
6553: public int getSubIdForPhoneAccountHandle(
|
6568: public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
|
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
|
140: import com.android.internal.telephony.Phone;
|
174: import com.android.phone.settings.PickSmsSubscriptionActivity;
|
175: import com.android.phone.vvm.PhoneAccountHandleConverter;
|
176: import com.android.phone.vvm.RemoteVvmTaskManager;
|
177: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
|
178: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
|
383: // In cases where subId is unavailable, the caller needs to specify the phone.
|
392: MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
|
394: if (phone != null) {
|
395: this.phone = phone;
|
423: * A handler that processes messages on the main thread in the phone process. Since many
|
424: * of the Phone calls are not thread safe this is needed to shuttle the requests from the
|
425: * inbound binder threads to the main thread in the phone process. The Binder thread
|
442: final Phone defaultPhone = getDefaultPhone();
|
447: final Phone phone = getPhoneFromRequest(request);
|
466: request.result = phone != null
|
467: ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
|
478: final Phone phone = getPhoneFromRequest(request);
|
479: request.result = phone != null ?
|
1266: request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
|
1280: request.phone.requestCellInfoUpdate(request.workSource,
|
1308: Phone phone = getPhoneFromRequest(request);
|
1309: phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
|
1317: phone = getPhoneFromRequest(request);
|
1318: request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
|
1340: .enablePhone(request.phone, enable, onCompleted);
|
1346: int phoneId = request.phone.getPhoneId();
|
1361: .getPhoneStatusFromModem(request.phone, onCompleted);
|
1366: int id = request.phone.getPhoneId();
|
1389: request.phone.setSystemSelectionChannels(args.first, onCompleted);
|
1569: private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
|
1571: command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone, workSource);
|
1580: int command, Object argument, Integer subId, Phone phone, WorkSource workSource) {
|
1586: if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
|
1587: throw new IllegalArgumentException("subId and phone cannot both be specified!");
|
1588: } else if (phone != null) {
|
1589: request = new MainThreadRequest(argument, phone, workSource);
|
1629: * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
|
1633: int command, Object argument, Phone phone, WorkSource workSource) {
|
1634: MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
|
1673: Phone thePhone = getPhone(getDefaultSubscription());
|
1687: if (request.phone != null) {
|
1688: return request.phone;
|
1700: Phone phone = getPhoneFromRequest(request);
|
1701: return phone == null ? null :
|
1702: UiccController.getInstance().getUiccCard(phone.getPhoneId());
|
1705: // returns phone associated with the subId.
|
1710: private void sendEraseModemConfig(Phone phone) {
|
1711: if (phone != null) {
|
1713: mApp, phone.getSubId(), "eraseModemConfig");
|
1751: // PENDING: should we just silently fail if phone is offhook or ringing?
|
1772: // from the context of the phone app.
|
1775: if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
|
1993: final Phone phone = getPhone(getDefaultSubscription());
|
1994: if (phone != null) {
|
1995: phone.updateServiceLocation(workSource);
|
2040: final Phone phone = getPhone(subId);
|
2041: if (phone != null) {
|
2042: return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
|
2060: final Phone phone = getPhone(subId);
|
2061: if (phone != null) {
|
2062: phone.setRadioPower(!isRadioOnForSubscriber(subId));
|
2078: final Phone phone = getPhone(subId);
|
2079: if (phone == null) {
|
2082: if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
|
2100: Phone phone = PhoneFactory.getPhone(i);
|
2101: if (phone != null && phone.isRadioAvailable()) return true;
|
2117: logv("Shutting down Phone " + i);
|
2126: Phone phone = PhoneFactory.getPhone(phoneId);
|
2127: if (phone != null && phone.isRadioAvailable()) {
|
2128: phone.shutdownRadio();
|
2137: final Phone defaultPhone = PhoneFactory.getDefaultPhone();
|
2142: loge("There's no default phone.");
|
2155: final Phone phone = getPhone(subId);
|
2156: if (phone != null) {
|
2157: phone.setRadioPower(turnOn);
|
2175: final Phone phone = getPhone(subId);
|
2176: if (phone != null) {
|
2177: phone.getDataEnabledSettings().setUserDataEnabled(true);
|
2195: final Phone phone = getPhone(subId);
|
2196: if (phone != null) {
|
2197: phone.getDataEnabledSettings().setUserDataEnabled(false);
|
2211: final Phone phone = getPhone(subId);
|
2212: if (phone != null) {
|
2213: return phone.isDataAllowed(ApnSetting.TYPE_DEFAULT);
|
2262: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2263: return phone == null ? TelephonyManager.CALL_STATE_IDLE :
|
2264: PhoneConstantConversions.convertCallState(phone.getState());
|
2279: final Phone phone = getPhone(subId);
|
2280: if (phone != null) {
|
2281: return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
|
2300: final Phone phone = getPhone(subId);
|
2301: if (phone != null) {
|
2302: return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
|
2331: return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
|
2352: if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
|
2353: // Get default phone in this case.
|
2354: phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
|
2357: Phone phone = PhoneFactory.getPhone(phoneId);
|
2358: if (phone == null) return "";
|
2359: ServiceStateTracker sst = phone.getServiceStateTracker();
|
2364: EmergencyNumberTracker ent = phone.getEmergencyNumberTracker();
|
2449: for (Phone phone : PhoneFactory.getPhones()) {
|
2450: List<CellInfo> info = phone.getAllCellInfo();
|
2489: for (Phone phone : PhoneFactory.getPhones()) {
|
2491: CMD_GET_ALL_CELL_INFO, null, phone, workSource);
|
2551: final Phone phone = getPhoneFromSubId(subId);
|
2552: if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
|
2554: sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
|
2572: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2573: if (phone == null) {
|
2576: int subId = phone.getSubId();
|
2584: return phone.getImei();
|
2592: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2594: if (phone != null) {
|
2595: String imei = phone.getImei();
|
2603: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2604: if (phone == null) {
|
2608: int subId = phone.getSubId();
|
2616: return phone.getMeid();
|
2624: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2626: if (phone != null) {
|
2627: String meid = phone.getMeid();
|
2636: Phone phone = PhoneFactory.getPhone(slotIndex);
|
2637: if (phone == null) {
|
2640: int subId = phone.getSubId();
|
2649: return phone.getDeviceSvn();
|
2659: final Phone phone = getPhone(subId);
|
2660: return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
|
2670: final Phone phone = getPhone(subId);
|
2671: return phone == null ? null : phone.getCarrierName();
|
2681: final Phone phone = getPhone(subId);
|
2682: return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
|
2683: : phone.getSpecificCarrierId();
|
2693: final Phone phone = getPhone(subId);
|
2694: return phone == null ? null : phone.getSpecificCarrierName();
|
2705: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
2706: if (phone == null) {
|
2711: return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
|
2722: * Make sure the caller has the MODIFY_PHONE_STATE permission.
|
2727: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
|
2747: * Make sure the caller has the CALL_PHONE permission.
|
2752: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
|
2788: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
2789: if (phone == null) {
|
2790: return PhoneConstants.PHONE_TYPE_NONE;
|
2792: return phone.getPhoneType();
|
2819: final Phone phone = getPhone(subId);
|
2820: if (phone != null) {
|
2821: return phone.getCdmaEriIconIndex();
|
2852: final Phone phone = getPhone(subId);
|
2853: if (phone != null) {
|
2854: return phone.getCdmaEriIconMode();
|
2883: final Phone phone = getPhone(subId);
|
2884: if (phone != null) {
|
2885: return phone.getCdmaEriText();
|
2904: final Phone phone = getPhone(subId);
|
2905: if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
2906: return phone.getLine1Number();
|
2908: loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
|
2926: final Phone phone = getPhone(subId);
|
2927: if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
2928: return phone.getCdmaMin();
|
2940: if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
|
2942: throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
|
3106: final Phone phone = getPhone(subId);
|
3107: if (phone != null) {
|
3108: phone.setVoiceActivationState(activationState);
|
3127: final Phone phone = getPhone(subId);
|
3128: if (phone != null) {
|
3129: phone.setDataActivationState(activationState);
|
3145: final Phone phone = getPhone(subId);
|
3148: if (phone != null) {
|
3149: return phone.getVoiceActivationState();
|
3165: final Phone phone = getPhone(subId);
|
3168: if (phone != null) {
|
3169: return phone.getDataActivationState();
|
3191: final Phone phone = getPhone(subId);
|
3192: if (phone != null) {
|
3193: return phone.getVoiceMessageCount();
|
3210: final Phone phone = getPhone(subId);
|
3211: return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
|
3224: final Phone defaultPhone = getDefaultPhone();
|
3262: for (Phone phone : PhoneFactory.getPhones()) {
|
3263: if (phone.isInEmergencySmsMode()) {
|
3274: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3301: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3339: Phone phone = getPhone(subId);
|
3340: if (phone == null) {
|
3345: phone.getImsRegistrationState(regState -> {
|
3372: Phone phone = getPhone(subId);
|
3373: if (phone == null) {
|
3378: phone.getImsRegistrationTech(regTech -> {
|
3397: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3423: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3474: Phone phone = getPhone(subId);
|
3475: if (phone == null) return false;
|
3476: return phone.isImsCapabilityAvailable(capability, regTech);
|
3524: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3561: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3595: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3630: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3682: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3764: * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
|
3831: Phone phone = getPhone(subId);
|
3832: if (phone == null) {
|
3833: loge("phone instance null for subid " + subId);
|
3837: if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
|
3841: if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
|
4275: final Phone phone = getPhone(subId);
|
4276: if (phone != null) {
|
4277: return phone.getServiceState().getDataNetworkType();
|
4309: final Phone phone = getPhone(subId);
|
4310: if (phone != null) {
|
4311: return phone.getServiceState().getDataNetworkType();
|
4334: final Phone phone = getPhone(subId);
|
4335: if (phone != null) {
|
4336: return phone.getServiceState().getVoiceNetworkType();
|
4361: final Phone phone = PhoneFactory.getPhone(slotIndex);
|
4362: if (phone != null) {
|
4363: return phone.getIccCard().hasIccCard();
|
4378: * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
|
4379: * or {@link Phone#LTE_ON_CDMA_TRUE}
|
4398: final Phone phone = getPhone(subId);
|
4399: if (phone == null) {
|
4467: + " does not correspond to an active phone");
|
4498: private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
|
4515: CMD_OPEN_CHANNEL, new Pair<String, Integer>(aid, p2), phone,
|
4540: private boolean iccCloseLogicalChannelWithPermission(Phone phone, int channel) {
|
4546: Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, channel, phone,
|
4583: private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
|
4592: new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
|
4639: private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
|
4657: new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
|
4891: Phone phone = PhoneFactory.getPhone(slotIndex);
|
4892: if (phone != null) {
|
4894: mApp, phone.getSubId(), "resetModemConfig");
|
4917: Phone phone = PhoneFactory.getPhone(slotIndex);
|
4918: if (phone != null) {
|
4920: mApp, phone.getSubId(), "rebootModem");
|
4936: final Phone defaultPhone = getDefaultPhone();
|
5268: final Phone phone = getPhone(subId);
|
5269: if (phone == null) {
|
5272: OperatorInfo networkSelection = phone.getSavedNetworkSelection();
|
5274: ? phone.getManualNetworkSelectionPlmn() : networkSelection.getOperatorNumeric();
|
5484: final Phone defaultPhone = getDefaultPhone();
|
5670: final Phone phone = getPhone(subId);
|
5672: if (phone != null) {
|
5673: return phone.hasMatchedTetherApnSetting();
|
5697: Phone phone = PhoneFactory.getPhone(phoneId);
|
5698: if (phone != null) {
|
5700: phone.getDataEnabledSettings().setUserDataEnabled(enable);
|
5702: loge("setUserDataEnabled: no phone found. Invalid subId=" + subId);
|
5720: final Phone phone = getPhone(subId);
|
5722: if (phone != null) {
|
5727: phone.setAlwaysReportSignalStrength(isEnable);
|
5729: loge("setAlwaysReportSignalStrength: no phone found for subId="
|
5758: * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
|
5776: Phone phone = PhoneFactory.getPhone(phoneId);
|
5777: if (phone != null) {
|
5778: boolean retVal = phone.isUserDataEnabled();
|
5782: if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
|
5805: Phone phone = PhoneFactory.getPhone(phoneId);
|
5806: if (phone != null) {
|
5807: boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
|
5811: if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
|
5820: Phone phone) {
|
5821: if (uid == Process.SYSTEM_UID || uid == Process.PHONE_UID) {
|
5831: PackageManager pkgMgr = phone.getContext().getPackageManager();
|
5836: int subId = phone.getSubId();
|
5844: phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
|
5856: private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, Phone phone,
|
5865: int subId = phone.getSubId();
|
5873: phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
|
5883: final Phone phone = getPhone(subId);
|
5884: if (phone == null) {
|
5888: UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
|
5896: phone.getContext().getPackageManager()), Binder.getCallingUid(), phone);
|
5902: final Phone phone = getPhone(subId);
|
5903: if (phone == null) {
|
5908: UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
|
5915: phone.getContext().getPackageManager(), uid), uid, phone);
|
6020: final Phone phone = getPhone(subId);
|
6021: UiccCard card = phone == null ? null : phone.getUiccCard();
|
6043: final Phone phone = getPhone(subId);
|
6044: if (phone == null) {
|
6047: final String subscriberId = phone.getSubscriberId();
|
6270: final Phone phone = getPhone(subId);
|
6271: return phone == null ? false : phone.setOperatorBrandOverride(brand);
|
6286: final Phone phone = getPhone(subId);
|
6287: if (phone == null) {
|
6290: return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
|
6341: Phone phone = PhoneFactory.getPhone(phoneId);
|
6343: if (phone == null) {
|
6350: mApp, phone.getSubId(), "getRadioAccessFamily");
|
6360: final Phone defaultPhone = getDefaultPhone();
|
6374: final Phone defaultPhone = getDefaultPhone();
|
6428: .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
|
6459: final Phone phone = getPhone(subscriptionId);
|
6460: if (phone == null) {
|
6461: loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
|
6468: phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
|
6501: * Returns the unique device ID of phone, for example, the IMEI for
|
6505: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
6509: final Phone phone = PhoneFactory.getPhone(0);
|
6510: if (phone == null) {
|
6513: int subId = phone.getSubId();
|
6521: return phone.getDeviceId();
|
6534: Phone phone = getPhone(subId);
|
6535: if (phone != null) {
|
6536: return phone.isImsRegistered();
|
6557: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
6573: Phone phone = getPhone(subscriptionId);
|
6574: if (phone == null) {
|
6577: return PhoneUtils.makePstnPhoneAccountHandle(phone);
|
6589: Phone phone = getPhone(subId);
|
6590: if (phone != null) {
|
6591: return phone.isWifiCallingEnabled();
|
6606: Phone phone = getPhone(subId);
|
6607: if (phone != null) {
|
6608: return phone.isVideoEnabled();
|
6624: Phone phone = getPhone(subId);
|
6625: if (phone != null) {
|
6626: return phone.getImsRegistrationTech();
|
6684: final Phone phone = getPhone(subId);
|
6685: if (phone == null) {
|
6692: phone.getContext().getOpPackageName(), phone.getContext().getAttributionTag());
|
6701: final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
|
6829: final Phone phone = getPhone(subId);
|
6830: if (phone == null) {
|
6834: ServiceState ss = phone.getServiceState();
|
6847: * Returns the URI for the per-account voicemail ringtone set in Phone settings.
|
6858: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
|
6859: if (phone == null) {
|
6860: phone = getDefaultPhone();
|
6863: return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
|
6873: * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
6883: final Phone defaultPhone = getDefaultPhone();
|
6894: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
|
6895: if (phone == null) {
|
6896: phone = defaultPhone;
|
6898: VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
|
6905: * Returns whether vibration is set for voicemail notification in Phone settings.
|
6915: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
|
6916: if (phone == null) {
|
6917: phone = getDefaultPhone();
|
6920: return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
|
6930: * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
6940: final Phone defaultPhone = getDefaultPhone();
|
6951: Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
|
6952: if (phone == null) {
|
6953: phone = defaultPhone;
|
6955: VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
|
6962: * Make sure either called from same process as self (phone) or IPC caller has read privilege.
|
6967: mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
|
6972: * Make sure either called from same process as self (phone) or IPC caller has send SMS
|
7015: Phone phone = getPhone(subId);
|
7019: if (phone == null) {
|
7024: aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
|
7044: Phone phone = getPhone(subId);
|
7048: if (phone == null) {
|
7053: esn = phone.getEsn();
|
7072: Phone phone = getPhone(subId);
|
7076: if (phone == null) {
|
7081: cdmaPrlVersion = phone.getCdmaPrlVersion();
|
7175: final Phone phone = getPhone(subId);
|
7178: if (phone == null) {
|
7183: phone.carrierActionSetMeteredApnsEnabled(enabled);
|
7200: final Phone phone = getPhone(subId);
|
7203: if (phone == null) {
|
7208: phone.carrierActionSetRadioEnabled(enabled);
|
7228: final Phone phone = getPhone(subId);
|
7231: if (phone == null) {
|
7236: phone.carrierActionReportDefaultNetworkStatus(report);
|
7252: final Phone phone = getPhone(subId);
|
7253: if (phone == null) {
|
7258: phone.carrierActionResetAll();
|
7265: * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
|
7272: writer.println("Permission Denial: can't dump Phone from pid="
|
7303: Phone phone = getPhone(subId);
|
7304: if (phone != null) {
|
7305: phone.getDataEnabledSettings().setPolicyDataEnabled(enabled);
|
7324: Phone phone = getPhone(subId);
|
7328: if (phone != null) {
|
7329: return phone.getClientRequestStats();
|
7356: Phone phone = PhoneFactory.getPhone(slotIndex);
|
7362: if (phone != null) {
|
7363: phone.setSimPowerState(state, workSource);
|
7385: * Check if phone is in emergency callback mode
|
7386: * @return true if phone is in emergency callback mode
|
7392: final Phone phone = getPhone(subId);
|
7396: if (phone != null) {
|
7397: return phone.isInEcm();
|
7417: Phone p = getPhone(subId);
|
7437: Phone phone = PhoneFactory.getPhone(slotIndex);
|
7438: if (phone != null) {
|
7439: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
|
7446: return phone.getRadioPowerState();
|
7459: * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
|
7479: Phone phone = getPhone(subId);
|
7480: isEnabled = phone != null ? phone.getDataRoamingEnabled() : false;
|
7492: * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
|
7505: Phone phone = getPhone(subId);
|
7506: if (phone != null) {
|
7507: phone.setDataRoamingEnabled(isEnabled);
|
7523: Phone phone = getPhone(subId);
|
7524: if (phone != null) {
|
7525: isAllowed = phone.isCspPlmnEnabled();
|
7544: // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
|
7681: * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
|
7690: Phone phone = getPhone(subId);
|
7691: if (phone == null) {
|
7694: UiccCard uiccCard = phone.getUiccCard();
|
7731: * not set, return {@link Phone#PREFERRED_NT_MODE}.
|
7739: return Phone.PREFERRED_NT_MODE;
|
7749: final Phone phone = getPhone(subId);
|
7750: if (phone == null) {
|
7754: phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
|
7772: final Phone phone = getPhone(subId);
|
7773: if (phone == null) {
|
7777: return phone.getCarrierIdListVersion();
|
7846: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
7851: for (Phone phone: PhoneFactory.getPhones()) {
|
7852: if (phone.getEmergencyNumberTracker() != null
|
7853: && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
|
7855: phone.getSubId(),
|
7856: phone.getEmergencyNumberTracker().getEmergencyNumberList());
|
7867: final Phone defaultPhone = getDefaultPhone();
|
7875: for (Phone phone: PhoneFactory.getPhones()) {
|
7876: if (phone.getEmergencyNumberTracker() != null
|
7877: && phone.getEmergencyNumberTracker()
|
7898: for (Phone phone: PhoneFactory.getPhones()) {
|
7899: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
7920: for (Phone phone: PhoneFactory.getPhones()) {
|
7921: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
7940: final Phone phone = getPhone(subId);
|
7941: if (phone == null) {
|
7945: return phone.getEmergencyNumberDbVersion();
|
7957: for (Phone phone: PhoneFactory.getPhones()) {
|
7958: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
7974: for (Phone phone: PhoneFactory.getPhones()) {
|
7975: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
7991: for (Phone phone: PhoneFactory.getPhones()) {
|
7992: EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
|
8005: Phone phone = getPhone(subId);
|
8006: if (phone == null) {
|
8012: .getUiccProfileForPhone(phone.getPhoneId());
|
8031: Phone phone = PhoneFactory.getPhone(slotIndex);
|
8032: if (phone == null) {
|
8035: return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
|
8048: Phone phone = PhoneFactory.getPhone(slotIndex);
|
8049: if (phone == null) return false;
|
8052: mApp, phone.getSubId(), callingPackage, callingFeatureId,
|
8054: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
8060: return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
|
8062: return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
|
8130: * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
|
8131: * permission, but the other way around is possible with either MODIFY_PHONE_STATE
|
8160: Phone phone = getPhone(subId);
|
8161: if (phone == null) {
|
8166: UiccCard uiccCard = phone.getUiccCard();
|
8236: Phone phone = getDefaultPhone();
|
8237: if (phone == null) return -1;
|
8238: HalVersion hv = phone.getHalVersion();
|
8268: enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
|
8274: Phone phone = getPhone(subId);
|
8275: if (phone == null) return false;
|
8277: boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
|
8278: return !isMetered || phone.getDataEnabledSettings().isDataEnabled(apnType);
|
8291: Phone phone = getPhone(subId);
|
8292: if (phone == null) return true; // By default return true.
|
8294: return ApnSettingUtils.isMeteredApnType(apnType, phone);
|
8306: Phone phone = getPhone(subscriptionId);
|
8307: if (phone == null) {
|
8327: sendRequestAsync(CMD_SET_SYSTEM_SELECTION_CHANNELS, argument, phone, null);
|
8408: Phone phone = getPhone(subId);
|
8409: if (phone == null) return false;
|
8411: return phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(allow);
|
8424: Phone phone = getPhone(subId);
|
8425: if (phone == null) return false;
|
8427: return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
|
8440: Phone phone = getPhone(subId);
|
8441: if (phone == null) return false;
|
8443: return phone.getDataEnabledSettings().setAlwaysAllowMmsData(alwaysAllow);
|
8461: for (Phone phone : PhoneFactory.getPhones()) {
|
8462: Phone defaultPhone = phone.getImsPhone();
|
8463: if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
|
8508: Phone phone = getPhone(subId);
|
8509: if (phone != null && phone.getIccCard() != null) {
|
8510: return phone.getIccCard().getIccLockEnabled();
|
8534: Phone phone = getPhone(subId);
|
8535: if (phone == null) {
|
8542: new Pair<Boolean, String>(enabled, password), phone, null);
|
8566: Phone phone = getPhone(subId);
|
8567: if (phone == null) {
|
8574: new Pair<String, String>(oldPassword, newPassword), phone, null);
|
8633: throw new SecurityException("Requires READ_PHONE_STATE permission.");
|
8636: Phone phone = getPhone(subId);
|
8637: if (phone == null) {
|
8638: throw new RuntimeException("phone is not available");
|
8643: return phone.getEquivalentHomePlmns();
|
22: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
|
63: import android.telecom.PhoneAccount;
|
64: import android.telecom.PhoneAccountHandle;
|
83: import android.telephony.PhoneCapability;
|
84: import android.telephony.PhoneNumberRange;
|
141: import com.android.internal.telephony.PhoneConfigurationManager;
|
142: import com.android.internal.telephony.PhoneConstantConversions;
|
143: import com.android.internal.telephony.PhoneConstants;
|
144: import com.android.internal.telephony.PhoneFactory;
|
158: import com.android.internal.telephony.imsphone.ImsPhone;
|
159: import com.android.internal.telephony.imsphone.ImsPhoneCallTracker;
|
199: private static final String LOG_TAG = "PhoneInterfaceManager";
|
200: private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
|
298: private static PhoneInterfaceManager sInstance;
|
300: private PhoneGlobals mApp;
|
697: defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
|
724: defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
|
735: defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
|
745: defaultPhone.resetModemConfig(onCompleted);
|
793: defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
|
1031: if (defaultPhone != null) {
|
1032: defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
|
1095: defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
|
1123: defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
|
1329: defaultPhone.rebootModem(onCompleted);
|
1339: PhoneConfigurationManager.getInstance()
|
1349: mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
|
1360: PhoneConfigurationManager.getInstance()
|
1448: defaultPhone.eraseModemConfig(onCompleted);
|
1494: getDefaultPhone().getContext().sendBroadcastAsUser(
|
1640: * Initialize the singleton PhoneInterfaceManager instance.
|
1641: * This is only done once, at startup, from PhoneApp.onCreate().
|
1643: /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
|
1644: synchronized (PhoneInterfaceManager.class) {
|
1646: sInstance = new PhoneInterfaceManager(app);
|
1657: mCM = PhoneGlobals.getInstance().mCM;
|
1658: mImsResolver = PhoneGlobals.getInstance().getImsResolver();
|
1666: mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
|
1674: return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
|
1696: ? getDefaultPhone() : getPhone(subId);
|
1707: return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
|
1725: PackageManager pm = getDefaultPhone().getContext().getPackageManager();
|
1752: PhoneConstants.State state = mCM.getState(subId);
|
1753: if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
|
1812: return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
|
1817: return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
|
1825: final UnlockSim checkSimPin = new UnlockSim(getPhone(subId).getIccCard());
|
1838: final UnlockSim checkSimPuk = new UnlockSim(getPhone(subId).getIccCard());
|
1855: private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
|
1885: mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
|
1890: mResult = PhoneConstants.PIN_OPERATION_ABORTED;
|
1892: mResult = PhoneConstants.PIN_GENERAL_FAILURE;
|
1895: mResult = PhoneConstants.PIN_RESULT_SUCCESS;
|
2103: logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
|
2138: if (defaultPhone != null) {
|
2139: defaultPhone.setRadioPower(turnOn);
|
2283: return PhoneConstantConversions.convertDataState(
|
2284: PhoneConstants.DataState.DISCONNECTED);
|
2356: final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
|
2564: getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
|
2768: Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
2772: Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
2776: Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
|
2938: public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
|
2967: return getDefaultPhone().needsOtaServiceProvisioning();
|
3002: PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
|
3003: if (phoneAccountHandle == null) {
|
3006: return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
|
3091: SmsController smsController = PhoneFactory.getSmsController();
|
3226: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
3235: defaultPhone.sendDialerSpecialCode(inputCode);
|
3290: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3314: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
|
3410: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3437: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
|
3453: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3532: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3550: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3570: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3585: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3604: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3620: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3639: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3655: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3671: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3691: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3707: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3722: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3738: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3754: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3773: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3792: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3810: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3855: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3885: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3918: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
3977: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4146: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4171: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4197: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4223: // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
|
4393: return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
|
4400: return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
|
4403: .orElse(PhoneConstants.LTE_ON_CDMA_FALSE);
|
4464: int phoneId = UiccController.getInstance().getPhoneIdFromSlotId(slotIndex);
|
4465: if (phoneId == -1) {
|
4469: return PhoneFactory.getPhone(phoneId);
|
4504: ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
|
4646: ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
|
4937: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
|
4944: return defaultPhone.getPcscfAddress(apnType);
|
5188: getDefaultPhone().setImsRegistrationState(registered);
|
5424: request, messenger, binder, getPhone(subId),
|
5485: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
|
5493: return PhoneFactory.calculatePreferredNetworkType(defaultPhone.getContext(), 0);
|
5695: int phoneId = mSubscriptionController.getPhoneId(subId);
|
5696: if (DBG) log("setUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
|
5774: int phoneId = mSubscriptionController.getPhoneId(subId);
|
5775: if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
|
5803: int phoneId = mSubscriptionController.getPhoneId(subId);
|
5804: if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
|
5924: int phoneId = SubscriptionManager.getPhoneId(subId);
|
5925: UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
|
5932: getPhone(phoneId), pkgName);
|
5949: getPhone(i), pkgName);
|
5960: if (!SubscriptionManager.isValidPhoneId(phoneId)) {
|
5961: loge("phoneId " + phoneId + " is not valid.");
|
5964: UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
|
5966: loge("getCarrierPackageNamesForIntentAndPhone: No UICC");
|
5973: public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
|
5977: UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
|
6340: public int getRadioAccessFamily(int phoneId, String callingPackage) {
|
6351: raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
|
6365: ImsManager.getInstance(defaultPhone.getContext(),
|
6366: defaultPhone.getPhoneId()).setVtSetting(enable);
|
6375: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
|
6387: ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
|
6502: * GSM and the MEID for CDMA phones. Return null if device ID is not available.
|
6546: return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
|
6554: PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
|
6561: return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
|
6657: cleanUpSmsRawTable(getDefaultPhone().getContext());
|
6668: sendEraseModemConfig(getDefaultPhone());
|
6849: * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
|
6852: * PhoneAccount.
|
6855: public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
|
6875: * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
|
6878: * PhoneAccount.
|
6882: PhoneAccountHandle phoneAccountHandle, Uri uri) {
|
6885: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
6888: mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
|
6907: * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
|
6909: * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
|
6912: public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
|
6932: * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
|
6935: * specific PhoneAccount.
|
6939: PhoneAccountHandle phoneAccountHandle, boolean enabled) {
|
6942: TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
|
6945: mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
|
7286: return new TelephonyShellCommand(this, getDefaultPhone().getContext()).exec(
|
7546: if (checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
|
7735: int phoneId = mSubscriptionController.getPhoneId(subId);
|
7736: if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
|
7737: return list.get(phoneId);
|
7871: mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
|
8087: getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
|
8110: PhoneCapability staticCapability =
|
8216: int phoneCount = TelephonyManager.getDefault().getPhoneCount();
|
8218: int[] logicalSlotsMapping = new int[phoneCount];
|
8351: SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
|
8377: return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
|
8394: return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
|
8464: ImsPhone imsPhone = (ImsPhone) defaultPhone;
|
8466: (ImsPhoneCallTracker) imsPhone.getCallTracker();
|
8468: Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
|
8469: + imsPhone.getMsisdn());
|
8603: // * Inherited from PhoneWindowManager *
|
130: import com.android.internal.telephony.DefaultPhoneNotifier;
|
480: getPhoneFromRequest(request).handlePinMmi((String) request.argument)
|
755: getPhoneFromRequest(request).getPreferredNetworkType(onCompleted);
|
783: getPhoneFromRequest(request).setPreferredNetworkType(networkType, onCompleted);
|
807: getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
|
819: getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
|
829: getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
|
836: getPhoneFromRequest(request).getCallForwardingOption(
|
893: getPhoneFromRequest(request).setCallForwardingOption(
|
915: getPhoneFromRequest(request).getCallWaiting(onCompleted);
|
959: getPhoneFromRequest(request).setCallWaiting(isEnable, onCompleted);
|
1011: getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
|
1206: getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
|
1227: getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
|
1243: getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
|
1255: getPhoneFromRequest(request).setCdmaSubscription(subscriptionMode, onCompleted);
|
1370: mPhoneConfigurationManager.addToPhoneStatusCache(id,
|
1458: getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
|
1476: getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
|
1690: return getPhoneFromSubId(request.subId);
|
2024: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
2099: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
2116: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
2118: shutdownRadioUsingPhoneId(i);
|
2641: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
2781: return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
|
2811: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
2844: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
2875: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3016: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3184: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
3244: .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3281: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3307: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3364: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3404: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3429: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3529: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3566: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3600: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3635: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3687: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3769: TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
3851: checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
|
3915: checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
|
4267: && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
|
4301: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
4326: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
4419: return mSubscriptionController.getPhoneId(getDefaultSubscription());
|
4481: return iccOpenLogicalChannelWithPermission(getPhoneFromSubId(subId), callingPackage, aid,
|
4494: return iccOpenLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
|
4529: return iccCloseLogicalChannelWithPermission(getPhoneFromSubId(subId), channel);
|
4536: return iccCloseLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
|
4565: return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
|
4579: getPhoneFromSlotIdOrThrowException(slotIndex), channel, cla, command, p1, p2, p3,
|
4618: return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
|
4634: getPhoneFromSlotIdOrThrowException(slotIndex), callingPackage, cla, command, p1,
|
4719: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
4757: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
|
5131: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5259: .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
|
5508: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5557: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5602: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5606: return getPhoneFromSubId(subId).getAllowedNetworkTypes(reason);
|
5623: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
5627: return getPhoneFromSubId(subId).getEffectiveAllowedNetworkTypes();
|
5649: getPhoneFromSubId(subId).setAllowedNetworkTypes(reason, allowedNetworkTypes);
|
5940: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
6004: enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
|
6010: for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
|
6090: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
|
6117: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6140: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6349: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
6399: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6418: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
6555: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
|
6556: callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
|
6569: enforceReadPrivilegedPermission("getPhoneAccountHandleForSubscriptionId, "
|
6793: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7320: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7472: TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
|
7517: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
7645: slot.getPhoneId(),
|
7786: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7794: return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
|
7803: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
7843: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
7870: .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
|
8051: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8086: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
|
8111: mPhoneConfigurationManager.getStaticPhoneCapability();
|
8151: mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
|
8191: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
8198: return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
|
8207: metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
|
8221: if (SubscriptionManager.isValidPhoneId(slotInfos[i].getLogicalSlotIdx())) {
|
8337: SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
|
8465: ImsPhoneCallTracker imsPhoneCallTracker =
|
8467: imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
|
8631: if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
|
android.googlesource.com/platform/frameworks/opt/telephony:src/java/com/android/internal/telephony/Phone.java: [ master, ] |
---|
138: public abstract class Phone extends Handler implements PhoneInternalInterface {
|
545: protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
|
562: protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
|
358: protected Phone mImsPhone = null;
|
645: public void createImsPhone() {
|
3922: public Phone getImsPhone() {
|
3927: public void setImsPhone(ImsPhone imsPhone) {
|
4594: public Phone getDefaultPhone() {
|
217: protected static final int EVENT_UPDATE_PHONE_OBJECT = 42;
|
322: protected boolean mIsPhoneInEcmState = false;
|
355: protected int mPhoneId;
|
485: public String getPhoneName() {
|
489: protected void setPhoneName(String name) {
|
1858: public void updatePhoneObject(int voiceRadioTech) {
|
3019: public abstract int getPhoneType();
|
4060: public int getPhoneId() {
|
4068: public int getVoicePhoneServiceState() {
|
128: * A base implementation for the com.android.internal.telephony.Phone interface.
|
130: * Note that implementations of Phone.java are expected to be used
|
139: private static final String LOG_TAG = "Phone";
|
269: * This method is invoked when the Phone exits Emergency Callback Mode.
|
320: // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and
|
480: * Returns a string identifier for this phone interface for parties
|
481: * outside the phone app process.
|
536: * Constructs a Phone in normal (non-unit test) mode.
|
547: this(name, notifier, context, ci, unitTestMode, SubscriptionManager.DEFAULT_PHONE_INDEX,
|
552: * Constructs a Phone in normal (non-unit test) mode.
|
560: * @param phoneId the phone-id of this phone.
|
588: * (i.e. voice) phone calls over the telephony network, and is allowed
|
619: if (getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
|
634: if (getPhoneType() != PhoneConstants.PHONE_TYPE_SIP) {
|
646: if (getPhoneType() == PhoneConstants.PHONE_TYPE_SIP) {
|
650: synchronized(Phone.lockForRadioTechnologyChange) {
|
713: // messages to be handled whether or not the phone is being destroyed
|
715: // resources of the phone being destroyed
|
767: // redial happened over that Phone so that it can be replaced with the
|
844: Phone imsPhone = mImsPhone;
|
883: * Gets the context for the phone, as set at initialization time.
|
939: * Subclasses of Phone probably want to replace this with a
|
965: * Subclasses of Phone probably want to replace this with a
|
989: * Subclasses of Phone probably want to replace this with a
|
1001: * Notify the phone that an SMS has been sent. This will be used determine if the SMS was sent
|
1015: * Determine if the Phone has recently sent an emergency SMS and is still in the interval of
|
1056: protected void migrateFrom(Phone from) {
|
1069: // The emergency state of IMS phone will be cleared in ImsPhone#notifySrvccState after
|
1132: * Connection.getCall() == Phone.getRingingCall()
|
1152: * Notifies when phone's video capabilities changes <p>
|
1157: * AsyncResult.result = true if phone supports video calling <p>
|
1296: * Example: If Phone.dial is called with "*#31#", then the app will
|
1619: * For unit tests; don't send notifications to "Phone"
|
1636: * Subclasses of Phone probably want to replace this with a
|
1741: // no need for regular phone
|
1745: * Subclasses of Phone probably want to replace this with a
|
1757: * we send out a final ServiceState update when a phone's subId becomes invalid.
|
1767: * If this is a simulated phone interface, returns a SimulatedRadioControl.
|
1781: * the thread that originally obtained this Phone instance.
|
1786: "com.android.internal.telephony.Phone must be used from within one thread");
|
1818: * If the phone has an active call and call waiting occurs,
|
1819: * then the phone state is RINGING not OFFHOOK
|
1828: * Retrieves the IccFileHandler of the Phone instance
|
1847: * Retrieves the Handler of the Phone instance
|
1854: * Update the phone object if the voice radio technology has changed
|
1862: * Retrieves the ServiceStateTracker of the phone instance.
|
1877: .contains(Phone.RADIO_POWER_REASON_THERMAL);
|
1881: * Retrieves the EmergencyNumberTracker of the phone instance.
|
1910: * Retrieves the DeviceStateMonitor of the phone instance.
|
1917: * Retrieves the DisplayInfoController of the phone instance.
|
1924: * Retrieves the SignalStrengthController of the phone instance.
|
1973: * Returns the ICC card interface for this phone, or null
|
1979: //throw new Exception("getIccCard Shouldn't be called from Phone");
|
2166: if (getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
|
2584: * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
|
2585: * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
|
2586: * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
|
2587: * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
|
2598: * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
|
2599: * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
|
2600: * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
|
2601: * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
|
2919: // This property is used to handle phone process crashes, and is the same for CDMA and IMS
|
2926: * @return {@code true} if we are in emergency call back mode. This is a period where the phone
|
2939: return getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA && isInEcm()
|
2951: * @return true if this Phone is in an emergency call that caused emergency callback mode to be
|
2959: * Set whether or not this Phone has an active emergency call that was placed during emergency
|
3015: * Return a numerical identifier for the phone radio interface.
|
3016: * @return PHONE_TYPE_XXX as defined above.
|
3029: /** sets the voice mail count of the phone and notifies listeners. */
|
3655: // Populate the iccid, imei and phone number in the provisioning url.
|
3664: phoneNumber /* Phone number */);
|
3751: * Subclasses of Phone probably want to replace this with a
|
3769: * Notify registrants if phone is video capable.
|
3883: Rlog.e(LOG_TAG, "Error! This function should never be executed, inactive Phone.");
|
3896: * Gets the Uicc card corresponding to this phone.
|
3897: * @return the UiccCard object corresponding to the phone ID.
|
3905: * Gets the Uicc port corresponding to this phone.
|
3906: * @return the UiccPort object corresponding to the phone ID.
|
3919: * Return an instance of a IMS phone
|
4057: * Returns the phone id.
|
4069: Phone imsPhone = mImsPhone;
|
4143: Phone imsPhone = mImsPhone;
|
4162: Phone imsPhone = mImsPhone;
|
4176: Phone imsPhone = mImsPhone;
|
4200: Phone imsPhone = mImsPhone;
|
4210: * @return the IMS MmTel Registration technology for this Phone, defined in
|
4214: Phone imsPhone = mImsPhone;
|
4224: * Get the IMS MmTel Registration technology for this Phone, defined in
|
4228: Phone imsPhone = mImsPhone;
|
4237: * Asynchronously get the IMS MmTel Registration state for this Phone.
|
4240: Phone imsPhone = mImsPhone;
|
4299: * Set phone radio capability
|
4301: * @param rc the phone radio capability defined in
|
4310: * Get phone radio access family
|
4330: * Get phone radio capability
|
4344: * @param rc the phone radio capability currently in effect for this phone.
|
4359: // When radio capability switch is done, query IMEI value and update it in Phone objects
|
4378: * Registers the handler when phone radio capability is changed.
|
4389: * Unregister for notifications when phone radio type and access technology is changed.
|
4410: * Determines if video calling is enabled for the phone.
|
4416: Phone imsPhone = mImsPhone;
|
4549: public static void checkWfcWifiOnlyModeBeforeDial(Phone imsPhone, int phoneId, Context context)
|
4589: * This function returns the parent phone of the current phone. It is applicable
|
4590: * only for IMS phone (function is overridden by ImsPhone). For others the phone
|
4643: * none of the phone is in service, and one of them has the capability to make the emergency
|
4650: for (Phone phone : PhoneFactory.getPhones()) {
|
4651: if (phone != null) {
|
4652: ServiceStateTracker sst = phone.getServiceStateTracker();
|
4715: /** Returns the {@link VoiceCallSessionStats} for this phone ID. */
|
4720: /** Sets the {@link VoiceCallSessionStats} mock for this phone ID during unit testing. */
|
4726: /** Returns the {@link SmsStats} for this phone ID. */
|
4731: /** Sets the {@link SmsStats} mock for this phone ID during unit testing. */
|
4810: * Returns the InboundSmsHandler object for this phone
|
4853: pw.println("Phone: subId=" + getSubId());
|
5050: pw.println("Phone Local Log: ");
|
52: import android.telephony.PhoneStateListener;
|
87: import com.android.internal.telephony.imsphone.ImsPhone;
|
88: import com.android.internal.telephony.imsphone.ImsPhoneCall;
|
132: * originally called PhoneFactory to obtain the interface.
|
447: * PhoneNotifier is an abstraction for all system-wide
|
452: protected PhoneNotifier mNotifier;
|
494: * Retrieves Nai for phones. Returns null if Nai is not set.
|
563: boolean unitTestMode, int phoneId,
|
565: mPhoneId = phoneId;
|
602: * By default old phones won't have the property set but do generate
|
642: * Start setup of ImsPhone, which will start trying to connect to the ImsResolver. Will not be
|
651: if (mImsPhone == null) {
|
652: mImsPhone = PhoneFactory.makeImsPhone(mNotifier, this);
|
653: CallManager.getInstance().registerPhone(mImsPhone);
|
654: mImsPhone.registerForSilentRedial(
|
729: PhoneConstants.State state = getState();
|
731: && ((state == PhoneConstants.State.RINGING) ||
|
732: (state == PhoneConstants.State.IDLE))) {
|
743: if (getState() == PhoneConstants.State.RINGING) {
|
753: // This is an ImsPhone -> GsmCdmaPhone redial
|
754: // See ImsPhone#initiateSilentRedial
|
765: // The ImsPhoneConnection that is owned by the ImsPhone is currently the
|
770: if (mImsPhone != null) {
|
772: mImsPhone.notifyRedialConnectionChanged(cn);
|
776: if (mImsPhone != null) {
|
777: mImsPhone.notifyRedialConnectionChanged(null);
|
851: if (imsPhone != null) {
|
852: conn = imsPhone.getHandoverConnection();
|
853: migrateFrom(imsPhone);
|
855: Rlog.d(LOG_TAG, "HANDOVER_STARTED: mImsPhone null");
|
860: if (imsPhone != null) {
|
861: imsPhone.notifySrvccState(srvccState);
|
863: Rlog.d(LOG_TAG, "HANDOVER_COMPLETED: mImsPhone null");
|
916: * {@link PhoneConstants.State} which can be obtained using the {@link PhoneStateListener}
|
1086: // Since CallManager has already registered with both CS and IMS phones,
|
1825: public abstract PhoneConstants.State getState();
|
2049: * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged
|
2050: * PhoneStateListener.onCellInfoChanged} will be invoked.
|
2065: * available on this interface. Use PhoneStateNotifier or similar instead.
|
2161: * available on this interface. Use PhoneStateNotifier or similar instead.
|
2212: * interface. Use <code>PhoneStateNotifier</code> or an equivalent.
|
2836: public PhoneConstants.DataState getDataConnectionState(String apnType) {
|
2837: return PhoneConstants.DataState.DISCONNECTED;
|
2920: // phones
|
2940: && (mImsPhone == null || !mImsPhone.isInImsEcm());
|
3005: if (mImsPhone != null) {
|
3006: isPresent = isVideoCallOrConference(mImsPhone.getForegroundCall()) ||
|
3007: isVideoCallOrConference(mImsPhone.getBackgroundCall()) ||
|
3008: isVideoCallOrConference(mImsPhone.getRingingCall());
|
3150: * Retrieves the MIN for CDMA phones.
|
3166: * Retrieves PRL Version for CDMA phones
|
3657: String phoneNumber = getLine1Number();
|
3658: if (TextUtils.isEmpty(phoneNumber)) {
|
3659: phoneNumber = "0000000000";
|
3845: * Retrieves the MSISDN from the UICC. For GSM/UMTS phones, this is equivalent to
|
3846: * {@link #getLine1Number()}. For CDMA phones, {@link #getLine1Number()} returns
|
3847: * the MDN, so this method is provided to return the MSISDN on CDMA/LTE phones.
|
3855: * Retrieves the EF_PNN from the UICC For GSM/UMTS phones.
|
3864: * {@link android.telephony.PhoneStateListener} instead.
|
3867: public PhoneConstants.DataState getDataConnectionState() {
|
3882: // This function should be overridden by class GsmCdmaPhone.
|
3923: return mImsPhone;
|
3928: mImsPhone = imsPhone;
|
4004: * Return if UT capability of ImsPhone is enabled or not
|
4008: if (mImsPhone != null) {
|
4009: return mImsPhone.isUtEnabled();
|
4028: // dialInternal shall be overriden by GsmCdmaPhone
|
4033: * This function is for CSFB SS. GsmCdmaPhone overrides this function.
|
4065: * Return the service state of mImsPhone if it is STATE_IN_SERVICE
|
4070: if (imsPhone != null
|
4071: && imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
|
4145: if (imsPhone != null) {
|
4146: isImsRegistered = imsPhone.isImsRegistered();
|
4164: if (imsPhone != null) {
|
4165: isWifiCallingEnabled = imsPhone.isWifiCallingEnabled();
|
4178: if (imsPhone != null) {
|
4179: isAvailable = imsPhone.isImsCapabilityAvailable(capability, regTech);
|
4202: if (imsPhone != null) {
|
4203: isVolteEnabled = imsPhone.isVoiceOverCellularImsEnabled();
|
4216: if (imsPhone != null) {
|
4217: regTech = imsPhone.getImsRegistrationTech();
|
4229: if (imsPhone != null) {
|
4230: imsPhone.getImsRegistrationTech(callback);
|
4241: if (imsPhone != null) {
|
4242: imsPhone.getImsRegistrationState(callback);
|
4402: if (mImsPhone == null) {
|
4406: return mImsPhone.isImsAvailable();
|
4417: if (imsPhone != null) {
|
4418: return imsPhone.isVideoEnabled();
|
4551: if (imsPhone == null || !imsPhone.isWifiCallingEnabled()) {
|
4552: ImsManager imsManager = ImsManager.getInstance(context, phoneId);
|
4892: if (mImsPhone != null) {
|
4894: mImsPhone.dump(fd, pw, args);
|
448: * state change notification. DefaultPhoneNotifier is
|
538: * @param notifier An instance of DefaultPhoneNotifier,
|
554: * @param notifier An instance of DefaultPhoneNotifier,
|
2801: // This function is added to send the notification to DefaultPhoneNotifier.
|
2931: return mIsPhoneInEcmState;
|
2947: mIsPhoneInEcmState = isInEcm;
|
2991: if (call instanceof ImsPhoneCall) {
|
2992: ImsPhoneCall imsPhoneCall = (ImsPhoneCall) call;
|
2993: ImsCall imsCall = imsPhoneCall.getImsCall();
|
3047: mPhoneId, UiccController.APP_FAM_3GPP);
|
3821: * A fucntion of type getPhoneProp(propType) where propType is an
|
3901: return mUiccController.getUiccCard(mPhoneId);
|
3909: return mUiccController.getUiccPort(mPhoneId);
|
4053: return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
|
4061: return mPhoneId;
|
4854: pw.println(" mPhoneId=" + mPhoneId);
|
4881: pw.println(" getPhoneName()=" + getPhoneName());
|
4882: pw.println(" getPhoneType()=" + getPhoneType());
|
5063: Rlog.d(LOG_TAG, "[" + mPhoneId + "] " + s);
|
5067: Rlog.i(LOG_TAG, "[" + mPhoneId + "] " + s);
|
5071: Rlog.e(LOG_TAG, "[" + mPhoneId + "] " + s);
|
android.googlesource.com/platform/external/guice:examples/src/example/xml/Phone.java: [ master, ] |
---|
3: public class Phone {
|
android.googlesource.com/platform/frameworks/opt/vcard:java/com/android/vcard/VCardEntry.java: [ master, ] |
---|
101: PHONE,
|
315: public static class PhoneData implements EntryElement {
|
325: public PhoneData(String data, int type, String label, boolean isPrimary) {
|
1779: private void addPhone(int type, String data, String label, boolean isPrimary) {
|
143: private String mPhoneticFamily;
|
144: private String mPhoneticGiven;
|
145: private String mPhoneticMiddle;
|
167: public boolean emptyPhoneticStructuredName() {
|
750: private final String mPhoneticName; // We won't have this in "TITLE" property.
|
870: public String getPhoneticName() {
|
1555: private List<PhoneData> mPhoneList;
|
1865: private String buildSinglePhoneticNameFromSortAsParam(Map<String, Collection<String>> paramMap) {
|
2078: private void handlePhoneticNameFromSound(List<String> elems) {
|
2640: public final List<PhoneData> getPhoneList() {
|
33: import android.provider.ContactsContract.CommonDataKinds.Phone;
|
337: builder.withValueBackReference(Phone.RAW_CONTACT_ID, backReferenceIndex);
|
338: builder.withValue(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE);
|
340: builder.withValue(Phone.TYPE, mType);
|
341: if (mType == Phone.TYPE_CUSTOM) {
|
342: builder.withValue(Phone.LABEL, mLabel);
|
344: builder.withValue(Phone.NUMBER, mNumber);
|
346: builder.withValue(Phone.IS_PRIMARY, 1);
|
388: return EntryLabel.PHONE;
|
1786: if (type == Phone.TYPE_PAGER || VCardConfig.refrainPhoneNumberFormatting(mVCardType)) {
|
1790: // Note that some other codes (like the phone number formatter) or modules expect this
|
2314: // Given propValue is in URI format, not in phone number format used until
|
2322: // we may still have non-URI phone number. To keep given data as much as
|
2347: type = Phone.TYPE_CUSTOM;
|
2362: // The phone number available via Skype.
|
2364: final int type = Phone.TYPE_OTHER;
|
19: import com.android.vcard.VCardUtils.PhoneNumberUtilsPort;
|
42: import android.telephony.PhoneNumberUtils;
|
196: boolean phoneticNameSpecified = false;
|
199: builder.withValue(StructuredName.PHONETIC_GIVEN_NAME, mPhoneticGiven);
|
200: phoneticNameSpecified = true;
|
203: builder.withValue(StructuredName.PHONETIC_FAMILY_NAME, mPhoneticFamily);
|
204: phoneticNameSpecified = true;
|
207: builder.withValue(StructuredName.PHONETIC_MIDDLE_NAME, mPhoneticMiddle);
|
208: phoneticNameSpecified = true;
|
211: // SORT-STRING is used only when phonetic names aren't specified in
|
213: if (!phoneticNameSpecified) {
|
214: builder.withValue(StructuredName.PHONETIC_GIVEN_NAME, mSortString);
|
361: if (!(obj instanceof PhoneData)) {
|
364: PhoneData phoneData = (PhoneData) obj;
|
365: return (mType == phoneData.mType
|
366: && TextUtils.equals(mNumber, phoneData.mNumber)
|
367: && TextUtils.equals(mLabel, phoneData.mLabel)
|
368: && (mIsPrimary == phoneData.mIsPrimary));
|
755: final String titleName, final String phoneticName, int type,
|
761: mPhoneticName = phoneticName;
|
806: builder.withValue(Organization.PHONETIC_NAME, mPhoneticName);
|
1781: mPhoneList = new ArrayList<PhoneData>();
|
1797: // See RFC 3601 and docs for PhoneNumberUtils for more info.
|
1799: builder.append(PhoneNumberUtils.PAUSE);
|
1802: builder.append(PhoneNumberUtils.WAIT);
|
1804: } else if (PhoneNumberUtils.is12Key(ch) || (i == 0 && ch == '+')) {
|
1810: formattedNumber = PhoneNumberUtilsPort.formatNumber(
|
1816: PhoneData phoneData = new PhoneData(formattedNumber, type, label, isPrimary);
|
1817: mPhoneList.add(phoneData);
|
1854: final String titleName, final String phoneticName, int type, final boolean isPrimary) {
|
1859: phoneticName, type, isPrimary));
|
1894: final String phoneticName = buildSinglePhoneticNameFromSortAsParam(paramMap);
|
1929: addNewOrganization(organizationName, departmentName, null, phoneticName, type,
|
1948: addNewOrganization(organizationName, departmentName, null, phoneticName, type, isPrimary);
|
2001: * them in appropriate phonetic name variables. This method does not care
|
2072: * Note: Some Japanese mobile phones use this field for phonetic name, since
|
2082: // This means the other properties like "X-PHONETIC-FIRST-NAME" was already found.
|
2094: // phones use this order.
|
2117: // phones' preference.
|
2177: final List<String> phoneticNameList = VCardUtils.constructListFromValue(propValue,
|
2179: handlePhoneticNameFromSound(phoneticNameList);
|
2311: String phoneNumber = null;
|
2319: phoneNumber = propValue.substring(4);
|
2324: phoneNumber = propValue;
|
2327: phoneNumber = propValue;
|
2340: phoneNumber);
|
2359: addPhone(type, phoneNumber, label, isPrimary);
|
2372: addPhone(type, propValue, null, isPrimary);
|
2406: } else if (propertyName.equals(VCardConstants.PROPERTY_X_PHONETIC_FIRST_NAME)) {
|
2408: } else if (propertyName.equals(VCardConstants.PROPERTY_X_PHONETIC_MIDDLE_NAME)) {
|
2410: } else if (propertyName.equals(VCardConstants.PROPERTY_X_PHONETIC_LAST_NAME)) {
|
168: return TextUtils.isEmpty(mPhoneticFamily) && TextUtils.isEmpty(mPhoneticGiven)
|
169: && TextUtils.isEmpty(mPhoneticMiddle);
|
198: if (!TextUtils.isEmpty(mPhoneticGiven)) {
|
202: if (!TextUtils.isEmpty(mPhoneticFamily)) {
|
206: if (!TextUtils.isEmpty(mPhoneticMiddle)) {
|
226: && TextUtils.isEmpty(mPhoneticFamily) && TextUtils.isEmpty(mPhoneticMiddle)
|
227: && TextUtils.isEmpty(mPhoneticGiven) && TextUtils.isEmpty(mSortString));
|
246: && TextUtils.equals(mPhoneticFamily, nameData.mPhoneticFamily)
|
247: && TextUtils.equals(mPhoneticMiddle, nameData.mPhoneticMiddle)
|
248: && TextUtils.equals(mPhoneticGiven, nameData.mPhoneticGiven)
|
255: mFormatted, mPhoneticFamily, mPhoneticMiddle,
|
256: mPhoneticGiven, mSortString};
|
805: if (mPhoneticName != null) {
|
817: && TextUtils.isEmpty(mTitle) && TextUtils.isEmpty(mPhoneticName);
|
871: return mPhoneticName;
|
1604: iterateOneList(mPhoneList, iterator);
|
1780: if (mPhoneList == null) {
|
1809: final int formattingType = VCardUtils.getPhoneNumberFormat(mVCardType);
|
2010: && !(TextUtils.isEmpty(mNameData.mPhoneticFamily)
|
2011: && TextUtils.isEmpty(mNameData.mPhoneticMiddle) && TextUtils
|
2012: .isEmpty(mNameData.mPhoneticGiven))) {
|
2031: mNameData.mPhoneticMiddle = sortNames.get(2); //$FALL-THROUGH$
|
2033: mNameData.mPhoneticGiven = sortNames.get(1); //$FALL-THROUGH$
|
2035: mNameData.mPhoneticFamily = sortNames.get(0);
|
2079: if (!(TextUtils.isEmpty(mNameData.mPhoneticFamily)
|
2080: && TextUtils.isEmpty(mNameData.mPhoneticMiddle) && TextUtils
|
2081: .isEmpty(mNameData.mPhoneticGiven))) {
|
2112: mNameData.mPhoneticFamily = namesArray[0];
|
2113: mNameData.mPhoneticMiddle = namesArray[1];
|
2114: mNameData.mPhoneticGiven = namesArray[2];
|
2118: mNameData.mPhoneticFamily = namesArray[0];
|
2119: mNameData.mPhoneticGiven = namesArray[1];
|
2121: mNameData.mPhoneticGiven = elems.get(0);
|
2130: mNameData.mPhoneticMiddle = elems.get(2);
|
2132: mNameData.mPhoneticGiven = elems.get(1);
|
2134: mNameData.mPhoneticFamily = elems.get(0);
|
2339: final Object typeObject = VCardUtils.getPhoneTypeFromStrings(typeCollection,
|
2407: mNameData.mPhoneticGiven = propValue;
|
2409: mNameData.mPhoneticMiddle = propValue;
|
2411: mNameData.mPhoneticFamily = propValue;
|
2507: } else if (!mNameData.emptyPhoneticStructuredName()) {
|
2509: mNameData.mPhoneticFamily, mNameData.mPhoneticMiddle, mNameData.mPhoneticGiven);
|
2512: } else if (mPhoneList != null && mPhoneList.size() > 0) {
|
2513: displayName = mPhoneList.get(0).mNumber;
|
2641: return mPhoneList;
|
android.googlesource.com/platform/external/valgrind:include/vki/vki-linux.h: [ master, ] |
---|
1643: char phone[VKI_ISDN_MSNLEN];
|
1645: } vki_isdn_net_ioctl_phone;
|
android.googlesource.com/platform/frameworks/proto_logging:stats/atoms.proto: [ master, ] |
---|
8012: PHONE = 9;
|
145: PhoneSignalStrengthChanged phone_signal_strength_changed =
|
206: PhoneServiceStateChanged phone_service_state_changed = 94 [(module) = "framework"];
|
207: PhoneStateChanged phone_state_changed = 95 [(module) = "framework"];
|
18016: optional int32 phone_number_source_uicc = 3;
|
18021: optional int32 phone_number_source_carrier = 4;
|
18026: optional int32 phone_number_source_ims = 5;
|
3332: HARDWARE_FAILED_MICROPHONE = 1;
|
3502: message PhoneSignalStrengthChanged {
|
3514: message PhoneServiceStateChanged {
|
3526: message PhoneStateChanged {
|
17132: MICROPHONE = 1;
|
3661: HEADPHONE_RESUME_MEDIA = 8;
|
3662: HEADPHONE_MEDIA_RECOMMENDATIONS = 9;
|
17092: MICROPHONE_ACCESS_TIMELINE_VIEWED = 4;
|
1976: * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
|
1981: // The keyguard is hidden when the phone is unlocked.
|
1983: // The keyguard is shown when the phone is locked (screen turns off).
|
1997: * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
|
3497: * Logs phone signal strength changes.
|
3509: * Logs when the phone state, sim state or signal strength changes
|
3521: * Logs when the phone becomes on or off.
|
3587: statusbar/phone/NavigationBarView.java
|
4597: * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
|
13590: // The phone was flipped before the screen turns off.
|
15175: // The orientation of the phone after rotation before going through the recommendation service.
|
18006: // Indicates whether phone number source UICC provides a phone number
|
18009: // - a positive integer (> 0): sources providing the same phone number
|
18012: // This way, the raw phone number cannot be derived from the value of
|
18015: // and the max means the count of unique phone numbers.
|
18018: // Indicates whether phone number source CARRIER provides a phone number
|
18020: // See field phone_number_source_uicc.
|
18023: // Indicates whether phone number source IMS provides a phone number
|
18025: // See field phone_number_source_uicc.
|
2162: // For multi-sim phones, this distinguishes between the sim cards.
|
2184: // For multi-sim phones, this distinguishes between the sim cards.
|
7796: * time_in_state files not being present on some phones, have not been addressed. These should be
|
9564: * Track how we arbitrate between microphone/input requests.
|
9579: * Track how we arbitrate between microphone requests.
|
9599: * Track how we arbitrate between microphone/input requests.
|
9614: * Track how we arbitrate between microphone/input requests.
|
chromium.googlesource.com/android_tools:sdk/sources/android-25/android/provider/ContactsContract.java: [ master, ] |
---|
1117: public static final int PHONE = 20;
|
5941: public static final class Phone implements DataColumnsWithJoins, CommonColumns,
|
5946: private Phone() {}
|
9101: public static final String PHONE = "phone";
|
9109: public static final String PHONE_TYPE = "phone_type";
|
9115: public static final String PHONE_ISPRIMARY = "phone_isprimary";
|
9121: public static final String SECONDARY_PHONE = "secondary_phone";
|
9135: public static final String TERTIARY_PHONE = "tertiary_phone";
|
1087: public interface PhoneticNameStyle {
|
1185: public static final String PHONETIC_NAME_STYLE = "phonetic_name_style";
|
1198: public static final String PHONETIC_NAME = "phonetic_name";
|
5009: protected interface PhoneLookupColumns {
|
5168: public static final class PhoneLookup implements BaseColumns, PhoneLookupColumns,
|
5173: private PhoneLookup() {}
|
5763: public static final String PHONETIC_GIVEN_NAME = DATA7;
|
5769: public static final String PHONETIC_MIDDLE_NAME = DATA8;
|
5775: public static final String PHONETIC_FAMILY_NAME = DATA9;
|
5787: public static final String PHONETIC_NAME_STYLE = DATA11;
|
6834: public static final Str |