Found 22648 results in 3613 files, showing top 50 files (show more).
android.googlesource.com/platform/packages/services/Telephony:src/com/android/phone/PhoneInterfaceManager.java: [ master, ]
372:         public Phone phone;
17: package com.android.phone;
195: public class PhoneInterfaceManager extends ITelephony.Stub {
1585:     private PhoneInterfaceManager(PhoneGlobals app) {
1601:     private Phone getDefaultPhone() {
1632:     private Phone getPhone(int subId) {
2234:     public String getNetworkCountryIsoForPhone(int phoneId, String callingPackage,
5761:     public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
5784:     public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
6242:     public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
302:     private PhoneConfigurationManager mPhoneConfigurationManager;
1612:     private Phone getPhoneFromRequest(MainThreadRequest request) {
1620:     private Phone getPhoneFromSubId(int subId) {
2013:     private void shutdownRadioUsingPhoneId(int phoneId) {
2697:     public int getActivePhoneType() {
2702:     public int getActivePhoneTypeForSlot(int slotIndex) {
3737:     private void checkModifyPhoneStatePermission(int subId, String message) {
4375:     private Phone getPhoneFromSlotIdOrThrowException(int slotIndex) {
5828:     public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
6368:     public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
6378:     public int getSubIdForPhoneAccountHandle(
6393:     public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
140: import com.android.internal.telephony.Phone;
173: import com.android.phone.settings.PickSmsSubscriptionActivity;
174: import com.android.phone.vvm.PhoneAccountHandleConverter;
175: import com.android.phone.vvm.RemoteVvmTaskManager;
176: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
177: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
371:         // In cases where subId is unavailable, the caller needs to specify the phone.
380:         MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
382:             if (phone != null) {
383:                 this.phone = phone;
411:      * A handler that processes messages on the main thread in the phone process. Since many
412:      * of the Phone calls are not thread safe this is needed to shuttle the requests from the
413:      * inbound binder threads to the main thread in the phone process.  The Binder thread
430:             final Phone defaultPhone = getDefaultPhone();
435:                     final Phone phone = getPhoneFromRequest(request);
454:                         request.result = phone != null
455:                                 ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
466:                     final Phone phone = getPhoneFromRequest(request);
467:                     request.result = phone != null ?
1220:                     request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
1234:                     request.phone.requestCellInfoUpdate(request.workSource,
1262:                     Phone phone = getPhoneFromRequest(request);
1263:                     phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
1271:                         phone = getPhoneFromRequest(request);
1272:                         request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
1294:                             .enablePhone(request.phone, enable, onCompleted);
1300:                     int phoneId = request.phone.getPhoneId();
1315:                             .getPhoneStatusFromModem(request.phone, onCompleted);
1320:                     int id = request.phone.getPhoneId();
1499:     private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
1501:                 command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone, workSource);
1510:             int command, Object argument, Integer subId, Phone phone, WorkSource workSource) {
1516:         if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
1517:             throw new IllegalArgumentException("subId and phone cannot both be specified!");
1518:         } else if (phone != null) {
1519:             request = new MainThreadRequest(argument, phone, workSource);
1559:      * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
1563:             int command, Object argument, Phone phone, WorkSource workSource) {
1564:         MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
1602:         Phone thePhone = getPhone(getDefaultSubscription());
1609:         ServiceManager.addService("phone", this);
1613:         if (request.phone != null) {
1614:             return request.phone;
1626:         Phone phone = getPhoneFromRequest(request);
1627:         return phone == null ? null :
1628:                 UiccController.getInstance().getUiccCard(phone.getPhoneId());
1631:     // returns phone associated with the subId.
1636:     private void sendEraseModemConfig(Phone phone) {
1637:         if (phone != null) {
1639:                   mApp, phone.getSubId(), "eraseModemConfig");
1677:             // PENDING: should we just silently fail if phone is offhook or ringing?
1698:         // from the context of the phone app.
1701:         if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
1882:             final Phone phone = getPhone(subId);
1883:             if (phone != null) {
1884:                 phone.updateServiceLocation();
1928:             final Phone phone = getPhone(subId);
1929:             if (phone != null) {
1930:                 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
1948:             final Phone phone = getPhone(subId);
1949:             if (phone != null) {
1950:                 phone.setRadioPower(!isRadioOnForSubscriber(subId));
1966:             final Phone phone = getPhone(subId);
1967:             if (phone == null) {
1970:             if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
1988:                 Phone phone = PhoneFactory.getPhone(i);
1989:                 if (phone != null && phone.isRadioAvailable()) return true;
2005:                 logv("Shutting down Phone " + i);
2014:         Phone phone = PhoneFactory.getPhone(phoneId);
2015:         if (phone != null && phone.isRadioAvailable()) {
2016:             phone.shutdownRadio();
2025:             final Phone defaultPhone = PhoneFactory.getDefaultPhone();
2030:                 loge("There's no default phone.");
2043:             final Phone phone = getPhone(subId);
2044:             if (phone != null) {
2045:                 phone.setRadioPower(turnOn);
2063:             final Phone phone = getPhone(subId);
2064:             if (phone != null) {
2065:                 phone.getDataEnabledSettings().setUserDataEnabled(true);
2083:             final Phone phone = getPhone(subId);
2084:             if (phone != null) {
2085:                 phone.getDataEnabledSettings().setUserDataEnabled(false);
2099:             final Phone phone = getPhone(subId);
2100:             if (phone != null) {
2101:                 return phone.isDataAllowed(ApnSetting.TYPE_DEFAULT);
2150:             Phone phone = PhoneFactory.getPhone(slotIndex);
2151:             return phone == null ? TelephonyManager.CALL_STATE_IDLE :
2152:                     PhoneConstantConversions.convertCallState(phone.getState());
2167:             final Phone phone = getPhone(subId);
2168:             if (phone != null) {
2169:                 return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
2188:             final Phone phone = getPhone(subId);
2189:             if (phone != null) {
2190:                 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
2218:                 return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
2248:             if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
2249:                 // Get default phone in this case.
2250:                 phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
2260:             Phone phone = PhoneFactory.getPhone(phoneId);
2261:             if (phone != null) {
2262:                 ServiceStateTracker sst = phone.getServiceStateTracker();
2263:                 EmergencyNumberTracker emergencyNumberTracker = phone.getEmergencyNumberTracker();
2293:             final Phone phone = getPhone(subId);
2294:             if (phone != null) {
2295:                 phone.enableLocationUpdates();
2314:             final Phone phone = getPhone(subId);
2315:             if (phone != null) {
2316:                 phone.disableLocationUpdates();
2375:         for (Phone phone : PhoneFactory.getPhones()) {
2376:             List<CellInfo> info = phone.getAllCellInfo();
2415:             for (Phone phone : PhoneFactory.getPhones()) {
2417:                         CMD_GET_ALL_CELL_INFO, null, phone, workSource);
2468:         final Phone phone = getPhoneFromSubId(subId);
2469:         if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
2471:         sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
2489:         Phone phone = PhoneFactory.getPhone(slotIndex);
2490:         if (phone == null) {
2493:         int subId = phone.getSubId();
2501:             return phone.getImei();
2509:         Phone phone = PhoneFactory.getPhone(slotIndex);
2511:         if (phone != null) {
2512:             String imei = phone.getImei();
2520:         Phone phone = PhoneFactory.getPhone(slotIndex);
2521:         if (phone == null) {
2525:         int subId = phone.getSubId();
2533:             return phone.getMeid();
2541:         Phone phone = PhoneFactory.getPhone(slotIndex);
2543:         if (phone != null) {
2544:             String meid = phone.getMeid();
2553:         Phone phone = PhoneFactory.getPhone(slotIndex);
2554:         if (phone == null) {
2557:         int subId = phone.getSubId();
2566:             return phone.getDeviceSvn();
2576:             final Phone phone = getPhone(subId);
2577:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
2587:             final Phone phone = getPhone(subId);
2588:             return phone == null ? null : phone.getCarrierName();
2598:             final Phone phone = getPhone(subId);
2599:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
2600:                     : phone.getSpecificCarrierId();
2610:             final Phone phone = getPhone(subId);
2611:             return phone == null ? null : phone.getSpecificCarrierName();
2622:         final Phone phone = PhoneFactory.getPhone(slotIndex);
2623:         if (phone == null) {
2628:             return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
2639:      * Make sure the caller has the MODIFY_PHONE_STATE permission.
2644:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
2664:      * Make sure the caller has the CALL_PHONE permission.
2669:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
2705:             final Phone phone = PhoneFactory.getPhone(slotIndex);
2706:             if (phone == null) {
2707:                 return PhoneConstants.PHONE_TYPE_NONE;
2709:                 return phone.getPhoneType();
2736:             final Phone phone = getPhone(subId);
2737:             if (phone != null) {
2738:                 return phone.getCdmaEriIconIndex();
2769:             final Phone phone = getPhone(subId);
2770:             if (phone != null) {
2771:                 return phone.getCdmaEriIconMode();
2800:             final Phone phone = getPhone(subId);
2801:             if (phone != null) {
2802:                 return phone.getCdmaEriText();
2821:             final Phone phone = getPhone(subId);
2822:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2823:                 return phone.getLine1Number();
2825:                 loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
2843:             final Phone phone = getPhone(subId);
2844:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2845:                 return phone.getCdmaMin();
2857:         if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
2859:             throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
3022:             final Phone phone = getPhone(subId);
3023:             if (phone != null) {
3024:                 phone.setVoiceActivationState(activationState);
3043:             final Phone phone = getPhone(subId);
3044:             if (phone != null) {
3045:                 phone.setDataActivationState(activationState);
3061:         final Phone phone = getPhone(subId);
3064:             if (phone != null) {
3065:                 return phone.getVoiceActivationState();
3081:         final Phone phone = getPhone(subId);
3084:             if (phone != null) {
3085:                 return phone.getDataActivationState();
3107:             final Phone phone = getPhone(subId);
3108:             if (phone != null) {
3109:                 return phone.getVoiceMessageCount();
3126:             final Phone phone = getPhone(subId);
3127:             return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
3140:         final Phone defaultPhone = getDefaultPhone();
3178:             for (Phone phone : PhoneFactory.getPhones()) {
3179:                 if (phone.isInEmergencySmsMode()) {
3190:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3217:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3255:             Phone phone = getPhone(subId);
3256:             if (phone == null) {
3261:             phone.getImsRegistrationState(regState -> {
3288:             Phone phone = getPhone(subId);
3289:             if (phone == null) {
3294:             phone.getImsRegistrationTech(regTech -> {
3313:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3339:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3390:             Phone phone = getPhone(subId);
3391:             if (phone == null) return false;
3392:             return phone.isImsCapabilityAvailable(capability, regTech);
3437:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3474:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3508:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3543:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3595:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3677:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3744:         Phone phone = getPhone(subId);
3745:         if (phone == null) {
3746:             loge("phone instance null for subid " + subId);
3750:             if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
3754:             if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
4188:             final Phone phone = getPhone(subId);
4189:             if (phone != null) {
4190:                 return phone.getServiceState().getDataNetworkType();
4222:             final Phone phone = getPhone(subId);
4223:             if (phone != null) {
4224:                 return phone.getServiceState().getDataNetworkType();
4247:             final Phone phone = getPhone(subId);
4248:             if (phone != null) {
4249:                 return phone.getServiceState().getVoiceNetworkType();
4274:             final Phone phone = PhoneFactory.getPhone(slotIndex);
4275:             if (phone != null) {
4276:                 return phone.getIccCard().hasIccCard();
4291:      * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
4292:      * or {@link Phone#LTE_ON_CDMA_TRUE}
4311:             final Phone phone = getPhone(subId);
4312:             if (phone == null) {
4315:                 return phone.getLteOnCdmaMode();
4379:                     + " does not correspond to an active phone");
4410:     private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
4427:                     CMD_OPEN_CHANNEL, new Pair<String, Integer>(aid, p2), phone,
4452:     private boolean iccCloseLogicalChannelWithPermission(Phone phone, int channel) {
4458:             Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, channel, phone,
4495:     private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
4504:                     new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
4551:     private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
4569:                     new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
4803:         Phone phone = PhoneFactory.getPhone(slotIndex);
4804:         if (phone != null) {
4806:                     mApp, phone.getSubId(), "resetModemConfig");
4829:         Phone phone = PhoneFactory.getPhone(slotIndex);
4830:         if (phone != null) {
4832:                     mApp, phone.getSubId(), "rebootModem");
4848:         final Phone defaultPhone = getDefaultPhone();
5373:         final Phone defaultPhone = getDefaultPhone();
5511:         final Phone phone = getPhone(subId);
5513:             if (phone != null) {
5514:                 return phone.hasMatchedTetherApnSetting();
5538:             Phone phone = PhoneFactory.getPhone(phoneId);
5539:             if (phone != null) {
5541:                 phone.getDataEnabledSettings().setUserDataEnabled(enable);
5543:                 loge("setUserDataEnabled: no phone found. Invalid subId=" + subId);
5561:         final Phone phone = getPhone(subId);
5563:             if (phone != null) {
5568:                 phone.setAlwaysReportSignalStrength(isEnable);
5570:                 loge("setAlwaysReportSignalStrength: no phone found for subId="
5599:      * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
5617:             Phone phone = PhoneFactory.getPhone(phoneId);
5618:             if (phone != null) {
5619:                 boolean retVal = phone.isUserDataEnabled();
5623:                 if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
5646:             Phone phone = PhoneFactory.getPhone(phoneId);
5647:             if (phone != null) {
5648:                 boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
5652:                 if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
5661:             Phone phone) {
5668:         PackageManager pkgMgr = phone.getContext().getPackageManager();
5673:             SubscriptionInfo subInfo = subController.getSubscriptionInfo(phone.getSubId());
5675:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5687:     private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, Phone phone,
5696:             SubscriptionInfo subInfo = subController.getSubscriptionInfo(phone.getSubId());
5698:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5708:         final Phone phone = getPhone(subId);
5709:         if (phone == null) {
5713:         UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
5721:                 phone.getContext().getPackageManager()), phone);
5727:         final Phone phone = getPhone(subId);
5728:         if (phone == null) {
5733:                 UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
5740:                         phone.getContext().getPackageManager(), uid), phone);
5845:         final Phone phone = getPhone(subId);
5846:         UiccCard card = phone == null ? null : phone.getUiccCard();
5868:             final Phone phone = getPhone(subId);
5869:             if (phone == null) {
5872:             final String subscriberId = phone.getSubscriberId();
6095:             final Phone phone = getPhone(subId);
6096:             return phone == null ? false : phone.setOperatorBrandOverride(brand);
6111:             final Phone phone = getPhone(subId);
6112:             if (phone == null) {
6115:             return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
6166:         Phone phone = PhoneFactory.getPhone(phoneId);
6168:         if (phone == null) {
6175:                             mApp, phone.getSubId(), "getRadioAccessFamily");
6185:         final Phone defaultPhone = getDefaultPhone();
6199:         final Phone defaultPhone = getDefaultPhone();
6253:                     .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
6284:         final Phone phone = getPhone(subscriptionId);
6285:         if (phone == null) {
6286:             loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
6293:                     phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
6326:      * Returns the unique device ID of phone, for example, the IMEI for
6330:      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
6334:         final Phone phone = PhoneFactory.getPhone(0);
6335:         if (phone == null) {
6338:         int subId = phone.getSubId();
6346:             return phone.getDeviceId();
6359:         Phone phone = getPhone(subId);
6360:         if (phone != null) {
6361:             return phone.isImsRegistered();
6382:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
6396:             Phone phone = getPhone(subscriptionId);
6397:             if (phone == null) {
6400:             return PhoneUtils.makePstnPhoneAccountHandle(phone);
6412:             Phone phone = getPhone(subId);
6413:             if (phone != null) {
6414:                 return phone.isWifiCallingEnabled();
6429:             Phone phone = getPhone(subId);
6430:             if (phone != null) {
6431:                 return phone.isVideoEnabled();
6447:             Phone phone = getPhone(subId);
6448:             if (phone != null) {
6449:                 return phone.getImsRegistrationTech();
6507:         final Phone phone = getPhone(subId);
6508:         if (phone == null) {
6515:                     phone.getContext().getOpPackageName(), null);
6524:             final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
6683:             final Phone phone = getPhone(subId);
6684:             if (phone == null) {
6688:             ServiceState ss = phone.getServiceState();
6701:      * Returns the URI for the per-account voicemail ringtone set in Phone settings.
6712:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6713:             if (phone == null) {
6714:                 phone = getDefaultPhone();
6717:             return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
6727:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6737:         final Phone defaultPhone = getDefaultPhone();
6748:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6749:             if (phone == null) {
6750:                 phone = defaultPhone;
6752:             VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
6759:      * Returns whether vibration is set for voicemail notification in Phone settings.
6769:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6770:             if (phone == null) {
6771:                 phone = getDefaultPhone();
6774:             return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
6784:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6794:         final Phone defaultPhone = getDefaultPhone();
6805:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6806:             if (phone == null) {
6807:                 phone = defaultPhone;
6809:             VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
6816:      * Make sure either called from same process as self (phone) or IPC caller has read privilege.
6821:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
6826:      * Make sure either called from same process as self (phone) or IPC caller has send SMS
6869:         Phone phone = getPhone(subId);
6873:             if (phone == null) {
6878:                 aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
6898:         Phone phone = getPhone(subId);
6902:             if (phone == null) {
6907:                 esn = phone.getEsn();
6926:         Phone phone = getPhone(subId);
6930:             if (phone == null) {
6935:                 cdmaPrlVersion = phone.getCdmaPrlVersion();
7029:         final Phone phone = getPhone(subId);
7032:         if (phone == null) {
7037:             phone.carrierActionSetMeteredApnsEnabled(enabled);
7054:         final Phone phone = getPhone(subId);
7057:         if (phone == null) {
7062:             phone.carrierActionSetRadioEnabled(enabled);
7082:         final Phone phone = getPhone(subId);
7085:         if (phone == null) {
7090:             phone.carrierActionReportDefaultNetworkStatus(report);
7106:         final Phone phone = getPhone(subId);
7107:         if (phone == null) {
7112:             phone.carrierActionResetAll();
7119:      * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
7126:             writer.println("Permission Denial: can't dump Phone from pid="
7156:             Phone phone = getPhone(subId);
7157:             if (phone != null) {
7158:                 phone.getDataEnabledSettings().setPolicyDataEnabled(enabled);
7177:         Phone phone = getPhone(subId);
7181:             if (phone != null) {
7182:                 return phone.getClientRequestStats();
7209:         Phone phone = PhoneFactory.getPhone(slotIndex);
7215:             if (phone != null) {
7216:                 phone.setSimPowerState(state, workSource);
7238:      * Check if phone is in emergency callback mode
7239:      * @return true if phone is in emergency callback mode
7245:         final Phone phone = getPhone(subId);
7249:             if (phone != null) {
7250:                 return phone.isInEcm();
7270:             Phone p = getPhone(subId);
7290:         Phone phone = PhoneFactory.getPhone(slotIndex);
7291:         if (phone != null) {
7292:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
7299:                 return phone.getRadioPowerState();
7312:      * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
7327:             Phone phone = getPhone(subId);
7328:             isEnabled =  phone != null ? phone.getDataRoamingEnabled() : false;
7343:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
7356:             Phone phone = getPhone(subId);
7357:             if (phone != null) {
7358:                 phone.setDataRoamingEnabled(isEnabled);
7374:             Phone phone = getPhone(subId);
7375:             if (phone != null) {
7376:                 isAllowed = phone.isCspPlmnEnabled();
7391:             // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
7527:         final Phone phone = getPhone(subId);
7528:         if (phone == null) {
7535:             phone.setRadioIndicationUpdateMode(filters, mode);
7545:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
7554:             Phone phone = getPhone(subId);
7555:             if (phone == null) {
7558:             UiccCard uiccCard = phone.getUiccCard();
7595:      * not set, return {@link Phone#PREFERRED_NT_MODE}.
7603:         return Phone.PREFERRED_NT_MODE;
7613:             final Phone phone = getPhone(subId);
7614:             if (phone == null) {
7618:             phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
7631:             final Phone phone = getPhone(subId);
7632:             if (phone == null) {
7636:             return phone.getCarrierIdListVersion();
7705:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7710:             for (Phone phone: PhoneFactory.getPhones()) {
7711:                 if (phone.getEmergencyNumberTracker() != null
7712:                         && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
7714:                             phone.getSubId(),
7715:                             phone.getEmergencyNumberTracker().getEmergencyNumberList());
7726:         final Phone defaultPhone = getDefaultPhone();
7734:             for (Phone phone: PhoneFactory.getPhones()) {
7735:                 if (phone.getEmergencyNumberTracker() != null
7736:                         && phone.getEmergencyNumberTracker() != null) {
7737:                     if (phone.getEmergencyNumberTracker().isEmergencyNumber(
7759:             for (Phone phone: PhoneFactory.getPhones()) {
7760:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7781:             for (Phone phone: PhoneFactory.getPhones()) {
7782:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7801:             final Phone phone = getPhone(subId);
7802:             if (phone == null) {
7806:             return phone.getEmergencyNumberDbVersion();
7818:             for (Phone phone: PhoneFactory.getPhones()) {
7819:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7835:             for (Phone phone: PhoneFactory.getPhones()) {
7836:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7849:         Phone phone = getPhone(subId);
7850:         if (phone == null) {
7856:                     .getUiccProfileForPhone(phone.getPhoneId());
7875:             Phone phone = PhoneFactory.getPhone(slotIndex);
7876:             if (phone == null) {
7879:                 return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
7892:         Phone phone = PhoneFactory.getPhone(slotIndex);
7893:         if (phone == null) return false;
7896:                 mApp, phone.getSubId(), callingPackage, callingFeatureId,
7898:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7904:                 return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
7906:                 return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
7974:      * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
7975:      * permission, but the other way around is possible with either MODIFY_PHONE_STATE
8004:         Phone phone = getPhone(subId);
8005:         if (phone == null) {
8010:             UiccCard uiccCard = phone.getUiccCard();
8080:         Phone phone = getDefaultPhone();
8081:         if (phone == null) return -1;
8082:         HalVersion hv = phone.getHalVersion();
8112:         enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
8118:             Phone phone = getPhone(subId);
8119:             if (phone == null) return false;
8121:             boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
8122:             return !isMetered || phone.getDataEnabledSettings().isDataEnabled(apnType);
8135:             Phone phone = getPhone(subId);
8136:             if (phone == null) return true; // By default return true.
8138:             return ApnSettingUtils.isMeteredApnType(apnType, phone);
8206:             Phone phone = getPhone(subId);
8207:             if (phone == null) return false;
8209:             return phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(allow);
8222:             Phone phone = getPhone(subId);
8223:             if (phone == null) return false;
8225:             return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
8238:             Phone phone = getPhone(subId);
8239:             if (phone == null) return false;
8241:             return phone.getDataEnabledSettings().setAlwaysAllowMmsData(alwaysAllow);
8259:             for (Phone phone : PhoneFactory.getPhones()) {
8260:                 Phone defaultPhone = phone.getImsPhone();
8261:                 if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
8306:             Phone phone = getPhone(subId);
8307:             if (phone != null && phone.getIccCard() != null) {
8308:                 return phone.getIccCard().getIccLockEnabled();
8328:         Phone phone = getPhone(subId);
8329:         if (phone == null) {
8336:                     new Pair<Boolean, String>(enabled, password), phone, null);
8358:         Phone phone = getPhone(subId);
8359:         if (phone == null) {
8366:                     new Pair<String, String>(oldPassword, newPassword), phone, null);
22: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
64: import android.telecom.PhoneAccount;
65: import android.telecom.PhoneAccountHandle;
84: import android.telephony.PhoneCapability;
85: 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;
157: import com.android.internal.telephony.imsphone.ImsPhone;
158: import com.android.internal.telephony.imsphone.ImsPhoneCallTracker;
196:     private static final String LOG_TAG = "PhoneInterfaceManager";
197:     private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
292:     private static PhoneInterfaceManager sInstance;
294:     private PhoneGlobals mApp;
685:                     defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
712:                     defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
723:                     defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
733:                     defaultPhone.resetModemConfig(onCompleted);
779:                     defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
1017:                     if (defaultPhone != null) {
1018:                         defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
1049:                     defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
1077:                     defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
1283:                     defaultPhone.rebootModem(onCompleted);
1293:                     PhoneConfigurationManager.getInstance()
1303:                         mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
1314:                     PhoneConfigurationManager.getInstance()
1385:                     defaultPhone.eraseModemConfig(onCompleted);
1570:      * Initialize the singleton PhoneInterfaceManager instance.
1571:      * This is only done once, at startup, from PhoneApp.onCreate().
1573:     /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
1574:         synchronized (PhoneInterfaceManager.class) {
1576:                 sInstance = new PhoneInterfaceManager(app);
1587:         mCM = PhoneGlobals.getInstance().mCM;
1588:         mImsResolver = PhoneGlobals.getInstance().getImsResolver();
1596:         mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
1603:         return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
1622:                 ? getDefaultPhone() : getPhone(subId);
1633:         return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
1651:         PackageManager pm = getDefaultPhone().getContext().getPackageManager();
1678:             PhoneConstants.State state = mCM.getState(subId);
1679:             if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
1738:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1743:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1751:             final UnlockSim checkSimPin = new UnlockSim(getPhone(subId).getIccCard());
1764:             final UnlockSim checkSimPuk = new UnlockSim(getPhone(subId).getIccCard());
1781:         private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1811:                                             mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
1813:                                             mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1816:                                         mResult = PhoneConstants.PIN_RESULT_SUCCESS;
1991:             logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
2026:             if (defaultPhone != null) {
2027:                 defaultPhone.setRadioPower(turnOn);
2171:                 return PhoneConstantConversions.convertDataState(
2172:                         PhoneConstants.DataState.DISCONNECTED);
2237:             final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
2239:                     callingFeatureId, "getNetworkCountryIsoForPhone")) {
2252:             final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
2481:             getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
2685:         Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
2689:         Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
2693:         Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
2855:     public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
2884:             return getDefaultPhone().needsOtaServiceProvisioning();
2919:             PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
2920:             if (phoneAccountHandle == null) {
2923:             return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
3007:         SmsController smsController = PhoneFactory.getSmsController();
3142:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
3151:             defaultPhone.sendDialerSpecialCode(inputCode);
3206:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3230:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3326:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3353:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3369:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3445:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3463:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3483:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3498:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3517:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3533:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3552:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3568:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3584:             // 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.
3635:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3651:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3667:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3686:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3705:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3723:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3768:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3798:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3831:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3890:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4059:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4084:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4110:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4136:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4306:             return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4313:                 return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4376:         int phoneId = UiccController.getInstance().getPhoneIdFromSlotId(slotIndex);
4377:         if (phoneId == -1) {
4381:         return PhoneFactory.getPhone(phoneId);
4416:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4558:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4849:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
4856:             return defaultPhone.getPcscfAddress(apnType);
5107:             getDefaultPhone().setImsRegistrationState(registered);
5313:                     request, messenger, binder, getPhone(subId),
5374:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
5382:             return PhoneFactory.calculatePreferredNetworkType(defaultPhone.getContext(), 0);
5536:             int phoneId = mSubscriptionController.getPhoneId(subId);
5537:             if (DBG) log("setUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5615:             int phoneId = mSubscriptionController.getPhoneId(subId);
5616:             if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5644:             int phoneId = mSubscriptionController.getPhoneId(subId);
5645:             if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5749:         int phoneId = SubscriptionManager.getPhoneId(subId);
5750:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5757:             getPhone(phoneId), pkgName);
5774:                 getPhone(i), pkgName);
5785:         if (!SubscriptionManager.isValidPhoneId(phoneId)) {
5786:             loge("phoneId " + phoneId + " is not valid.");
5789:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5791:             loge("getCarrierPackageNamesForIntentAndPhone: No UICC");
5798:     public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
5802:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
6165:     public int getRadioAccessFamily(int phoneId, String callingPackage) {
6176:             raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
6190:             ImsManager.getInstance(defaultPhone.getContext(),
6191:                     defaultPhone.getPhoneId()).setVtSetting(enable);
6200:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
6212:                     ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
6327:      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
6371:             return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
6379:             PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
6386:             return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
6480:             cleanUpSmsRawTable(getDefaultPhone().getContext());
6491:               sendEraseModemConfig(getDefaultPhone());
6703:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6706:      * PhoneAccount.
6709:     public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
6729:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6732:      * PhoneAccount.
6736:             PhoneAccountHandle phoneAccountHandle, Uri uri) {
6739:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6742:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
6761:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6763:      * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
6766:     public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
6786:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6789:      * specific PhoneAccount.
6793:             PhoneAccountHandle phoneAccountHandle, boolean enabled) {
6796:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6799:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
7140:         (new TelephonyShellCommand(this, getDefaultPhone().getContext()))
7393:             if (checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
7599:         int phoneId = mSubscriptionController.getPhoneId(subId);
7600:         if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
7601:             return list.get(phoneId);
7730:                             mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
7931:                 getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
7954:         PhoneCapability staticCapability =
8060:             int phoneCount = TelephonyManager.getDefault().getPhoneCount();
8062:             int[] logicalSlotsMapping = new int[phoneCount];
8160:         SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
8180:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8192:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
8262:                     ImsPhone imsPhone = (ImsPhone) defaultPhone;
8264:                             (ImsPhoneCallTracker) imsPhone.getCallTracker();
8266:                     Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
8267:                             + imsPhone.getMsisdn());
131: import com.android.internal.telephony.DefaultPhoneNotifier;
468:                             getPhoneFromRequest(request).handlePinMmi((String) request.argument)
743:                     getPhoneFromRequest(request).getPreferredNetworkType(onCompleted);
769:                     getPhoneFromRequest(request).setPreferredNetworkType(networkType, onCompleted);
793:                     getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
805:                     getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
815:                     getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
822:                     getPhoneFromRequest(request).getCallForwardingOption(
879:                     getPhoneFromRequest(request).setCallForwardingOption(
901:                     getPhoneFromRequest(request).getCallWaiting(onCompleted);
945:                     getPhoneFromRequest(request).setCallWaiting(isEnable, onCompleted);
997:                     getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
1160:                     getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
1181:                     getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
1197:                     getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
1209:                     getPhoneFromRequest(request).setCdmaSubscription(subscriptionMode, onCompleted);
1324:                         mPhoneConfigurationManager.addToPhoneStatusCache(id,
1395:                     getPhoneFromRequest(request).getIccCard().changeIccLockPassword(
1413:                     getPhoneFromRequest(request).getIccCard().setIccLockEnabled(
1616:             return getPhoneFromSubId(request.subId);
1912:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
1987:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2004:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
2006:                 shutdownRadioUsingPhoneId(i);
2238:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
2558:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2698:         return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
2728:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2761:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2792:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2933:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3100:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
3160:                     .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3197:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3223:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3280:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3320:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3345:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3442:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3479:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3513:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3548:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3600:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3682:         TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
3764:         checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
3828:         checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
4180:                 && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
4214:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4239:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4331:         return mSubscriptionController.getPhoneId(getDefaultSubscription());
4393:         return iccOpenLogicalChannelWithPermission(getPhoneFromSubId(subId), callingPackage, aid,
4406:         return iccOpenLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4441:         return iccCloseLogicalChannelWithPermission(getPhoneFromSubId(subId), channel);
4448:         return iccCloseLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4477:         return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
4491:                 getPhoneFromSlotIdOrThrowException(slotIndex), channel, cla, command, p1, p2, p3,
4530:         return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
4546:                 getPhoneFromSlotIdOrThrowException(slotIndex), callingPackage, cla, command, p1,
4631:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4669:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
5050:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5397:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5443:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5765:         for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
5829:         enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
5835:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
5915:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
5942:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
5965:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6174:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
6224:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6243:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6380:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
6381:                 callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
6647:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7173:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7330:             TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
7368:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7492:                         slot.getPhoneId(),
7645:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7653:             return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
7662:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7702:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7729:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7895:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7930:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
7955:                 mPhoneConfigurationManager.getStaticPhoneCapability();
7995:             mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
8035:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
8042:             return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
8051:         metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
8065:                 if (SubscriptionManager.isValidPhoneId(slotInfos[i].getLogicalSlotIdx())) {
8147:                 SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
8263:                     ImsPhoneCallTracker imsPhoneCallTracker =
8265:                     imsPhoneCallTracker.setConferenceEventPackageEnabled(isCepEnabled);
android.googlesource.com/platform/superproject:packages/services/Telephony/src/com/android/phone/PhoneInterfaceManager.java: [ master, ] Duplicate result
android.googlesource.com/platform/frameworks/opt/telephony:src/java/com/android/internal/telephony/Phone.java: [ master, ]
113: public abstract class Phone extends Handler implements PhoneInternalInterface {
482:     protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
499:     protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
318:     protected Phone mImsPhone = null;
576:     public void createImsPhone() {
3443:     public Phone getImsPhone() {
4092:     public Phone getDefaultPhone() {
189:     protected static final int EVENT_UPDATE_PHONE_OBJECT            = 42;
288:     protected boolean mIsPhoneInEcmState = false;
315:     protected int mPhoneId;
422:     public String getPhoneName() {
426:     protected void setPhoneName(String name) {
1759:     public void updatePhoneObject(int voiceRadioTech) {
2552:     public abstract int getPhoneType();
3557:     public int getPhoneId() {
3565:     public int getVoicePhoneServiceState() {
103:  * A base implementation for the com.android.internal.telephony.Phone interface.
105:  * Note that implementations of Phone.java are expected to be used
114:     private static final String LOG_TAG = "Phone";
236:      * This method is invoked when the Phone exits Emergency Callback Mode.
286:     // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and
417:      * Returns a string identifier for this phone interface for parties
418:      *  outside the phone app process.
473:      * Constructs a Phone in normal (non-unit test) mode.
484:         this(name, notifier, context, ci, unitTestMode, SubscriptionManager.DEFAULT_PHONE_INDEX,
489:      * Constructs a Phone in normal (non-unit test) mode.
497:      * @param phoneId the phone-id of this phone.
525:         * (i.e. voice) phone calls over the telephony network, and is allowed
550:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
565:         if (getPhoneType() != PhoneConstants.PHONE_TYPE_SIP) {
577:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_SIP) {
581:         synchronized(Phone.lockForRadioTechnologyChange) {
644:         // messages to be handled whether or not the phone is being destroyed
646:         // resources of the phone being destroyed
772:         Phone imsPhone = mImsPhone;
811:      * Gets the context for the phone, as set at initialization time.
867:      * Subclasses of Phone probably want to replace this with a
893:      * Subclasses of Phone probably want to replace this with a
917:      * Subclasses of Phone probably want to replace this with a
929:      * Notify the phone that an SMS has been sent. This will be used determine if the SMS was sent
943:      * Determine if the Phone has recently sent an emergency SMS and is still in the interval of
984:     protected void migrateFrom(Phone from) {
997:         // The emergency state of IMS phone will be cleared in ImsPhone#notifySrvccState after
1055:      *   Connection.getCall() == Phone.getRingingCall()
1075:      * Notifies when phone's video capabilities changes <p>
1080:      *  AsyncResult.result = true if phone supports video calling <p>
1219:      * Example: If Phone.dial is called with "*#31#", then the app will
1531:      * For unit tests; don't send notifications to "Phone"
1548:      * Subclasses of Phone probably want to replace this with a
1653:         // no need for regular phone
1657:      * Subclasses of Phone probably want to replace this with a
1668:      * If this is a simulated phone interface, returns a SimulatedRadioControl.
1682:      * the thread that originally obtained this Phone instance.
1687:                     "com.android.internal.telephony.Phone must be used from within one thread");
1719:      * If the phone has an active call and call waiting occurs,
1720:      * then the phone state is RINGING not OFFHOOK
1729:      * Retrieves the IccFileHandler of the Phone instance
1748:      * Retrieves the Handler of the Phone instance
1755:      * Update the phone object if the voice radio technology has changed
1763:     * Retrieves the ServiceStateTracker of the phone instance.
1771:      * Retrieves the EmergencyNumberTracker of the phone instance.
1834:      * Returns the ICC card interface for this phone, or null
1840:         //throw new Exception("getIccCard Shouldn't be called from Phone");
2019:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2171:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
2172:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
2173:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
2174:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
2185:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
2186:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
2187:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
2188:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
2475:     // This property is used to handle phone process crashes, and is the same for CDMA and IMS
2482:      * @return {@code true} if we are in emergency call back mode. This is a period where the phone
2548:      * Return a numerical identifier for the phone radio interface.
2549:      * @return PHONE_TYPE_XXX as defined above.
2562:     /** sets the voice mail count of the phone and notifies listeners. */
3246:      * Subclasses of Phone probably want to replace this with a
3264:      * Notify registrants if phone is video capable.
3396:         Rlog.e(LOG_TAG, "Error! This function should never be executed, inactive Phone.");
3409:      * Gets the Uicc card corresponding to this phone.
3410:      * @return the UiccCard object corresponding to the phone ID.
3440:      * Return an instance of a IMS phone
3554:      * Returns the phone id.
3566:         Phone imsPhone = mImsPhone;
3640:         Phone imsPhone = mImsPhone;
3659:         Phone imsPhone = mImsPhone;
3673:         Phone imsPhone = mImsPhone;
3687:         Phone imsPhone = mImsPhone;
3697:      * @return the IMS MmTel Registration technology for this Phone, defined in
3701:         Phone imsPhone = mImsPhone;
3711:      * Get the IMS MmTel Registration technology for this Phone, defined in
3715:         Phone imsPhone = mImsPhone;
3724:      * Asynchronously get the IMS MmTel Registration state for this Phone.
3727:         Phone imsPhone = mImsPhone;
3785:      *  Set phone radio capability
3787:      *  @param rc the phone radio capability defined in
3796:      *  Get phone radio access family
3816:      *  Get phone radio capability
3830:      *  @param rc the phone radio capability currently in effect for this phone.
3863:      * Registers the handler when phone radio  capability is changed.
3874:      * Unregister for notifications when phone radio type and access technology is changed.
3909:      * Determines if video calling is enabled for the phone.
3915:         Phone imsPhone = mImsPhone;
4047:     public static void checkWfcWifiOnlyModeBeforeDial(Phone imsPhone, int phoneId, Context context)
4087:      * This function returns the parent phone of the current phone. It is applicable
4088:      * only for IMS phone (function is overridden by ImsPhone). For others the phone
4132:      * none of the phone is in service, and one of them has the capability to make the emergency
4139:         for (Phone phone : PhoneFactory.getPhones()) {
4140:             if (phone != null) {
4141:                 ServiceState ss = phone.getServiceStateTracker().getServiceState();
4142:                 // One of the phone is in service, hence the device is not emergency call only.
4195:         pw.println("Phone: subId=" + getSubId());
4352:         pw.println("Phone Local Log: ");
51: import android.telephony.PhoneStateListener;
77: import com.android.internal.telephony.imsphone.ImsPhoneCall;
107:  * originally called PhoneFactory to obtain the interface.
401:      * PhoneNotifier is an abstraction for all system-wide
406:     protected PhoneNotifier mNotifier;
431:      * Retrieves Nai for phones. Returns null if Nai is not set.
500:                     boolean unitTestMode, int phoneId,
502:         mPhoneId = phoneId;
539:          * By default old phones won't have the property set but do generate
573:      * Start setup of ImsPhone, which will start trying to connect to the ImsResolver. Will not be
582:             if (mImsPhone == null) {
583:                 mImsPhone = PhoneFactory.makeImsPhone(mNotifier, this);
584:                 CallManager.getInstance().registerPhone(mImsPhone);
585:                 mImsPhone.registerForSilentRedial(
660:                     PhoneConstants.State state = getState();
662:                             && ((state == PhoneConstants.State.RINGING) ||
663:                                     (state == PhoneConstants.State.IDLE))) {
674:                 if (getState() == PhoneConstants.State.RINGING) {
692:                         if (mImsPhone != null) {
694:                             mImsPhone.notifyRedialConnectionChanged(cn);
698:                         if (mImsPhone != null) {
699:                             mImsPhone.notifyRedialConnectionChanged(null);
779:                     if (imsPhone != null) {
780:                         conn = imsPhone.getHandoverConnection();
781:                         migrateFrom(imsPhone);
783:                         Rlog.d(LOG_TAG, "HANDOVER_STARTED: mImsPhone null");
788:                     if (imsPhone != null) {
789:                         imsPhone.notifySrvccState(srvccState);
791:                         Rlog.d(LOG_TAG, "HANDOVER_COMPLETED: mImsPhone null");
844:      * {@link PhoneConstants.State} which can be obtained using the {@link PhoneStateListener}
1009:             // Since CallManager has already registered with both CS and IMS phones,
1726:     public abstract PhoneConstants.State getState();
1910:      * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged
1911:      * PhoneStateListener.onCellInfoChanged} will be invoked.
1926:      * available on this interface. Use PhoneStateNotifier or similar instead.
2014:      * available on this interface. Use PhoneStateNotifier or similar instead.
2056:      * interface. Use <code>PhoneStateNotifier</code> or an equivalent.
2400:     public PhoneConstants.DataState getDataConnectionState(String apnType) {
2401:         return PhoneConstants.DataState.DISCONNECTED;
2476:     // phones
2538:         if (mImsPhone != null) {
2539:             isPresent = isVideoCallOrConference(mImsPhone.getForegroundCall()) ||
2540:                     isVideoCallOrConference(mImsPhone.getBackgroundCall()) ||
2541:                     isVideoCallOrConference(mImsPhone.getRingingCall());
2685:      * Retrieves the MIN for CDMA phones.
2701:      *  Retrieves PRL Version for CDMA phones
3340:      * Retrieves the MSISDN from the UICC. For GSM/UMTS phones, this is equivalent to
3341:      * {@link #getLine1Number()}. For CDMA phones, {@link #getLine1Number()} returns
3342:      * the MDN, so this method is provided to return the MSISDN on CDMA/LTE phones.
3350:      * Retrieves the EF_PNN from the UICC For GSM/UMTS phones.
3359:      * {@link android.telephony.PhoneStateListener} instead.
3362:     public PhoneConstants.DataState getDataConnectionState() {
3363:         return getDataConnectionState(PhoneConstants.APN_TYPE_DEFAULT);
3380:      * @return {@link PhoneConstants#LTE_ON_CDMA_UNKNOWN}, {@link PhoneConstants#LTE_ON_CDMA_FALSE}
3381:      * or {@link PhoneConstants#LTE_ON_CDMA_TRUE}
3395:         // This function should be overridden by class GsmCdmaPhone.
3444:         return mImsPhone;
3510:      * Return if UT capability of ImsPhone is enabled or not
3514:         if (mImsPhone != null) {
3515:             return mImsPhone.isUtEnabled();
3534:         // dialInternal shall be overriden by GsmCdmaPhone
3562:      * Return the service state of mImsPhone if it is STATE_IN_SERVICE
3567:         if (imsPhone != null
3568:                 && imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
3642:         if (imsPhone != null) {
3643:             isImsRegistered = imsPhone.isImsRegistered();
3661:         if (imsPhone != null) {
3662:             isWifiCallingEnabled = imsPhone.isWifiCallingEnabled();
3675:         if (imsPhone != null) {
3676:             isAvailable = imsPhone.isImsCapabilityAvailable(capability, regTech);
3689:         if (imsPhone != null) {
3690:             isVolteEnabled = imsPhone.isVolteEnabled();
3703:         if (imsPhone != null) {
3704:             regTech = imsPhone.getImsRegistrationTech();
3716:         if (imsPhone != null) {
3717:             imsPhone.getImsRegistrationTech(callback);
3728:         if (imsPhone != null) {
3729:             imsPhone.getImsRegistrationState(callback);
3846:         int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
3857:             int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
3901:         if (mImsPhone == null) {
3905:         return mImsPhone.isImsAvailable();
3916:         if (imsPhone != null) {
3917:             return imsPhone.isVideoEnabled();
4049:         if (imsPhone == null || !imsPhone.isWifiCallingEnabled()) {
4050:             ImsManager imsManager = ImsManager.getInstance(context, phoneId);
4233:         if (mImsPhone != null) {
4235:                 mImsPhone.dump(fd, pw, args);
402:      * state change notification. DefaultPhoneNotifier is
475:      * @param notifier An instance of DefaultPhoneNotifier,
491:      * @param notifier An instance of DefaultPhoneNotifier,
2362:         // This function is added to send the notification to DefaultPhoneNotifier.
2487:         return mIsPhoneInEcmState;
2498:         mIsPhoneInEcmState = isInEcm;
2524:         if (call instanceof ImsPhoneCall) {
2525:             ImsPhoneCall imsPhoneCall = (ImsPhoneCall) call;
2526:             ImsCall imsCall = imsPhoneCall.getImsCall();
2580:                 mPhoneId, UiccController.APP_FAM_3GPP);
3316:      * A fucntion of type getPhoneProp(propType) where propType is an
3414:         return mUiccController.getUiccCard(mPhoneId);
3550:         return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
3558:         return mPhoneId;
3888:         ImsManager imsManager = ImsManager.getInstance(mContext, mPhoneId);
4196:         pw.println(" mPhoneId=" + mPhoneId);
4223:         pw.println(" getPhoneName()=" + getPhoneName());
4224:         pw.println(" getPhoneType()=" + getPhoneType());
android.googlesource.com/platform/superproject:external/guice/examples/src/example/xml/Phone.java: [ master, ]
3: public class Phone {
android.googlesource.com/platform/external/guice:examples/src/example/xml/Phone.java: [ master, ] Duplicate result
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/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) {
2633:     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
2307:                 // Given propValue is in URI format, not in phone number format used until
2315:                     // we may still have non-URI phone number. To keep given data as much as
2340:                     type = Phone.TYPE_CUSTOM;
2355:             // The phone number available via Skype.
2357:             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);
2304:             String phoneNumber = null;
2312:                     phoneNumber = propValue.substring(4);
2317:                     phoneNumber = propValue;
2320:                 phoneNumber = propValue;
2333:                         phoneNumber);
2352:                 addPhone(type, phoneNumber, label, isPrimary);
2365:             addPhone(type, propValue, null, isPrimary);
2399:         } else if (propertyName.equals(VCardConstants.PROPERTY_X_PHONETIC_FIRST_NAME)) {
2401:         } else if (propertyName.equals(VCardConstants.PROPERTY_X_PHONETIC_MIDDLE_NAME)) {
2403:         } 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);
2332:                 final Object typeObject = VCardUtils.getPhoneTypeFromStrings(typeCollection,
2400:             mNameData.mPhoneticGiven = propValue;
2402:             mNameData.mPhoneticMiddle = propValue;
2404:             mNameData.mPhoneticFamily = propValue;
2500:         } else if (!mNameData.emptyPhoneticStructuredName()) {
2502:                     mNameData.mPhoneticFamily, mNameData.mPhoneticMiddle, mNameData.mPhoneticGiven);
2505:         } else if (mPhoneList != null && mPhoneList.size() > 0) {
2506:             displayName = mPhoneList.get(0).mNumber;
2634:         return mPhoneList;
android.googlesource.com/platform/frameworks/base:cmds/statsd/src/atoms.proto: [ master, ]
5303:         PHONE = 9;
2338:         HARDWARE_FAILED_MICROPHONE = 1;
2508: message PhoneSignalStrengthChanged {
2520: message PhoneServiceStateChanged {
2532: message PhoneStateChanged {
116:         PhoneSignalStrengthChanged phone_signal_strength_changed = 40;
171:         PhoneServiceStateChanged phone_service_state_changed = 94;
172:         PhoneStateChanged phone_state_changed = 95;
1286:  *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
1291:         // The keyguard is hidden when the phone is unlocked.
1293:         // The keyguard is shown when the phone is locked (screen turns off).
1307:  *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
2503:  * Logs phone signal strength changes.
2515:  * Logs when the phone state, sim state or signal strength changes
2527:  * Logs when the phone becomes on or off.
3064:  *      frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
1454:     // For multi-sim phones, this distinguishes between the sim cards.
1476:     // For multi-sim phones, this distinguishes between the sim cards.
5098:  * time_in_state files not being present on some phones, have not been addressed. These should be
6311:  * Track how we arbitrate between microphone/input requests.
6326:  * Track how we arbitrate between microphone requests.
6341:  * Track how we arbitrate between microphone/input requests.
6356:  * 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 String PHONETIC_NAME = DATA8;
6846:             public static final String PHONETIC_NAME_STYLE = DATA10;
9077:             public static final String PHONETIC_NAME = "phonetic_name";
183:     public static final String STREQUENT_PHONE_ONLY = "strequent_phone_only";
990:         public static final String HAS_PHONE_NUMBER = "has_phone_number";
6008:             public static final String SEARCH_PHONE_NUMBER_KEY = "search_phone_number";
8995:         public static final String EXTRA_PHONE_URIS =
9129:             public static final String SECONDARY_PHONE_TYPE = "secondary_phone_type";
9143:             public static final String TERTIARY_PHONE_TYPE = "tertiary_phone_type";
1121:         public static final int STRUCTURED_PHONETIC_NAME = 37;
7637:         public static final String SUMMARY_WITH_PHONES = "summ_phones";
8023:         public static final String UNGROUPED_WITH_PHONES = "summ_phones";
8948:         public static final String ACTION_GET_MULTIPLE_PHONES =
68:  * as a phone number or email addresses.  The set of data kinds that can be
149:      * {@link CommonDataKinds.Phone#CONTENT_URI},
180:      * return only phone-related results. For example, frequently contacted person list should
181:      * include persons contacted via phone (not email, sms, etc.)
203:      * A boolean parameter for {@link CommonDataKinds.Phone#CONTENT_URI Phone.CONTENT_URI},
281:      * in email and phone lookup functionalities, it should also implement
284:      * {@link CommonDataKinds.Phone#CONTENT_FILTER_URI CommonDataKinds.Phone.CONTENT_FILTER_URI}.
581:          * allow creation of shortcuts for data items like email, phone or postal address,
986:          * An indicator of whether this contact has at least one phone number. "1" if there is
987:          * at least one phone number, "0" otherwise.
1110:      * of increasing priority: {@link #EMAIL}, {@link #PHONE},
1295:      * <li>If you need to look up a contact by the phone number, use
1376:      * <td>{@link #HAS_PHONE_NUMBER}</td>
1378:      * <td>An indicator of whether this contact has at least one phone number.
1379:      * "1" if there is at least one phone number, "0" otherwise.</td>
2409:      * Changes to the structured name, organization, phone number, email address,
2493:      * finalizes phone-side deletion by calling {@code resolver.delete(...)}
2496:      * changes to the phone, but not the reverse.  If one of those raw contacts
2497:      * is marked for deletion, it will remain on the phone.  However it will be
2710:      * SOURCE_ID field on the phone.
2731:      * the sync adapter updates the contact on the phone (without the
3234:          * camera that can be used for video chat (e.g. a front-facing camera on a phone).
4244:      * information (such as a phone number) and its
4255:      * {@link CommonDataKinds.Phone Phone.CONTENT_ITEM_TYPE}, then the column
4257:      * phone number, but if the data kind is
4264:      * {@link CommonDataKinds.Phone}, {@link CommonDataKinds.Email} etc. As a
4266:      * For example, {@link CommonDataKinds.Phone Phone.NUMBER} is the same as
4299:      * single transaction, which ensures that the phone-side and server-side
4337:      * values.put(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE);
4338:      * values.put(Phone.NUMBER, "1-800-GOOG-411");
4339:      * values.put(Phone.TYPE, Phone.TYPE_CUSTOM);
4340:      * values.put(Phone.LABEL, "free directory assistance");
4351:      *          .withValue(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE)
4352:      *          .withValue(Phone.NUMBER, "1-800-GOOG-411")
4353:      *          .withValue(Phone.TYPE, Phone.TYPE_CUSTOM)
4354:      *          .withValue(Phone.LABEL, "free directory assistance")
4400:      *          new String[] {Data._ID, Phone.NUMBER, Phone.TYPE, Phone.LABEL},
4402:      *                  + Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE + "'",
4412:      *          new String[] {Data._ID, Phone.NUMBER, Phone.TYPE, Phone.LABEL},
4414:      *                  + Data.MIMETYPE + "='" + Phone.CONTENT_ITEM_TYPE + "'",
4454:      * <li>{@link CommonDataKinds.Phone Phone.CONTENT_ITEM_TYPE}</li>
4493:      * the default phone number to use for the contact).</td>
4677:      * <td>{@link #HAS_PHONE_NUMBER}</td>
5022:          * The phone number as the user entered it.
5028:          * The type of phone number, for example Home or Work.
5034:          * The user defined label for the phone number.
5040:          * The phone number's E164 representation.
5047:      * A table that represents the result of looking up a phone number, for
5066:      * <td>Phone number.</td>
5072:      * <td>Phone number type. See {@link CommonDataKinds.Phone}.</td>
5078:      * <td>Custom label for the phone number. See {@link CommonDataKinds.Phone}.</td>
5132:      * <td>{@link #HAS_PHONE_NUMBER}</td>
5176:          * The content:// style URI for this table. Append the phone number you want to lookup
5184:                 "phone_lookup");
5233:                 "phone_lookup_enterprise");
5236:          * The MIME type of {@link #CONTENT_FILTER_URI} providing a directory of phone lookup rows.
5240:         public static final String CONTENT_TYPE = "vnd.android.cursor.dir/phone_lookup";
5949:             public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone_v2";
5955:             public static final String CONTENT_TYPE = "vnd.android.cursor.dir/phone_v2";
5980:              * The content:// style URL for phone lookup using a filter. The filter returns
5982:              * to display names as well as phone numbers. The filter argument should be passed
6005:              * If "1" or "true", phone numbers are searched.  If "0" or "false", phone numbers
6032:              * The phone number as the user entered it.
6038:              * The phone number's E164 representation. This value can be omitted in which
7466:          * that users can use for calling purposes. {@link Phone} and {@link SipAddress} are the
7471:          * each column. For example the meaning for {@link Phone}'s type is different than
7478:              * Similar to {@link Phone#CONTENT_URI}, but returns callable data instead of only
7479:              * phone numbers.
7484:              * Similar to {@link Phone#CONTENT_FILTER_URI}, but allows users to filter callable
7491:              * Similar to {@link Phone#ENTERPRISE_CONTENT_FILTER_URI}, but allows users to filter
7501:          * to start communicating with a person ({@link Phone} and {@link Email}). Note that this
7505:          * can use to initiate communications with another contact. {@link Phone} and {@link Email}
7631:          * {@link CommonDataKinds.GroupMembership} in this group, and also have phone numbers.
7763:      * phone numbers. Read-only value that is only present when querying
8019:          * no {@link CommonDataKinds.GroupMembership} entries, and also have phone numbers.
8083:      * no {@link CommonDataKinds.GroupMembership} entries, and also have phone
8170:      * {@link ContactsContract.CommonDataKinds.Phone#CONTENT_FILTER_URI}, and users can benefit
8185:      * interactions using the same contact data field (for example a phone number can be used to
8186:      * make phone calls or send SMS).
8241:          * Type of usage for voice interaction, which includes phone call, voice chat, and
8371:          * For example, passing the value {@link CommonDataKinds.Phone#CONTENT_ITEM_TYPE} can
8372:          * cause phone numbers to be displayed more prominently in QuickContacts.
8581:          *             {@link CommonDataKinds.Phone#CONTENT_ITEM_TYPE} can cause phone numbers to be
8621:          *             {@link CommonDataKinds.Phone#CONTENT_ITEM_TYPE} can cause phone numbers to be
8813:          * phone number or human readable username/user_id like "a_super_cool_user_name". This label
8818:          * <li><em>Note: Some apps may choose to use phone number as the unique contact ID in DATA1.
8819:          * If this applies to you and you’d like phone number to be shown below the Contact Name by
8822:          * make sure it does not include prefix text such as "Message +<phone>" or "Free Message
8823:          * +<phone>", etc. If you must show the prefix text in the Contacts App, please use a
8833:          * will use existing phone number entries as contact ID's for such app.
8894:          * otherwise, the value will be a phone number), and should be the unambiguous contact
8895:          * endpoint. This value is app-specific, it could be some proprietary ID or a phone number.
8931:          * list of phone numbers which come from the contacts or
8932:          * {@link #EXTRA_PHONE_URIS}.
8934:          * The phone numbers being passed in through {@link #EXTRA_PHONE_URIS}
8940:          * {@link android.app.Activity#RESULT_OK}, the array of picked phone
8942:          * {@link #EXTRA_PHONE_URIS}; otherwise, the
8984:          * The phone numbers want to be picked by default should be passed in as
8985:          * input value. These phone numbers could belong to the contacts or not.
8987:          * The phone numbers which were picked by the user are returned as output
8990:          * Type: array of URIs, the tel URI is used for the phone numbers which don't
8991:          * belong to any contact, the content URI is used for phone id in contacts.
8996:             "com.android.contacts.extra.PHONE_URIS";
9098:              * The extra field for the contact phone number.
9104:              * The extra field for the contact phone number type.
9106:              * {@link CommonDataKinds.Phone},
9112:              * The extra field for the phone isprimary flag.
9118:              * The extra field for an optional second contact phone number.
9124:              * The extra field for an optional second contact phone number type.
9126:              * {@link CommonDataKinds.Phone},
9132:              * The extra field for an optional third contact phone number.
9138:              * The extra field for an optional third contact phone number type.
9140:              * {@link CommonDataKinds.Phone},
9242:              * For example, an Exchange contact can only have one phone numbers of type Home,
9243:              * so the contact editor may choose a different type for this phone number to
9244:              * avoid dropping the valueable part of the row, which is the phone number.
110:  * {@link PhoneLookup}, which is used for quick caller-ID lookup</li>
430:          * {@link PhoneLookup#ENTERPRISE_CONTENT_FILTER_URI}, may contain this kind of URI.
850:      * @see PhoneLookup
901:      * @see PhoneLookup
1091:          * Pinyin is a phonetic method of entering Chinese characters. Typically not explicitly
1103:          * Hangul is the Korean phonetic alphabet.
1111:      * {@link #ORGANIZATION}, {@link #NICKNAME}, {@link #STRUCTURED_PHONETIC_NAME},
1120:         /** Display name comes from a structured name that only has phonetic components. */
1182:          * The phonetic alphabet used to represent the {@link #PHONETIC_NAME}.  See
1183:          * {@link PhoneticNameStyle}.
1189:          * Pronunciation of the full name in the phonetic alphabet specified by
1190:          * {@link #PHONETIC_NAME_STYLE}.
1194:          * interest only in countries with commonly used phonetic alphabets,
1195:          * such as Japan and Korea. See {@link PhoneticNameStyle}.
1205:          * it is the Hiragana version of the phonetic name.
1296:      * {@link PhoneLookup#CONTENT_FILTER_URI PhoneLookup.CONTENT_FILTER_URI},
1496:          * {@link PhoneLookup#ENTERPRISE_CONTENT_FILTER_URI} may contain this kind of URI.
1739:          * {@link PhoneLookup#ENTERPRISE_CONTENT_FILTER_URI}.
1747:          * {@link PhoneLookup#ENTERPRISE_CONTENT_FILTER_URI}.
1756:          * {@link PhoneLookup#ENTERPRISE_CONTENT_FILTER_URI} may return such a contact.
2483:      * AggregationExceptions, PhoneLookup rows are deleted automatically. When all raw
3221:          * An allowed flag of {@link #CHAT_CAPABILITY}. Indicates audio-chat capability (microphone
5007:      * @see PhoneLookup
5052:      * Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber));
5053:      * resolver.query(uri, new String[]{PhoneLookup.DISPLAY_NAME,...
5060:      * <th colspan='4'>PhoneLookup</th>
5179:          * Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI,
5180:          *         Uri.encode(phoneNumber));
5228:          * Uri lookupUri = Uri.withAppendedPath(PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI,
5229:          *         Uri.encode(phoneNumber));
5694:          * <td>{@link #PHONETIC_GIVEN_NAME}</td>
5696:          * <td>Used for phonetic spelling of the name, e.g. Pinyin, Katakana, Hiragana</td>
5700:          * <td>{@link #PHONETIC_MIDDLE_NAME}</td>
5706:          * <td>{@link #PHONETIC_FAMILY_NAME}</td>
5760:              * The phonetic version of the given name for the contact.
5766:              * The phonetic version of the additional name for the contact.
5772:              * The phonetic version of the family name for the contact.
5784:              * The alphabet used for capturing the phonetic name.
5785:              * See ContactsContract.PhoneticNameStyle.
5883:          * A data kind representing a telephone number.
5953:              * phones.
5963:                     "phones");
5977:                     Uri.withAppendedPath(Data.ENTERPRISE_CONTENT_URI, "phones");
6072:                     case TYPE_HOME: return com.android.internal.R.string.phoneTypeHome;
6073:                     case TYPE_MOBILE: return com.android.internal.R.string.phoneTypeMobile;
6074:                     case TYPE_WORK: return com.android.internal.R.string.phoneTypeWork;
6075:                     case TYPE_FAX_WORK: return com.android.internal.R.string.phoneTypeFaxWork;
6076:                     case TYPE_FAX_HOME: return com.android.internal.R.string.phoneTypeFaxHome;
6077:                     case TYPE_PAGER: return com.android.internal.R.string.phoneTypePager;
6078:                     case TYPE_OTHER: return com.android.internal.R.string.phoneTypeOther;
6079:                     case TYPE_CALLBACK: return com.android.internal.R.string.phoneTypeCallback;
6080:                     case TYPE_CAR: return com.android.internal.R.string.phoneTypeCar;
6081:                     case TYPE_COMPANY_MAIN: return com.android.internal.R.string.phoneTypeCompanyMain;
6082:                     case TYPE_ISDN: return com.android.internal.R.string.phoneTypeIsdn;
6083:                     case TYPE_MAIN: return com.android.internal.R.string.phoneTypeMain;
6084:                     case TYPE_OTHER_FAX: return com.android.internal.R.string.phoneTypeOtherFax;
6085:                     case TYPE_RADIO: return com.android.internal.R.string.phoneTypeRadio;
6086:                     case TYPE_TELEX: return com.android.internal.R.string.phoneTypeTelex;
6087:                     case TYPE_TTY_TDD: return com.android.internal.R.string.phoneTypeTtyTdd;
6088:                     case TYPE_WORK_MOBILE: return com.android.internal.R.string.phoneTypeWorkMobile;
6089:                     case TYPE_WORK_PAGER: return com.android.internal.R.string.phoneTypeWorkPager;
6090:                     case TYPE_ASSISTANT: return com.android.internal.R.string.phoneTypeAssistant;
6091:                     case TYPE_MMS: return com.android.internal.R.string.phoneTypeMms;
6092:                     default: return com.android.internal.R.string.phoneTypeCustom;
6769:          * <td>{@link #PHONETIC_NAME}</td>
6781:          * <td>PHONETIC_NAME_STYLE</td>
6831:              * The phonetic name of this company as the user entered it.
6843:              * The alphabet used for capturing the phonetic name.
6844:              * See {@link ContactsContract.PhoneticNameStyle}.
7759:      * <td>{@link #SUMMARY_WITH_PHONES}</td>
8080:      * <td>{@link #UNGROUPED_WITH_PHONES}</td>
8505:          *            {@link PhoneLookup#ENTERPRISE_CONTENT_FILTER_URI}.
8541:          *            {@link PhoneLookup#ENTERPRISE_CONTENT_FILTER_URI}.
8574:          *            {@link PhoneLookup#ENTERPRISE_CONTENT_FILTER_URI}.
8614:          *            {@link PhoneLookup#ENTERPRISE_CONTENT_FILTER_URI}.
8930:          * Starts an Activity that lets the user select the multiple phones from a
8949:                 "com.android.contacts.action.GET_MULTIPLE_PHONES";
8982:          * Used with {@link #ACTION_GET_MULTIPLE_PHONES} as the input or output value.
9074:              * The extra field for the contact phonetic name.
android.googlesource.com/platform/superproject:tools/adt/idea/android/gen/icons/AndroidIcons.java: [ master, ]
166:     public static final Icon Phone = load("/icons/nele/phone.png");
83:     public static final Icon Mobile_32 = load("/icons/formfactors/phone_tablet_32.png"); // 32x32
89:     public static final Icon Mobile_64 = load("/icons/formfactors/64/phone_tablet.png"); // 64x64
android.googlesource.com/platform/tools/adt/idea:android/gen/icons/AndroidIcons.java: [ master, ] Duplicate result
android.googlesource.com/platform/packages/apps/ContactsCommon:src/com/android/contacts/common/model/account/BaseAccountType.java: [ master, ]
104:         static final int PHONE = 10;
60:     protected static final int FLAGS_PHONE = EditorInfo.TYPE_CLASS_PHONE;
256:     protected DataKind addDataKindPhone(Context context) throws DefinitionException {
540:     public static class PhoneActionInflater extends CommonInflater {
552:     public static class PhoneActionAltInflater extends CommonInflater {
1034:     private static class PhoneKindBuilder extends KindBuilder {
65:     protected static final int FLAGS_PHONETIC = EditorInfo.TYPE_CLASS_TEXT
125:     protected static EditType buildPhoneType(int type) {
220:     protected DataKind addDataKindPhoneticName(Context context) throws DefinitionException {
30: import android.provider.ContactsContract.CommonDataKinds.Phone;
121:         this.titleRes = R.string.account_phone;
126:         return new EditType(type, Phone.getTypeLabelResource(type));
257:         DataKind kind = addKind(new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup,
258:                 Weight.PHONE, true));
263:         kind.actionBody = new SimpleInflater(Phone.NUMBER);
264:         kind.typeColumn = Phone.TYPE;
266:         kind.typeList.add(buildPhoneType(Phone.TYPE_MOBILE));
267:         kind.typeList.add(buildPhoneType(Phone.TYPE_HOME));
268:         kind.typeList.add(buildPhoneType(Phone.TYPE_WORK));
269:         kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_WORK).setSecondary(true));
270:         kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_HOME).setSecondary(true));
271:         kind.typeList.add(buildPhoneType(Phone.TYPE_PAGER).setSecondary(true));
272:         kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER));
274:                 buildPhoneType(Phone.TYPE_CUSTOM).setSecondary(true).setCustomColumn(Phone.LABEL));
275:         kind.typeList.add(buildPhoneType(Phone.TYPE_CALLBACK).setSecondary(true));
276:         kind.typeList.add(buildPhoneType(Phone.TYPE_CAR).setSecondary(true));
277:         kind.typeList.add(buildPhoneType(Phone.TYPE_COMPANY_MAIN).setSecondary(true));
278:         kind.typeList.add(buildPhoneType(Phone.TYPE_ISDN).setSecondary(true));
279:         kind.typeList.add(buildPhoneType(Phone.TYPE_MAIN).setSecondary(true));
280:         kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER_FAX).setSecondary(true));
281:         kind.typeList.add(buildPhoneType(Phone.TYPE_RADIO).setSecondary(true));
282:         kind.typeList.add(buildPhoneType(Phone.TYPE_TELEX).setSecondary(true));
283:         kind.typeList.add(buildPhoneType(Phone.TYPE_TTY_TDD).setSecondary(true));
284:         kind.typeList.add(buildPhoneType(Phone.TYPE_WORK_MOBILE).setSecondary(true));
285:         kind.typeList.add(buildPhoneType(Phone.TYPE_WORK_PAGER).setSecondary(true));
286:         kind.typeList.add(buildPhoneType(Phone.TYPE_ASSISTANT).setSecondary(true));
287:         kind.typeList.add(buildPhoneType(Phone.TYPE_MMS).setSecondary(true));
290:         kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
509:             return Phone.TYPE;
513:             return Phone.LABEL;
1037:             return "phone";
1045:                     Phone.CONTENT_ITEM_TYPE, Phone.TYPE, R.string.phoneLabelsGroup, Weight.PHONE,
1046:                     new PhoneActionInflater(), new SimpleInflater(Phone.NUMBER));
1052:             kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
1059:             return new EditType(type, Phone.getTypeLabelResource(type)).setSecondary(secondary);
1064:             if ("home".equals(type)) return build(Phone.TYPE_HOME, false);
1065:             if ("mobile".equals(type)) return build(Phone.TYPE_MOBILE, false);
1066:             if ("work".equals(type)) return build(Phone.TYPE_WORK, false);
1067:             if ("fax_work".equals(type)) return build(Phone.TYPE_FAX_WORK, true);
1068:             if ("fax_home".equals(type)) return build(Phone.TYPE_FAX_HOME, true);
1069:             if ("pager".equals(type)) return build(Phone.TYPE_PAGER, true);
1070:             if ("other".equals(type)) return build(Phone.TYPE_OTHER, false);
1071:             if ("callback".equals(type)) return build(Phone.TYPE_CALLBACK, true);
1072:             if ("car".equals(type)) return build(Phone.TYPE_CAR, true);
1073:             if ("company_main".equals(type)) return build(Phone.TYPE_COMPANY_MAIN, true);
1074:             if ("isdn".equals(type)) return build(Phone.TYPE_ISDN, true);
1075:             if ("main".equals(type)) return build(Phone.TYPE_MAIN, true);
1076:             if ("other_fax".equals(type)) return build(Phone.TYPE_OTHER_FAX, true);
1077:             if ("radio".equals(type)) return build(Phone.TYPE_RADIO, true);
1078:             if ("telex".equals(type)) return build(Phone.TYPE_TELEX, true);
1079:             if ("tty_tdd".equals(type)) return build(Phone.TYPE_TTY_TDD, true);
1080:             if ("work_mobile".equals(type)) return build(Phone.TYPE_WORK_MOBILE, true);
1081:             if ("work_pager".equals(type)) return build(Phone.TYPE_WORK_PAGER, true);
1084:             if ("assistant".equals(type)) return build(Phone.TYPE_ASSISTANT, true);
1085:             if ("mms".equals(type)) return build(Phone.TYPE_MMS, true);
1087:                 return build(Phone.TYPE_CUSTOM, true).setCustomColumn(Phone.LABEL);
66:             | EditorInfo.TYPE_TEXT_VARIATION_PHONETIC;
169:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
170:                 R.string.name_phonetic_family, FLAGS_PHONETIC));
171:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
172:                 R.string.name_phonetic_middle, FLAGS_PHONETIC));
173:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
174:                 R.string.name_phonetic_given, FLAGS_PHONETIC));
221:         DataKind kind = addKind(new DataKind(DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME,
222:                 R.string.name_phonetic, Weight.NONE, true));
228:         kind.fieldList.add(new EditField(DataKind.PSEUDO_COLUMN_PHONETIC_NAME,
229:                 R.string.name_phonetic, FLAGS_PHONETIC).setShortForm(true));
230:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
231:                 R.string.name_phonetic_family, FLAGS_PHONETIC).setLongForm(true));
232:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
233:                 R.string.name_phonetic_middle, FLAGS_PHONETIC).setLongForm(true));
234:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
235:                 R.string.name_phonetic_given, FLAGS_PHONETIC).setLongForm(true));
261:         kind.actionHeader = new PhoneActionInflater();
262:         kind.actionAltHeader = new PhoneActionAltInflater();
706:             addBuilder(new PhoneKindBuilder());
729:          * (structured, display and phonetic)
867:      * DataKind parser for Name. (structured, display, phonetic)
890:             // - DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME
943:             ks.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
944:                     R.string.name_phonetic_family, FLAGS_PHONETIC));
945:             ks.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
946:                     R.string.name_phonetic_middle, FLAGS_PHONETIC));
947:             ks.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
948:                     R.string.name_phonetic_given, FLAGS_PHONETIC));
986:             // Phonetic name
988:                     DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME, null,
989:                     R.string.name_phonetic, Weight.NONE,
996:             kp.fieldList.add(new EditField(DataKind.PSEUDO_COLUMN_PHONETIC_NAME,
997:                     R.string.name_phonetic, FLAGS_PHONETIC).setShortForm(true));
998:             kp.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
999:                     R.string.name_phonetic_family, FLAGS_PHONETIC).setLongForm(true));
1000:             kp.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
1001:                     R.string.name_phonetic_middle, FLAGS_PHONETIC).setLongForm(true));
1002:             kp.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
1003:                     R.string.name_phonetic_given, FLAGS_PHONETIC).setLongForm(true));
1050:             kind.actionAltHeader = new PhoneActionAltInflater();
543:             return ContactDisplayUtils.isCustomPhoneType(type);
548:             return ContactDisplayUtils.getPhoneLabelResourceId(type);
555:             return ContactDisplayUtils.isCustomPhoneType(type);
899:             final boolean supportsPhoneticFamilyName =
900:                     getAttr(attrs, "supportsPhoneticFamilyName", false);
901:             final boolean supportsPhoneticMiddleName =
902:                     getAttr(attrs, "supportsPhoneticMiddleName", false);
903:             final boolean supportsPhoneticGivenName =
904:                     getAttr(attrs, "supportsPhoneticGivenName", false);
911:             checkAttributeTrue(supportsPhoneticFamilyName, "supportsPhoneticFamilyName");
912:             checkAttributeTrue(supportsPhoneticMiddleName, "supportsPhoneticMiddleName");
913:             checkAttributeTrue(supportsPhoneticGivenName, "supportsPhoneticGivenName");
android.googlesource.com/platform/packages/apps/Bluetooth:src/com/android/bluetooth/map/BluetoothMapContentObserver.java: [ master, ]
2524:         public String phone;
3580:     private void registerPhoneServiceStateListener() {
3586:     private void unRegisterPhoneServiceStateListener() {
3651:     private PhoneStateListener mPhoneListener = new PhoneStateListener() {
453:         if (tm.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) {
1439:                                 String phone = "";
1441:                                     phone = c.getString(c.getColumnIndex(Sms.ADDRESS));
1442:                                     if (phone != null && !phone.isEmpty()) {
1443:                                         name = BluetoothMapContent.getContactNameFromPhone(phone,
1446:                                             name = phone;
1449:                                         name = phone;
1456:                                         phone = tm.getLine1Number();
1457:                                         name = phone;
2535:         PushMsgInfo(long id, int transparent, int retry, String phone, Uri uri) {
2539:             this.phone = phone;
2687:                     String phone = recipient.getFirstPhoneNumber();
2719:                         handle = sendMmsMessage(folder, phone, (BluetoothMapbMessageMime) msg,
2738:                             uri = addMessageToUri(mResolver, contentUri, phone, msgBody, "",
2785:                                         new PushMsgInfo(handle, transparent, retry, phone, uri);
3213:             Log.d(TAG, "sendMessage to " + msgInfo.phone);
3216:                 smsMng.sendTextMessageWithoutPersisting(msgInfo.phone, null, parts.get(0),
3219:                 smsMng.sendMultipartTextMessageWithoutPersisting(msgInfo.phone, null, parts,
3654:             Log.d(TAG, "Phone service state change: " + serviceState.getState());
47: import android.telephony.PhoneStateListener;
3583:         tm.listen(mPhoneListener, PhoneStateListener.LISTEN_SERVICE_STATE);
3589:         tm.listen(mPhoneListener, PhoneStateListener.LISTEN_NONE);
3670:         registerPhoneServiceStateListener();
3680:         unRegisterPhoneServiceStateListener();
android.googlesource.com/platform/packages/apps/Contacts:src/com/android/contacts/model/account/BaseAccountType.java: [ master, ]
106:         static final int PHONE = 10;
62:     protected static final int FLAGS_PHONE = EditorInfo.TYPE_CLASS_PHONE;
248:     protected DataKind addDataKindPhone(Context context) throws DefinitionException {
538:     public static class PhoneActionInflater extends CommonInflater {
550:     public static class PhoneActionAltInflater extends CommonInflater {
1015:     private static class PhoneKindBuilder extends KindBuilder {
67:     protected static final int FLAGS_PHONETIC = EditorInfo.TYPE_CLASS_TEXT
127:     protected static EditType buildPhoneType(int type) {
213:     protected DataKind addDataKindPhoneticName(Context context) throws DefinitionException {
30: import android.provider.ContactsContract.CommonDataKinds.Phone;
123:         this.titleRes = R.string.account_phone;
128:         return new EditType(type, Phone.getTypeLabelResource(type));
249:         DataKind kind = addKind(new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup,
250:                 Weight.PHONE, true));
255:         kind.actionBody = new SimpleInflater(Phone.NUMBER);
256:         kind.typeColumn = Phone.TYPE;
258:         kind.typeList.add(buildPhoneType(Phone.TYPE_MOBILE));
259:         kind.typeList.add(buildPhoneType(Phone.TYPE_HOME));
260:         kind.typeList.add(buildPhoneType(Phone.TYPE_WORK));
261:         kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_WORK).setSecondary(true));
262:         kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_HOME).setSecondary(true));
263:         kind.typeList.add(buildPhoneType(Phone.TYPE_PAGER).setSecondary(true));
264:         kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER));
266:                 buildPhoneType(Phone.TYPE_CUSTOM).setSecondary(true).setCustomColumn(Phone.LABEL));
267:         kind.typeList.add(buildPhoneType(Phone.TYPE_CALLBACK).setSecondary(true));
268:         kind.typeList.add(buildPhoneType(Phone.TYPE_CAR).setSecondary(true));
269:         kind.typeList.add(buildPhoneType(Phone.TYPE_COMPANY_MAIN).setSecondary(true));
270:         kind.typeList.add(buildPhoneType(Phone.TYPE_ISDN).setSecondary(true));
271:         kind.typeList.add(buildPhoneType(Phone.TYPE_MAIN).setSecondary(true));
272:         kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER_FAX).setSecondary(true));
273:         kind.typeList.add(buildPhoneType(Phone.TYPE_RADIO).setSecondary(true));
274:         kind.typeList.add(buildPhoneType(Phone.TYPE_TELEX).setSecondary(true));
275:         kind.typeList.add(buildPhoneType(Phone.TYPE_TTY_TDD).setSecondary(true));
276:         kind.typeList.add(buildPhoneType(Phone.TYPE_WORK_MOBILE).setSecondary(true));
277:         kind.typeList.add(buildPhoneType(Phone.TYPE_WORK_PAGER).setSecondary(true));
278:         kind.typeList.add(buildPhoneType(Phone.TYPE_ASSISTANT).setSecondary(true));
279:         kind.typeList.add(buildPhoneType(Phone.TYPE_MMS).setSecondary(true));
282:         kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
507:             return Phone.TYPE;
511:             return Phone.LABEL;
1018:             return "phone";
1026:                     Phone.CONTENT_ITEM_TYPE, Phone.TYPE, R.string.phoneLabelsGroup, Weight.PHONE,
1027:                     new PhoneActionInflater(), new SimpleInflater(Phone.NUMBER));
1033:             kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
1040:             return new EditType(type, Phone.getTypeLabelResource(type)).setSecondary(secondary);
1045:             if ("home".equals(type)) return build(Phone.TYPE_HOME, false);
1046:             if ("mobile".equals(type)) return build(Phone.TYPE_MOBILE, false);
1047:             if ("work".equals(type)) return build(Phone.TYPE_WORK, false);
1048:             if ("fax_work".equals(type)) return build(Phone.TYPE_FAX_WORK, true);
1049:             if ("fax_home".equals(type)) return build(Phone.TYPE_FAX_HOME, true);
1050:             if ("pager".equals(type)) return build(Phone.TYPE_PAGER, true);
1051:             if ("other".equals(type)) return build(Phone.TYPE_OTHER, false);
1052:             if ("callback".equals(type)) return build(Phone.TYPE_CALLBACK, true);
1053:             if ("car".equals(type)) return build(Phone.TYPE_CAR, true);
1054:             if ("company_main".equals(type)) return build(Phone.TYPE_COMPANY_MAIN, true);
1055:             if ("isdn".equals(type)) return build(Phone.TYPE_ISDN, true);
1056:             if ("main".equals(type)) return build(Phone.TYPE_MAIN, true);
1057:             if ("other_fax".equals(type)) return build(Phone.TYPE_OTHER_FAX, true);
1058:             if ("radio".equals(type)) return build(Phone.TYPE_RADIO, true);
1059:             if ("telex".equals(type)) return build(Phone.TYPE_TELEX, true);
1060:             if ("tty_tdd".equals(type)) return build(Phone.TYPE_TTY_TDD, true);
1061:             if ("work_mobile".equals(type)) return build(Phone.TYPE_WORK_MOBILE, true);
1062:             if ("work_pager".equals(type)) return build(Phone.TYPE_WORK_PAGER, true);
1065:             if ("assistant".equals(type)) return build(Phone.TYPE_ASSISTANT, true);
1066:             if ("mms".equals(type)) return build(Phone.TYPE_MMS, true);
1068:                 return build(Phone.TYPE_CUSTOM, true).setCustomColumn(Phone.LABEL);
68:             | EditorInfo.TYPE_TEXT_VARIATION_PHONETIC;
169:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
170:                 R.string.name_phonetic_family, FLAGS_PHONETIC));
171:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
172:                 R.string.name_phonetic_middle, FLAGS_PHONETIC));
173:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
174:                 R.string.name_phonetic_given, FLAGS_PHONETIC));
194:                     FLAGS_PERSON_NAME).setPhoneticsColumn(StructuredName.PHONETIC_FAMILY_NAME));
196:                     FLAGS_PERSON_NAME).setOptional(true).setPhoneticsColumn(StructuredName.PHONETIC_MIDDLE_NAME));
198:                     FLAGS_PERSON_NAME).setPhoneticsColumn(StructuredName.PHONETIC_GIVEN_NAME));
201:                     FLAGS_PERSON_NAME).setPhoneticsColumn(StructuredName.PHONETIC_GIVEN_NAME));
203:                     FLAGS_PERSON_NAME).setOptional(true).setPhoneticsColumn(StructuredName.PHONETIC_MIDDLE_NAME));
205:                     FLAGS_PERSON_NAME).setPhoneticsColumn(StructuredName.PHONETIC_FAMILY_NAME));
214:         DataKind kind = addKind(new DataKind(DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME,
215:                 R.string.name_phonetic, Weight.NONE, true));
222:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
223:                 R.string.name_phonetic_family, FLAGS_PHONETIC));
224:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
225:                 R.string.name_phonetic_middle, FLAGS_PHONETIC));
226:         kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
227:                 R.string.name_phonetic_given, FLAGS_PHONETIC));
253:         kind.actionHeader = new PhoneActionInflater();
254:         kind.actionAltHeader = new PhoneActionAltInflater();
704:             addBuilder(new PhoneKindBuilder());
727:          * (structured, display and phonetic)
865:      * DataKind parser for Name. (structured, display, phonetic)
888:             // - DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME
929:             ks.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
930:                     R.string.name_phonetic_family, FLAGS_PHONETIC));
931:             ks.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
932:                     R.string.name_phonetic_middle, FLAGS_PHONETIC));
933:             ks.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
934:                     R.string.name_phonetic_given, FLAGS_PHONETIC));
969:             // Phonetic name
971:                     DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME, null,
972:                     R.string.name_phonetic, Weight.NONE,
979:             kp.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
980:                     R.string.name_phonetic_family, FLAGS_PHONETIC));
981:             kp.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
982:                     R.string.name_phonetic_middle, FLAGS_PHONETIC));
983:             kp.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
984:                     R.string.name_phonetic_given, FLAGS_PHONETIC));
1031:             kind.actionAltHeader = new PhoneActionAltInflater();
541:             return ContactDisplayUtils.isCustomPhoneType(type);
546:             return ContactDisplayUtils.getPhoneLabelResourceId(type);
553:             return ContactDisplayUtils.isCustomPhoneType(type);
896:             final boolean supportsPhoneticFamilyName =
897:                     getAttr(attrs, "supportsPhoneticFamilyName", false);
898:             final boolean supportsPhoneticMiddleName =
899:                     getAttr(attrs, "supportsPhoneticMiddleName", false);
900:             final boolean supportsPhoneticGivenName =
901:                     getAttr(attrs, "supportsPhoneticGivenName", false);
907:             checkAttributeTrue(supportsPhoneticFamilyName, "supportsPhoneticFamilyName");
908:             checkAttributeTrue(supportsPhoneticMiddleName, "supportsPhoneticMiddleName");
909:             checkAttributeTrue(supportsPhoneticGivenName, "supportsPhoneticGivenName");
android.googlesource.com/platform/external/rapidjson:bin/types/mixed.json: [ master, ]
45:     "phone": "+1 (919) 438-2678",
104:     "phone": "+1 (889) 457-2319",
163:     "phone": "+1 (974) 410-2655",
222:     "phone": "+1 (983) 439-3000",
281:     "phone": "+1 (968) 578-2974",
340:     "phone": "+1 (980) 434-3976",
399:     "phone": "+1 (950) 466-3377",
458:     "phone": "+1 (956) 506-3807",
517:     "phone": "+1 (976) 455-2880",
576:     "phone": "+1 (941) 539-3851",
android.googlesource.com/platform/packages/apps/Exchange:src/com/android/exchange/adapter/ContactsSyncParser.java: [ master, ]
752:         String phone;
751:     static class PhoneRow implements UntypedRow {
755:         public PhoneRow(String _phone, int _type) {
1154:         public void addPhone(Entity entity, int type, String phone) {
70:     private static final int MAX_PHONE_ROWS = 2;
25: import android.provider.ContactsContract.CommonDataKinds.Phone;
72:     private static final String COMMON_TYPE_ROW = Phone.TYPE; // Could have been any typed row
148:                     workPhones.add(new PhoneRow(getValue(), Phone.TYPE_WORK));
151:                     ops.addPhone(entity, Phone.TYPE_MMS, getValue());
154:                     ops.addPhone(entity, Phone.TYPE_FAX_WORK, getValue());
156:                 case Tags.CONTACTS2_COMPANY_MAIN_PHONE:
157:                     ops.addPhone(entity, Phone.TYPE_COMPANY_MAIN, getValue());
160:                     ops.addPhone(entity, Phone.TYPE_FAX_HOME, getValue());
164:                     homePhones.add(new PhoneRow(getValue(), Phone.TYPE_HOME));
167:                     ops.addPhone(entity, Phone.TYPE_MOBILE, getValue());
170:                     ops.addPhone(entity, Phone.TYPE_CAR, getValue());
173:                     ops.addPhone(entity, Phone.TYPE_RADIO, getValue());
176:                     ops.addPhone(entity, Phone.TYPE_PAGER, getValue());
179:                     ops.addPhone(entity, Phone.TYPE_ASSISTANT, getValue());
322:         ops.addUntyped(entity, homePhones, Phone.CONTENT_ITEM_TYPE, Phone.TYPE_HOME,
323:                 MAX_PHONE_ROWS);
324:         ops.addUntyped(entity, workPhones, Phone.CONTENT_ITEM_TYPE, Phone.TYPE_WORK,
325:                 MAX_PHONE_ROWS);
756:             phone = _phone;
762:             builder.withValue(Im.DATA, phone);
763:             builder.withValue(Phone.TYPE, type);
768:             return type == _type && phone.equalsIgnoreCase(value);
931:                             final int subtype = cv.getAsInteger(Phone.TYPE);
1155:             RowBuilder builder = typedRowBuilder(entity, Phone.CONTENT_ITEM_TYPE, type);
1157:             if (cv != null && cvCompareString(cv, Phone.NUMBER, phone)) {
1160:             builder.withValue(Phone.TYPE, type);
1161:             builder.withValue(Phone.NUMBER, phone);
146:                 case Tags.CONTACTS_BUSINESS2_TELEPHONE_NUMBER:
147:                 case Tags.CONTACTS_BUSINESS_TELEPHONE_NUMBER:
162:                 case Tags.CONTACTS_HOME_TELEPHONE_NUMBER:
163:                 case Tags.CONTACTS_HOME2_TELEPHONE_NUMBER:
166:                 case Tags.CONTACTS_MOBILE_TELEPHONE_NUMBER:
169:                 case Tags.CONTACTS_CAR_TELEPHONE_NUMBER:
172:                 case Tags.CONTACTS_RADIO_TELEPHONE_NUMBER:
178:                 case Tags.CONTACTS_ASSISTANT_TELEPHONE_NUMBER:
1091:                     cvCompareString(cv, StructuredName.PHONETIC_GIVEN_NAME, yomiFirstName) &&
1092:                     cvCompareString(cv, StructuredName.PHONETIC_FAMILY_NAME, yomiLastName) &&
1100:             builder.withValue(StructuredName.PHONETIC_GIVEN_NAME, yomiFirstName);
1101:             builder.withValue(StructuredName.PHONETIC_FAMILY_NAME, yomiLastName);
1298:                     cvCompareString(cv, Organization.PHONETIC_NAME, yomiCompanyName) &&
1308:             builder.withValue(Organization.PHONETIC_NAME, yomiCompanyName);
115:         ArrayList<UntypedRow> homePhones = new ArrayList<UntypedRow>();
116:         ArrayList<UntypedRow> workPhones = new ArrayList<UntypedRow>();
github.com/android-pay/s2ap-quickstart-java:src/main/java/com/google/wallet/objects/webservice/WebserviceWalletUser.java: [ master, ]
22:   String phone;
173:   public String getPhone() {
180:   public void setPhone(String phone) {
171:    * @return the phone
174:     return phone;
178:    * @param phone the phone to set
181:     this.phone = phone;
android.googlesource.com/platform/external/libppp:src/datalink.h: [ master, ]
76:     } phone;
97:   } phone;
82:       int timeout;		/* Redial timeout value (end of phone list) */
94:     char *next;			/* Next phone from the list */
95:     char *alt;			/* Alternate (after fail) phone from the list */
96:     const char *chosen;		/* Chosen phone number after DIAL */
75:       char list[SCRIPT_LEN];	/* Telephone Numbers */
155: extern const char *datalink_ChoosePhoneNumber(struct datalink *);
github.com/android-pay/s2ap-quickstart-csharp:WalletObjectsCSharp/webservice/WebserviceWalletUser.cs: [ master, ]
32: 	   internal string phone;
159: 	  public virtual string Phone
158: 	  /// <returns> the phone </returns>
163: 			return phone;
167: 			this.phone = value;
github.com/MobileChromeApps/AndroidApkTemplate:apk-template/res/raw/messaging_api.js: [ master, ]
52:       phone: to,
android.googlesource.com/platform/external/libchrome:device/bluetooth/bluetooth_common.h: [ master, ]
33:   PHONE,
android.googlesource.com/platform/external/snakeyaml:src/test/java/org/yaml/snakeyaml/resolver/ResolverTest.java: [ master, ]
75:     class Phone {
78:         public Phone(String n) {
105:         private class RepresentPhone implements Represent {
119:         private class ConstructPhone extends AbstractConstruct {
141:         private class RepresentPhone implements Represent {
43:         yaml.addImplicitResolver(new Tag(Tag.PREFIX + "Phone"), regexp, "0123456789");
44:         Phone phone1 = new Phone("12-34-567");
45:         Phone phone2 = new Phone("11-22-333");
46:         Phone phone3 = new Phone("44-55-777");
47:         List<Phone> etalonList = new ArrayList<Phone>();
48:         etalonList.add(phone1);
49:         etalonList.add(phone2);
50:         etalonList.add(phone3);
53:         List<Phone> parsedList = (List<Phone>) yaml.load(output);
55:         assertEquals(phone1, parsedList.get(0));
56:         assertEquals(phone2, parsedList.get(1));
57:         assertEquals(phone3, parsedList.get(2));
64:         yaml.addImplicitResolver(new Tag(Tag.PREFIX + "Phone"), regexp, "\0");
69:         map.put("a", new Phone("12-34-567"));
88:             if (!(obj instanceof Phone)) {
96:             return "Phone: " + number;
102:             this.representers.put(Phone.class, new RepresentPhone());
107:                 Phone phone = (Phone) data;
108:                 String value = phone.getNumber();
109:                 return representScalar(new Tag(Tag.PREFIX + "Phone"), value);
116:             this.yamlConstructors.put(new Tag(Tag.PREFIX + "Phone"), new ConstructPhone());
122:                 return new Phone(val);
130:             this.representers.put(Phone.class, new RepresentPhone());
135:                 Point phone = (Point) data;
136:                 String value = "x" + (int) phone.getX() + "_y" + (int) phone.getY();
143:                 Phone phone = (Phone) data;
144:                 String value = phone.getNumber();
145:                 return representScalar(new Tag(Tag.PREFIX + "Phone"), value);
android.googlesource.com/platform/external/grpc-grpc:third_party/nanopb/tests/common/person.proto: [ master, ]
21:   repeated PhoneNumber phone = 4 [(nanopb).max_count = 5];
10:   enum PhoneType {
16:   message PhoneNumber {
18:     optional PhoneType type = 2 [default = HOME];
android.googlesource.com/platform/external/nanopb-c:tests/common/person.proto: [ master, ] Duplicate result
android.googlesource.com/platform/external/python/cpython3:Lib/ctypes/test/test_structures.py: [ master, ]
285:         class Phone(Structure):
318:         class Phone(Structure):
291:                         ("phone", Phone),
297:         self.assertEqual(p.phone.areacode, b"1234")
298:         self.assertEqual(p.phone.number, b"5678")
324:                         ("phone", Phone),
330:                              "(Phone) <class 'TypeError'>: "
336:                              "(Phone) <class 'TypeError'>: too many initializers")
android.googlesource.com/platform/superproject:external/python/cpython3/Lib/ctypes/test/test_structures.py: [ master, ] Duplicate result
android.googlesource.com/platform/superproject:external/nanopb-c/tests/common/person.proto: [ master, ] Duplicate result
android.googlesource.com/platform/frameworks/policies/base:phone/com/android/internal/policy/impl/PhoneWindowManager.java: [ master, ]
128:     static final int PHONE_LAYER = 3;
117: public class PhoneWindowManager implements WindowManagerPolicy {
136:     static final int PRIORITY_PHONE_LAYER = 9;
1011:     static ITelephony getPhoneInterface() {
88: import static android.view.WindowManager.LayoutParams.TYPE_PHONE;
89: import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE;
111:  * WindowManagerPolicy implementation for the Android phone UI.  This
661:             case TYPE_PHONE:
662:             case TYPE_PRIORITY_PHONE:
771:         case TYPE_PHONE:
772:             return PHONE_LAYER;
787:         case TYPE_PRIORITY_PHONE:
788:             return PRIORITY_PHONE_LAYER;
1677:         final ITelephony phone = getPhoneInterface();
1678:         if (phone == null) {
1683:             return phone.isOffhook();
1790:             // This is necessary because the phone app will disable the keyguard
113:  * PhoneWindowManager.  This is used to protect some internal state, and
508:                 "PhoneWindowManager.mBroadcastWakeLock");
1061:                             ITelephony phoneServ = getPhoneInterface();
1062:                             if (phoneServ != null) {
1063:                                 incomingRinging = phoneServ.isRinging();
1674:      * @return Whether a telephone call is in progress right now.
1819:                     ITelephony phoneServ = getPhoneInterface();
1820:                     if (phoneServ != null) {
1823:                                 handled = hungUp = phoneServ.endCall();
1825:                                 if (phoneServ.isRinging()) {
1828:                                     phoneServ.silenceRinger();
1830:                                 } else if (phoneServ.isOffhook() &&
1836:                                     handled = hungUp = phoneServ.endCall();
1890:                     // case, the PhoneWindow class will do the same thing, except it will
1908:                         ITelephony phoneServ = getPhoneInterface();
1909:                         if (phoneServ != null) {
1910:                             if (phoneServ.isRinging()) {
1913:                                 phoneServ.answerRingingCall();
1937:                         ITelephony phoneServ = getPhoneInterface();
1938:                         if (phoneServ != null) {
1939:                             if (phoneServ.isRinging()) {
1944:                                 phoneServ.silenceRinger();
1068:                             Log.w(TAG, "RemoteException from getPhoneInterface()", ex);
1923:                         Log.w(TAG, "CALL button: RemoteException from getPhoneInterface()", ex);
1954:                         Log.w(TAG, "VOLUME button: RemoteException from getPhoneInterface()", ex);
github.com/google-developer-training/android-fundamentals-phone-sms:PhoneCallingSample/app/src/main/java/com/example/android/phonecallingsample/MainActivity.java: [ master, ]
42:     private static final int MY_PERMISSIONS_REQUEST_CALL_PHONE = 1;
17: package com.example.android.phonecallingsample;
96:     private void checkForPhonePermission() {
175:     private class MyPhoneCallListener extends PhoneStateListener {
37:  * This app accepts a phone number and makes a phone call.
50:      *     Checks for phone permission.
65:             // Check for phone permission.
67:             // Register the PhoneStateListener to monitor phone activity.
94:      * Checks whether the app has phone-calling permission.
98:                 Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
101:             // MY_PERMISSIONS_REQUEST_CALL_PHONE is an
105:                     new String[]{Manifest.permission.CALL_PHONE},
106:                     MY_PERMISSIONS_REQUEST_CALL_PHONE);
126:             case MY_PERMISSIONS_REQUEST_CALL_PHONE: {
127:                 if (permissions[0].equalsIgnoreCase(Manifest.permission.CALL_PHONE)
144:      * Uses an implicit intent to make the phone call.
147:      * @param view View (phone_icon) that was clicked.
151:         // Use format with "tel:" and phone number to create phoneNumber.
153:         // Log the concatenated phone number for dialing.
159:         // Set the data for the intent as the phone number.
161:         // If package resolves to an app, check for phone permission,
172:      * Monitors and logs phone call activities, and shows the phone state
181:             String message = getString(R.string.phone_status);
191:                     // Phone call is active -- off the hook.
198:                     // Phone is idle before and after phone call.
200:                     // restart activity when phone call ends.
217:                     message = message + "Phone off";
226:      * Makes the call button (phone_icon) invisible so that it can't be used,
230:         Toast.makeText(this, R.string.phone_disabled, Toast.LENGTH_LONG).show();
231:         ImageButton callButton = (ImageButton) findViewById(R.id.phone_icon);
240:      * Makes the call button (phone_icon) visible so that it can be used.
243:         ImageButton callButton = (ImageButton) findViewById(R.id.phone_icon);
27: import android.telephony.PhoneStateListener;
51:      *     Sets the PhoneStateListener.
69:             mTelephonyManager.listen(mListener, PhoneStateListener.LISTEN_CALL_STATE);
152:         String phoneNumber = String.format("tel: %s", editText.getText().toString());
154:         Log.d(TAG, getString(R.string.dial_number) + phoneNumber);
155:         Toast.makeText(this, getString(R.string.dial_number) + phoneNumber,
160:         callIntent.setData(Uri.parse(phoneNumber));
262:             mTelephonyManager.listen(mListener, PhoneStateListener.LISTEN_NONE);
45:     private MyPhoneCallListener mListener;
66:             checkForPhonePermission();
68:             mListener = new MyPhoneCallListener();
164:             checkForPhonePermission();
github.com/google-developer-training/android-fundamentals-phone-sms:PhoneCallingSampleChallenge/app/src/main/java/com/example/android/phonecallingsamplechallenge/MainActivity.java: [ master, ]
45:     private static final int MY_PERMISSIONS_REQUEST_CALL_PHONE = 1;
17: package com.example.android.phonecallingsamplechallenge;
99:     private void checkForPhonePermission() {
188:     private class MyPhoneCallListener extends PhoneStateListener {
39:  * This app accepts a phone number and makes a phone call.
40:  * For incoming calls, the app shows the phone number of the caller.
53:      *     Checks for phone permission.
68:             // Check for phone permission.
70:             // Register the PhoneStateListener to monitor phone activity.
97:      * Checks whether the app has phone-calling permission.
101:                 Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
104:             // MY_PERMISSIONS_REQUEST_CALL_PHONE is an
108:                     new String[]{Manifest.permission.CALL_PHONE},
109:                     MY_PERMISSIONS_REQUEST_CALL_PHONE);
129:             case MY_PERMISSIONS_REQUEST_CALL_PHONE: {
130:                 if (permissions[0].equalsIgnoreCase(Manifest.permission.CALL_PHONE)
148:      * Uses an implicit intent to make the phone call.
164:         // Use format with "tel:" and phone number to create phoneNumber.
166:         // Log the concatenated phone number for dialing.
172:         // Set the data for the intent as the phone number.
174:         // If package resolves to an app, check for phone permission,
185:      * Monitors and logs phone call activities, and shows the phone state
194:             String message = getString(R.string.phone_status);
204:                     // Phone call is active -- off the hook.
211:                     // Phone is idle before and after phone call.
213:                     // restart activity when phone call ends.
230:                     message = message + "Phone off";
239:      * Makes the call button (phone icon) invisible so that it can't be used,
243:         Toast.makeText(this, R.string.phone_disabled, Toast.LENGTH_LONG).show();
244:         ImageButton callButton = (ImageButton) findViewById(R.id.phone_icon);
253:      * Makes the call button (phone icon) visible so that it can be used.
256:         ImageButton callButton = (ImageButton) findViewById(R.id.phone_icon);
27: import android.telephony.PhoneNumberUtils;
28: import android.telephony.PhoneStateListener;
54:      *     Sets the PhoneStateListener.
72:             mTelephonyManager.listen(mListener, PhoneStateListener.LISTEN_CALL_STATE);
162:                     PhoneNumberUtils.normalizeNumber(editText.getText().toString());
165:         String phoneNumber = String.format("tel: %s", normalizedPhoneNumber);
167:         Log.d(TAG, getString(R.string.dial_number) + phoneNumber);
168:         Toast.makeText(this, getString(R.string.dial_number) + phoneNumber,
173:         callIntent.setData(Uri.parse(phoneNumber));
273:             mTelephonyManager.listen(mListener, PhoneStateListener.LISTEN_NONE);
48:     private MyPhoneCallListener mListener;
69:             checkForPhonePermission();
71:             mListener = new MyPhoneCallListener();
154:         String normalizedPhoneNumber;
159:             normalizedPhoneNumber = editText.getText().toString();
161:             normalizedPhoneNumber =
177:             checkForPhonePermission();
android.googlesource.com/platform/external/sqlite:android/PhoneNumberUtils.cpp: [ master, ]
281: static bool phone_number_compare_inter(const char* const org_a, const char* const org_b,
444: bool phone_number_compare_strict(const char* a, const char* b)
453: bool phone_number_stripped_reversed_inter(const char* in, char* out, const int len, int *outlen) {
138:  * digit to compare two phone numbers.
260:  * Compare phone numbers a and b, return true if they're identical
268:  * "the display language is English but the phone should be in Japan", but
270:  * in the country where the phone is used. More specifically, "880-1234-1234"
271:  * is not valid phone number in Japan since the trunk prefix in Japan is not 8
312:             // Different Country Calling Code. Must be different phone number.
380:                 return phone_number_compare_inter(org_a, org_b, false);
395:                 return phone_number_compare_inter(org_a, org_b, false);
446:     return phone_number_compare_inter(a, b, true);
450:  * Imitates the Java method PhoneNumberUtils.getStrippedReversed.
android.googlesource.com/platform/test/mlts/benchmark:src/com/android/nn/benchmark/evaluators/PhoneErrorRate.java: [ master, ]
13:     static private final float PHONE_ERROR_RATE_LIMIT = 5f;  // 5%
12: public class PhoneErrorRate extends BaseSequenceEvaluator {
10:  * This validates that the Phone Error Rate (PER) is within the limit.
21:         if (per > PHONE_ERROR_RATE_LIMIT) {
22:             outValidationErrors.add("Phone error rate exceeded the limit: " + per);
29:         keys.add("max_phone_error_rate");
33:     /** Calculates Phone Error Rate in percent. */
36:         int[] outputPhones = new int[inferenceCount];
37:         int[] expectedOutputPhones = new int[inferenceCount];
39:             outputPhones[i] = SequenceUtils.indexOfLargest(outputs[i]);
40:             expectedOutputPhones[i] = SequenceUtils.indexOfLargest(expectedOutputs[i]);
42:         int errorCount = SequenceUtils.calculateEditDistance(outputPhones, expectedOutputPhones);
github.com/apache/incubator-milagro-mfa-sdk-android:mpin-sdk-core/ext/boost/boost/predef/platform/windows_phone.h: [ master, ]
25: #define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_NOT_AVAILABLE
29: #   define BOOST_PLAT_WINDOWS_PHONE BOOST_VERSION_NUMBER_AVAILABLE
9: #define BOOST_PREDEF_PLAT_WINDOWS_PHONE_H
33: #   define BOOST_PLAT_WINDOWS_PHONE_AVALIABLE
37: #define BOOST_PLAT_WINDOWS_PHONE_NAME "Windows Phone"
8: #ifndef BOOST_PREDEF_PLAT_WINDOWS_PHONE_H
16: [heading `BOOST_PLAT_WINDOWS_PHONE`]
21:     [[`WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP`] [__predef_detection__]]
27: #if BOOST_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
28: #   undef BOOST_PLAT_WINDOWS_PHONE
32: #if BOOST_PLAT_WINDOWS_PHONE
40: BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_WINDOWS_PHONE,BOOST_PLAT_WINDOWS_PHONE_NAME)
android.googlesource.com/platform/packages/apps/Car/tests:TestMediaApp/src/com/android/car/media/testmediaapp/phone/TmaLauncherActivity.java: [ master, ]
1: package com.android.car.media.testmediaapp.phone;
18:  * Runs on a phone, thus making the browse tree available to bluetooth.
github.com/googlearchive/android-AutofillFramework:Application/build/generated/source/r/debug/com/example/android/autofill/app/R.java: [ master, ]
5261:     public static final int recycler_view_label_phone=0x7f10007b;
16198:      * <tr><td>phone</td><td>3</td><td></td></tr>
16214:      * <tr><td>textPhonetic</td><td>c1</td><td></td></tr>
github.com/googlearchive/android-AutofillFramework:Application/build/generated/source/r/release/com/example/android/autofill/app/R.java: [ master, ] Duplicate result
android.googlesource.com/platform/external/tpm2:tpm_types.h: [ master, ]
345: #define TPM_PS_CELL_PHONE      0x00000003
android.googlesource.com/platform/frameworks/base:telephony/java/android/telephony/TelephonyManager.java: [ master, ]
171:     public static final String PHONE_PROCESS_NAME = "com.android.phone";
2226:     public static final int PHONE_TYPE_NONE = PhoneConstants.PHONE_TYPE_NONE;
2228:     public static final int PHONE_TYPE_GSM = PhoneConstants.PHONE_TYPE_GSM;
2230:     public static final int PHONE_TYPE_CDMA = PhoneConstants.PHONE_TYPE_CDMA;
2232:     public static final int PHONE_TYPE_SIP = PhoneConstants.PHONE_TYPE_SIP;
2234:     public static final int PHONE_TYPE_IMS = PhoneConstants.PHONE_TYPE_IMS;
2242:     public static final int PHONE_TYPE_THIRD_PARTY = PhoneConstants.PHONE_TYPE_THIRD_PARTY;
2567:     public String getNetworkOperatorForPhone(int phoneId) {
3641:     public String getSimOperatorNumericForPhone(int phoneId) {
3678:     public String getSimOperatorNameForPhone(int phoneId) {
3710:     public String getSimCountryIsoForPhone(int phoneId) {
8346:     public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
8368:     public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
9282:     public boolean isWorldPhone() {
9486:     public void setSimOperatorNumericForPhone(int phoneId, String numeric) {
9510:     public void setSimOperatorNameForPhone(int phoneId, String name) {
9534:     public void setSimCountryIsoForPhone(int phoneId, String iso) {
9558:     public void setSimStateForPhone(int phoneId, String state) {
9669:     public void setBasebandVersionForPhone(int phoneId, String version) {
9710:     public String getBasebandVersionForPhone(int phoneId) {
9770:     public String getOtaSpNumberSchemaForPhone(int phoneId, String defaultValue) {
9801:     public boolean getSmsReceiveCapableForPhone(int phoneId, boolean defaultValue) {
9831:     public boolean getSmsSendCapableForPhone(int phoneId, boolean defaultValue) {
9871:     public void setNetworkOperatorNameForPhone(int phoneId, String name) {
9896:     public void setNetworkOperatorNumericForPhone(int phoneId, String numeric) {
9921:     public void setNetworkRoamingForPhone(int phoneId, boolean isRoaming) {
9950:     public void setDataNetworkTypeForPhone(int phoneId, int type) {
562:     public static final String ACTION_PHONE_STATE_CHANGED =
812:     public static final String EXTRA_PHONE_ACCOUNT_HANDLE =
427:     public int getPhoneCount() {
514:     public TelephonyManager createForPhoneAccountHandle(PhoneAccountHandle phoneAccountHandle) {
2256:     public int getCurrentPhoneType() {
2271:     public int getCurrentPhoneType(int subId) {
2289:     public int getCurrentPhoneTypeForSlot(int slotIndex) {
2318:     public int getPhoneType() {
2325:     private int getPhoneTypeFromProperty() {
2331:     private int getPhoneTypeFromProperty(int phoneId) {
2338:     private int getPhoneTypeFromNetworkType() {
2343:     private int getPhoneTypeFromNetworkType(int phoneId) {
2364:     public static int getPhoneType(int networkMode) {
6720:     private int getPhoneId() {
6735:     private int getPhoneId(int preferredSubId) {
9725:     public void setPhoneType(int type) {
9739:     public void setPhoneType(int phoneId, int type) {
9964:     public int getSubIdForPhoneAccount(@Nullable PhoneAccount phoneAccount) {
9985:     public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
167:      * The process name of the Phone app as well as many other apps that use this process name, such
508:      * phone account.
510:      * @return a TelephonyManager that uses the given phone account for all calls, or {@code null}
511:      * if the phone account does not correspond to a valid subscription ID.
539:      * extra {@link #EXTRA_INCOMING_NUMBER} provides the phone number for incoming and outgoing
544:      * {@link android.Manifest.permission#READ_PHONE_STATE} permission, it will receive the
545:      * broadcast twice; one with the {@link #EXTRA_INCOMING_NUMBER} populated with the phone number,
561:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
563:             "android.intent.action.PHONE_STATE";
566:      * The Phone app sends this intent when a user opts to respond-via-message during an incoming
573:      * same way: the path part of the URI contains the recipient's phone number or a comma-separated
574:      * set of phone numbers if there are multiple recipients. For example, {@code
588:      * &lt;!-- Service that delivers SMS messages received from the phone "quick response" -->
638:      * The {@link #EXTRA_PHONE_ACCOUNT_HANDLE} extra indicates which {@link PhoneAccountHandle} to
643:      * @see #EXTRA_PHONE_ACCOUNT_HANDLE
668:      * The lookup key used with the {@link #ACTION_PHONE_STATE_CHANGED} broadcast
700:      * Extra key used with the {@link #ACTION_PHONE_STATE_CHANGED} broadcast
701:      * for a String containing the incoming or outgoing phone number.
703:      * This extra is only populated for receivers of the {@link #ACTION_PHONE_STATE_CHANGED}
705:      * {@link android.Manifest.permission#READ_PHONE_STATE} permissions.
707:      * For incoming calls, the phone number is only guaranteed to be populated when the
711:      * For outgoing calls, the phone number is only guaranteed to be populated when the
719:      * to retrieve the phone number for calls instead.  Apps performing call screening should use
733:      * Requires the READ_PRECISE_PHONE_STATE permission.
781:      * The {@link #EXTRA_PHONE_ACCOUNT_HANDLE} extra indicates which {@link PhoneAccountHandle} the
795:      * @see #EXTRA_PHONE_ACCOUNT_HANDLE
813:             "android.telephony.extra.PHONE_ACCOUNT_HANDLE";
1256:      * phone has not registered to a network yet. In this case the receiver may substitute an
1317:      * The phone id where the data stall recovery is attempted.
1320:      * Requires the READ_PHONE_STATE permission.
1331:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
1385:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1730:      * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}.
1732:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
1743:      * Requires Permission: READ_PRIVILEGED_PHONE_STATE.
1750:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1770:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
1771:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
1782:      *     READ_PHONE_STATE permission then null is returned.</li>
1784:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1793:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1812:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
1813:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
1824:      *     READ_PHONE_STATE permission then null is returned.</li>
1826:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1837:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1861:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1872:      *     <li>The caller holds the READ_PRIVILEGED_PHONE_STATE permission.</li>
1874:      *     {@link Manifest.permission#READ_PHONE_STATE} permission.</li>
1888:      *     READ_PHONE_STATE permission then null is returned.</li>
1890:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1897:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1943:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
1944:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
1955:      *     READ_PHONE_STATE permission then null is returned.</li>
1957:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1962:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1970:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
1971:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
1982:      *     READ_PHONE_STATE permission then null is returned.</li>
1984:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1991:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
2042:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
2043:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
2051:      *     READ_PHONE_STATE permission then null is returned.</li>
2053:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
2058:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
2066:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
2067:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
2075:      *     READ_PHONE_STATE permission then null is returned.</li>
2077:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
2137:                         + " phone type doesn't match CellLocation type");
2225:     /** No phone radio. */
2227:     /** Phone radio is GSM. */
2229:     /** Phone radio is CDMA. */
2231:     /** Phone is via SIP. */
2233:     /** Phone is via IMS. */
2237:      * Phone is via Third Party.
2245:      * Returns the current phone type.
2248:      * @see #PHONE_TYPE_NONE
2249:      * @see #PHONE_TYPE_GSM
2250:      * @see #PHONE_TYPE_CDMA
2251:      * @see #PHONE_TYPE_SIP
2261:      * Returns a constant indicating the device phone type for a subscription.
2263:      * @see #PHONE_TYPE_NONE
2264:      * @see #PHONE_TYPE_GSM
2265:      * @see #PHONE_TYPE_CDMA
2267:      * @param subId for which phone type is returned
2275:             // still may want to know what type of phone we've got.
2310:      * Returns a constant indicating the device phone type.  This
2313:      * @see #PHONE_TYPE_NONE
2314:      * @see #PHONE_TYPE_GSM
2315:      * @see #PHONE_TYPE_CDMA
2316:      * @see #PHONE_TYPE_SIP
2320:             return PHONE_TYPE_NONE;
2333:                 phoneId, TelephonyProperties.current_active_phone(), null);
2344:         // When the system property CURRENT_ACTIVE_PHONE, has not been set,
2351:         return TelephonyManager.PHONE_TYPE_NONE;
2355:      * This function returns the type of the phone, depending
2359:      * @return Phone Type
2369:             return PhoneConstants.PHONE_TYPE_CDMA;
2387:             return PhoneConstants.PHONE_TYPE_GSM;
2389:         // Use CDMA Phone for the global mode including CDMA
2393:             return PhoneConstants.PHONE_TYPE_CDMA;
2397:                 return PhoneConstants.PHONE_TYPE_CDMA;
2399:                 return PhoneConstants.PHONE_TYPE_GSM;
2402:             return PhoneConstants.PHONE_TYPE_GSM;
2594:      * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
2603:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2686:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
2790:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2822:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2838:             // This could happen before phone restarts due to crashing
2850:      * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
2874:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2887:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2903:             // This could happen before phone restarts due to crashing
2911:      * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
2915:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2924:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2940:             // This could happen before phone restarts due to crashing
3221:      * <p class="note">Requires the READ_PRIVILEGED_PHONE_STATE permission.
3256:      * <p class="note">Requires the READ_PRIVILEGED_PHONE_STATE permission.
3272:      * <p class="note">Requires the READ_PRIVILEGED_PHONE_STATE permission.
3330:             // This could happen before phone restarts due to crashing
3410:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3483:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3516:      * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
3523:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3718:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
3719:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
3730:      *     READ_PHONE_STATE permission then null is returned.</li>
3732:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
3737:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3746:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
3747:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
3758:      *     READ_PHONE_STATE permission then null is returned.</li>
3760:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
3767:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3779:             // This could happen before phone restarts due to crashing
3796:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3811:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3824:             // This could happen before phone restarts due to crashing
3872:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3890:      * available, which is possible between phone process starting and getting slot info from modem.
3897:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3916:     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
3939:     @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
3962:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)