Found 23532 results in 3760 files, showing top 50 files (show more).
android.googlesource.com/platform/packages/services/Telephony:src/com/android/phone/PhoneInterfaceManager.java: [ master, ]
358:         public Phone phone;
17: package com.android.phone;
193: public class PhoneInterfaceManager extends ITelephony.Stub {
1392:     private PhoneInterfaceManager(PhoneGlobals app) {
1408:     private Phone getDefaultPhone() {
1439:     private Phone getPhone(int subId) {
2041:     public String getNetworkCountryIsoForPhone(int phoneId, String callingPackage,
5388:     public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
5411:     public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
5869:     public boolean isWorldPhone(int subId, String callingPackage, String callingFeatureId) {
288:     private PhoneConfigurationManager mPhoneConfigurationManager;
1419:     private Phone getPhoneFromRequest(MainThreadRequest request) {
1427:     private Phone getPhoneFromSubId(int subId) {
1820:     private void shutdownRadioUsingPhoneId(int phoneId) {
2493:     public int getActivePhoneType() {
2498:     public int getActivePhoneTypeForSlot(int slotIndex) {
3533:     private void checkModifyPhoneStatePermission(int subId, String message) {
4171:     private Phone getPhoneFromSlotIdOrThrowException(int slotIndex) {
5455:     public List<String> getPackagesWithCarrierPrivilegesForAllPhones() {
5995:     public int getSubIdForPhoneAccount(PhoneAccount phoneAccount) {
6005:     public int getSubIdForPhoneAccountHandle(
6020:     public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
21: import static com.android.internal.telephony.PhoneConstants.PHONE_TYPE_IMS;
138: import com.android.internal.telephony.Phone;
171: import com.android.phone.settings.PickSmsSubscriptionActivity;
172: import com.android.phone.vvm.PhoneAccountHandleConverter;
173: import com.android.phone.vvm.RemoteVvmTaskManager;
174: import com.android.phone.vvm.VisualVoicemailSettingsUtil;
175: import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
357:         // In cases where subId is unavailable, the caller needs to specify the phone.
366:         MainThreadRequest(Object argument, Phone phone, WorkSource workSource) {
368:             if (phone != null) {
369:                 this.phone = phone;
397:      * A handler that processes messages on the main thread in the phone process. Since many
398:      * of the Phone calls are not thread safe this is needed to shuttle the requests from the
399:      * inbound binder threads to the main thread in the phone process.  The Binder thread
416:             final Phone defaultPhone = getDefaultPhone();
421:                     final Phone phone = getPhoneFromRequest(request);
440:                         request.result = phone != null
441:                                 ? phone.handleUssdRequest(ussdRequest, wrappedCallback) : false;
452:                     final Phone phone = getPhoneFromRequest(request);
453:                     request.result = phone != null ?
1064:                     request.phone.requestCellInfoUpdate(request.workSource, onCompleted);
1078:                     request.phone.requestCellInfoUpdate(request.workSource,
1106:                     Phone phone = getPhoneFromRequest(request);
1107:                     phone.getCellIdentity(ws, obtainMessage(EVENT_GET_CELL_LOCATION_DONE, request));
1115:                         phone = getPhoneFromRequest(request);
1116:                         request.result = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
1138:                             .enablePhone(request.phone, enable, onCompleted);
1144:                     int phoneId = request.phone.getPhoneId();
1159:                             .getPhoneStatusFromModem(request.phone, onCompleted);
1164:                     int id = request.phone.getPhoneId();
1306:     private Object sendRequest(int command, Object argument, Phone phone, WorkSource workSource) {
1308:                 command, argument, SubscriptionManager.INVALID_SUBSCRIPTION_ID, phone, workSource);
1317:             int command, Object argument, Integer subId, Phone phone, WorkSource workSource) {
1323:         if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID && phone != null) {
1324:             throw new IllegalArgumentException("subId and phone cannot both be specified!");
1325:         } else if (phone != null) {
1326:             request = new MainThreadRequest(argument, phone, workSource);
1366:      * Same as {@link #sendRequestAsync(int,Object)} except it takes a Phone and WorkSource.
1370:             int command, Object argument, Phone phone, WorkSource workSource) {
1371:         MainThreadRequest request = new MainThreadRequest(argument, phone, workSource);
1409:         Phone thePhone = getPhone(getDefaultSubscription());
1416:         ServiceManager.addService("phone", this);
1420:         if (request.phone != null) {
1421:             return request.phone;
1433:         Phone phone = getPhoneFromRequest(request);
1434:         return phone == null ? null :
1435:                 UiccController.getInstance().getUiccCard(phone.getPhoneId());
1438:     // returns phone associated with the subId.
1443:     private void sendEraseModemConfig(Phone phone) {
1444:         if (phone != null) {
1446:                   mApp, phone.getSubId(), "eraseModemConfig");
1484:             // PENDING: should we just silently fail if phone is offhook or ringing?
1505:         // from the context of the phone app.
1508:         if (mAppOps.noteOp(AppOpsManager.OPSTR_CALL_PHONE, Binder.getCallingUid(), callingPackage)
1689:             final Phone phone = getPhone(subId);
1690:             if (phone != null) {
1691:                 phone.updateServiceLocation();
1735:             final Phone phone = getPhone(subId);
1736:             if (phone != null) {
1737:                 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
1755:             final Phone phone = getPhone(subId);
1756:             if (phone != null) {
1757:                 phone.setRadioPower(!isRadioOnForSubscriber(subId));
1773:             final Phone phone = getPhone(subId);
1774:             if (phone == null) {
1777:             if ((phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF) != turnOn) {
1795:                 Phone phone = PhoneFactory.getPhone(i);
1796:                 if (phone != null && phone.isRadioAvailable()) return true;
1812:                 logv("Shutting down Phone " + i);
1821:         Phone phone = PhoneFactory.getPhone(phoneId);
1822:         if (phone != null && phone.isRadioAvailable()) {
1823:             phone.shutdownRadio();
1832:             final Phone defaultPhone = PhoneFactory.getDefaultPhone();
1837:                 loge("There's no default phone.");
1850:             final Phone phone = getPhone(subId);
1851:             if (phone != null) {
1852:                 phone.setRadioPower(turnOn);
1870:             final Phone phone = getPhone(subId);
1871:             if (phone != null) {
1872:                 phone.getDataEnabledSettings().setUserDataEnabled(true);
1890:             final Phone phone = getPhone(subId);
1891:             if (phone != null) {
1892:                 phone.getDataEnabledSettings().setUserDataEnabled(false);
1906:             final Phone phone = getPhone(subId);
1907:             if (phone != null) {
1908:                 return phone.isDataAllowed(ApnSetting.TYPE_DEFAULT);
1957:             Phone phone = PhoneFactory.getPhone(slotIndex);
1958:             return phone == null ? TelephonyManager.CALL_STATE_IDLE :
1959:                     PhoneConstantConversions.convertCallState(phone.getState());
1974:             final Phone phone = getPhone(subId);
1975:             if (phone != null) {
1976:                 return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
1995:             final Phone phone = getPhone(subId);
1996:             if (phone != null) {
1997:                 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
2025:                 return (getDefaultPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA)
2055:             if (phoneId == SubscriptionManager.INVALID_PHONE_INDEX) {
2056:                 // Get default phone in this case.
2057:                 phoneId = SubscriptionManager.DEFAULT_PHONE_INDEX;
2067:             Phone phone = PhoneFactory.getPhone(phoneId);
2068:             if (phone != null) {
2069:                 ServiceStateTracker sst = phone.getServiceStateTracker();
2070:                 EmergencyNumberTracker emergencyNumberTracker = phone.getEmergencyNumberTracker();
2100:             final Phone phone = getPhone(subId);
2101:             if (phone != null) {
2102:                 phone.enableLocationUpdates();
2121:             final Phone phone = getPhone(subId);
2122:             if (phone != null) {
2123:                 phone.disableLocationUpdates();
2182:         for (Phone phone : PhoneFactory.getPhones()) {
2183:             List<CellInfo> info = phone.getAllCellInfo();
2222:             for (Phone phone : PhoneFactory.getPhones()) {
2224:                         CMD_GET_ALL_CELL_INFO, null, phone, workSource);
2275:         final Phone phone = getPhoneFromSubId(subId);
2276:         if (phone == null) throw new IllegalArgumentException("Invalid Subscription Id: " + subId);
2278:         sendRequestAsync(CMD_REQUEST_CELL_INFO_UPDATE, cb, phone, workSource);
2296:         Phone phone = PhoneFactory.getPhone(slotIndex);
2297:         if (phone == null) {
2300:         int subId = phone.getSubId();
2308:             return phone.getImei();
2316:         Phone phone = PhoneFactory.getPhone(slotIndex);
2318:         if (phone != null) {
2319:             String imei = phone.getImei();
2327:         Phone phone = PhoneFactory.getPhone(slotIndex);
2328:         if (phone == null) {
2332:         int subId = phone.getSubId();
2340:             return phone.getMeid();
2348:         Phone phone = PhoneFactory.getPhone(slotIndex);
2350:         if (phone != null) {
2351:             String meid = phone.getMeid();
2360:         Phone phone = PhoneFactory.getPhone(slotIndex);
2361:         if (phone == null) {
2364:         int subId = phone.getSubId();
2373:             return phone.getDeviceSvn();
2383:             final Phone phone = getPhone(subId);
2384:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
2394:             final Phone phone = getPhone(subId);
2395:             return phone == null ? null : phone.getCarrierName();
2405:             final Phone phone = getPhone(subId);
2406:             return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID
2407:                     : phone.getSpecificCarrierId();
2417:             final Phone phone = getPhone(subId);
2418:             return phone == null ? null : phone.getSpecificCarrierName();
2429:         final Phone phone = PhoneFactory.getPhone(slotIndex);
2430:         if (phone == null) {
2435:             return CarrierResolver.getCarrierIdFromMccMnc(phone.getContext(), mccmnc);
2446:      * Make sure the caller has the MODIFY_PHONE_STATE permission.
2451:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE, null);
2460:      * Make sure the caller has the CALL_PHONE permission.
2465:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.CALL_PHONE, null);
2501:             final Phone phone = PhoneFactory.getPhone(slotIndex);
2502:             if (phone == null) {
2503:                 return PhoneConstants.PHONE_TYPE_NONE;
2505:                 return phone.getPhoneType();
2532:             final Phone phone = getPhone(subId);
2533:             if (phone != null) {
2534:                 return phone.getCdmaEriIconIndex();
2565:             final Phone phone = getPhone(subId);
2566:             if (phone != null) {
2567:                 return phone.getCdmaEriIconMode();
2596:             final Phone phone = getPhone(subId);
2597:             if (phone != null) {
2598:                 return phone.getCdmaEriText();
2617:             final Phone phone = getPhone(subId);
2618:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2619:                 return phone.getLine1Number();
2621:                 loge("getCdmaMdn: no phone found. Invalid subId: " + subId);
2639:             final Phone phone = getPhone(subId);
2640:             if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2641:                 return phone.getCdmaMin();
2653:         if (mApp.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
2655:             throw new SecurityException("Caller must hold the MODIFY_PHONE_STATE permission");
2818:             final Phone phone = getPhone(subId);
2819:             if (phone != null) {
2820:                 phone.setVoiceActivationState(activationState);
2839:             final Phone phone = getPhone(subId);
2840:             if (phone != null) {
2841:                 phone.setDataActivationState(activationState);
2857:         final Phone phone = getPhone(subId);
2860:             if (phone != null) {
2861:                 return phone.getVoiceActivationState();
2877:         final Phone phone = getPhone(subId);
2880:             if (phone != null) {
2881:                 return phone.getDataActivationState();
2903:             final Phone phone = getPhone(subId);
2904:             if (phone != null) {
2905:                 return phone.getVoiceMessageCount();
2922:             final Phone phone = getPhone(subId);
2923:             return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
2936:         final Phone defaultPhone = getDefaultPhone();
2974:             for (Phone phone : PhoneFactory.getPhones()) {
2975:                 if (phone.isInEmergencySmsMode()) {
2986:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3013:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3051:             Phone phone = getPhone(subId);
3052:             if (phone == null) {
3057:             phone.getImsRegistrationState(regState -> {
3084:             Phone phone = getPhone(subId);
3085:             if (phone == null) {
3090:             phone.getImsRegistrationTech(regTech -> {
3109:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3135:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3186:             Phone phone = getPhone(subId);
3187:             if (phone == null) return false;
3188:             return phone.isImsCapabilityAvailable(capability, regTech);
3233:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3270:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3304:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3339:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3391:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3473:      * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
3540:         Phone phone = getPhone(subId);
3541:         if (phone == null) {
3542:             loge("phone instance null for subid " + subId);
3546:             if (!doesImsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
3550:             if (!doesRcsCapabilityRequireProvisioning(phone.getContext(), subId, capability)) {
3984:             final Phone phone = getPhone(subId);
3985:             if (phone != null) {
3986:                 return phone.getServiceState().getDataNetworkType();
4018:             final Phone phone = getPhone(subId);
4019:             if (phone != null) {
4020:                 return phone.getServiceState().getDataNetworkType();
4043:             final Phone phone = getPhone(subId);
4044:             if (phone != null) {
4045:                 return phone.getServiceState().getVoiceNetworkType();
4070:             final Phone phone = PhoneFactory.getPhone(slotIndex);
4071:             if (phone != null) {
4072:                 return phone.getIccCard().hasIccCard();
4087:      * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
4088:      * or {@link Phone#LTE_ON_CDMA_TRUE}
4107:             final Phone phone = getPhone(subId);
4108:             if (phone == null) {
4111:                 return phone.getLteOnCdmaMode();
4175:                     + " does not correspond to an active phone");
4206:     private IccOpenLogicalChannelResponse iccOpenLogicalChannelWithPermission(Phone phone,
4223:                     CMD_OPEN_CHANNEL, new Pair<String, Integer>(aid, p2), phone,
4248:     private boolean iccCloseLogicalChannelWithPermission(Phone phone, int channel) {
4254:             Boolean success = (Boolean) sendRequest(CMD_CLOSE_CHANNEL, channel, phone,
4291:     private String iccTransmitApduLogicalChannelWithPermission(Phone phone, int channel, int cla,
4300:                     new IccAPDUArgument(channel, cla, command, p1, p2, p3, data), phone,
4347:     private String iccTransmitApduBasicChannelWithPermission(Phone phone, String callingPackage,
4365:                     new IccAPDUArgument(0, cla, command, p1, p2, p3, data), phone,
4599:         Phone phone = PhoneFactory.getPhone(slotIndex);
4600:         if (phone != null) {
4602:                     mApp, phone.getSubId(), "resetModemConfig");
4625:         Phone phone = PhoneFactory.getPhone(slotIndex);
4626:         if (phone != null) {
4628:                     mApp, phone.getSubId(), "rebootModem");
4644:         final Phone defaultPhone = getDefaultPhone();
5079:         final Phone defaultPhone = getDefaultPhone();
5157:         final Phone phone = getPhone(subId);
5159:             if (phone != null) {
5160:                 return phone.hasMatchedTetherApnSetting();
5184:             Phone phone = PhoneFactory.getPhone(phoneId);
5185:             if (phone != null) {
5187:                 phone.getDataEnabledSettings().setUserDataEnabled(enable);
5189:                 loge("setUserDataEnabled: no phone found. Invalid subId=" + subId);
5217:      * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
5235:             Phone phone = PhoneFactory.getPhone(phoneId);
5236:             if (phone != null) {
5237:                 boolean retVal = phone.isUserDataEnabled();
5241:                 if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
5255:      * Accepts either ACCESS_NETWORK_STATE, MODIFY_PHONE_STATE or carrier privileges.
5273:             Phone phone = PhoneFactory.getPhone(phoneId);
5274:             if (phone != null) {
5275:                 boolean retVal = phone.getDataEnabledSettings().isDataEnabled();
5279:                 if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
5288:             Phone phone) {
5295:         PackageManager pkgMgr = phone.getContext().getPackageManager();
5300:             SubscriptionInfo subInfo = subController.getSubscriptionInfo(phone.getSubId());
5302:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5314:     private int getCarrierPrivilegeStatusFromCarrierConfigRules(int privilegeFromSim, Phone phone,
5323:             SubscriptionInfo subInfo = subController.getSubscriptionInfo(phone.getSubId());
5325:                     phone.getContext().getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
5335:         final Phone phone = getPhone(subId);
5336:         if (phone == null) {
5340:         UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
5348:                 phone.getContext().getPackageManager()), phone);
5354:         final Phone phone = getPhone(subId);
5355:         if (phone == null) {
5360:                 UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
5367:                         phone.getContext().getPackageManager(), uid), phone);
5472:         final Phone phone = getPhone(subId);
5473:         UiccCard card = phone == null ? null : phone.getUiccCard();
5495:             final Phone phone = getPhone(subId);
5496:             if (phone == null) {
5499:             final String subscriberId = phone.getSubscriberId();
5722:             final Phone phone = getPhone(subId);
5723:             return phone == null ? false : phone.setOperatorBrandOverride(brand);
5738:             final Phone phone = getPhone(subId);
5739:             if (phone == null) {
5742:             return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
5793:         Phone phone = PhoneFactory.getPhone(phoneId);
5795:         if (phone == null) {
5802:                             mApp, phone.getSubId(), "getRadioAccessFamily");
5812:         final Phone defaultPhone = getDefaultPhone();
5826:         final Phone defaultPhone = getDefaultPhone();
5880:                     .getBoolean(CarrierConfigManager.KEY_WORLD_PHONE_BOOL);
5911:         final Phone phone = getPhone(subscriptionId);
5912:         if (phone == null) {
5913:             loge("isRttSupported: no Phone found. Invalid subId:" + subscriptionId);
5920:                     phone.getContext().getResources().getBoolean(R.bool.config_support_rtt);
5953:      * Returns the unique device ID of phone, for example, the IMEI for
5957:      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
5961:         final Phone phone = PhoneFactory.getPhone(0);
5962:         if (phone == null) {
5965:         int subId = phone.getSubId();
5973:             return phone.getDeviceId();
5986:         Phone phone = getPhone(subId);
5987:         if (phone != null) {
5988:             return phone.isImsRegistered();
6009:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
6023:             Phone phone = getPhone(subscriptionId);
6024:             if (phone == null) {
6027:             return PhoneUtils.makePstnPhoneAccountHandle(phone);
6039:             Phone phone = getPhone(subId);
6040:             if (phone != null) {
6041:                 return phone.isWifiCallingEnabled();
6056:             Phone phone = getPhone(subId);
6057:             if (phone != null) {
6058:                 return phone.isVideoEnabled();
6074:             Phone phone = getPhone(subId);
6075:             if (phone != null) {
6076:                 return phone.getImsRegistrationTech();
6134:         final Phone phone = getPhone(subId);
6135:         if (phone == null) {
6142:                     phone.getContext().getOpPackageName(), null);
6151:             final Locale localeFromDefaultSim = phone.getLocaleFromSimAndCarrierPrefs();
6310:             final Phone phone = getPhone(subId);
6311:             if (phone == null) {
6315:             ServiceState ss = phone.getServiceState();
6328:      * Returns the URI for the per-account voicemail ringtone set in Phone settings.
6339:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6340:             if (phone == null) {
6341:                 phone = getDefaultPhone();
6344:             return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
6354:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6364:         final Phone defaultPhone = getDefaultPhone();
6375:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6376:             if (phone == null) {
6377:                 phone = defaultPhone;
6379:             VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
6386:      * Returns whether vibration is set for voicemail notification in Phone settings.
6396:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
6397:             if (phone == null) {
6398:                 phone = getDefaultPhone();
6401:             return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
6411:      * has permission {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
6421:         final Phone defaultPhone = getDefaultPhone();
6432:             Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
6433:             if (phone == null) {
6434:                 phone = defaultPhone;
6436:             VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
6443:      * Make sure either called from same process as self (phone) or IPC caller has read privilege.
6448:         mApp.enforceCallingOrSelfPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
6453:      * Make sure either called from same process as self (phone) or IPC caller has send SMS
6496:         Phone phone = getPhone(subId);
6500:             if (phone == null) {
6505:                 aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
6525:         Phone phone = getPhone(subId);
6529:             if (phone == null) {
6534:                 esn = phone.getEsn();
6553:         Phone phone = getPhone(subId);
6557:             if (phone == null) {
6562:                 cdmaPrlVersion = phone.getCdmaPrlVersion();
6656:         final Phone phone = getPhone(subId);
6659:         if (phone == null) {
6664:             phone.carrierActionSetMeteredApnsEnabled(enabled);
6681:         final Phone phone = getPhone(subId);
6684:         if (phone == null) {
6689:             phone.carrierActionSetRadioEnabled(enabled);
6709:         final Phone phone = getPhone(subId);
6712:         if (phone == null) {
6717:             phone.carrierActionReportDefaultNetworkStatus(report);
6733:         final Phone phone = getPhone(subId);
6734:         if (phone == null) {
6739:             phone.carrierActionResetAll();
6746:      * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
6753:             writer.println("Permission Denial: can't dump Phone from pid="
6788:             Phone phone = getPhone(subId);
6789:             if (phone != null) {
6790:                 return phone.getVtDataUsage(perUidStats);
6810:             Phone phone = getPhone(subId);
6811:             if (phone != null) {
6812:                 phone.getDataEnabledSettings().setPolicyDataEnabled(enabled);
6831:         Phone phone = getPhone(subId);
6835:             if (phone != null) {
6836:                 return phone.getClientRequestStats();
6863:         Phone phone = PhoneFactory.getPhone(slotIndex);
6869:             if (phone != null) {
6870:                 phone.setSimPowerState(state, workSource);
6892:      * Check if phone is in emergency callback mode
6893:      * @return true if phone is in emergency callback mode
6899:         final Phone phone = getPhone(subId);
6903:             if (phone != null) {
6904:                 return phone.isInEcm();
6924:             Phone p = getPhone(subId);
6944:         Phone phone = PhoneFactory.getPhone(slotIndex);
6945:         if (phone != null) {
6946:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, phone.getSubId(),
6953:                 return phone.getRadioPowerState();
6966:      * {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling app has carrier
6981:             Phone phone = getPhone(subId);
6982:             isEnabled =  phone != null ? phone.getDataRoamingEnabled() : false;
6997:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE} or that the calling app has carrier
7010:             Phone phone = getPhone(subId);
7011:             if (phone != null) {
7012:                 phone.setDataRoamingEnabled(isEnabled);
7028:             Phone phone = getPhone(subId);
7029:             if (phone != null) {
7030:                 isAllowed = phone.isCspPlmnEnabled();
7045:             // even without READ_PRIVILEGED_PHONE_STATE, we allow the call to continue if the caller
7181:         final Phone phone = getPhone(subId);
7182:         if (phone == null) {
7189:             phone.setRadioIndicationUpdateMode(filters, mode);
7199:      * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}.
7208:             Phone phone = getPhone(subId);
7209:             if (phone == null) {
7212:             UiccCard uiccCard = phone.getUiccCard();
7249:      * not set, return {@link Phone#PREFERRED_NT_MODE}.
7257:         return Phone.PREFERRED_NT_MODE;
7267:             final Phone phone = getPhone(subId);
7268:             if (phone == null) {
7272:             phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn,
7285:             final Phone phone = getPhone(subId);
7286:             if (phone == null) {
7290:             return phone.getCarrierIdListVersion();
7358:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7363:             for (Phone phone: PhoneFactory.getPhones()) {
7364:                 if (phone.getEmergencyNumberTracker() != null
7365:                         && phone.getEmergencyNumberTracker().getEmergencyNumberList() != null) {
7367:                             phone.getSubId(),
7368:                             phone.getEmergencyNumberTracker().getEmergencyNumberList());
7379:         final Phone defaultPhone = getDefaultPhone();
7387:             for (Phone phone: PhoneFactory.getPhones()) {
7388:                 if (phone.getEmergencyNumberTracker() != null
7389:                         && phone.getEmergencyNumberTracker() != null) {
7390:                     if (phone.getEmergencyNumberTracker().isEmergencyNumber(
7412:             for (Phone phone: PhoneFactory.getPhones()) {
7413:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7434:             for (Phone phone: PhoneFactory.getPhones()) {
7435:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7454:             final Phone phone = getPhone(subId);
7455:             if (phone == null) {
7459:             return phone.getEmergencyNumberDbVersion();
7471:             for (Phone phone: PhoneFactory.getPhones()) {
7472:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7488:             for (Phone phone: PhoneFactory.getPhones()) {
7489:                 EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker();
7502:         Phone phone = getPhone(subId);
7503:         if (phone == null) {
7509:                     .getUiccProfileForPhone(phone.getPhoneId());
7528:             Phone phone = PhoneFactory.getPhone(slotIndex);
7529:             if (phone == null) {
7532:                 return (Boolean) sendRequest(CMD_REQUEST_ENABLE_MODEM, enable, phone, null);
7545:         Phone phone = PhoneFactory.getPhone(slotIndex);
7546:         if (phone == null) return false;
7549:                 mApp, phone.getSubId(), callingPackage, callingFeatureId,
7551:             throw new SecurityException("Requires READ_PHONE_STATE permission.");
7557:                 return mPhoneConfigurationManager.getPhoneStatusFromCache(phone.getPhoneId());
7559:                 return (Boolean) sendRequest(CMD_GET_MODEM_STATUS, null, phone, null);
7627:      * Note: Switch from multi-sim to single-sim is only possible with MODIFY_PHONE_STATE
7628:      * permission, but the other way around is possible with either MODIFY_PHONE_STATE
7657:         Phone phone = getPhone(subId);
7658:         if (phone == null) {
7663:             UiccCard uiccCard = phone.getUiccCard();
7733:         Phone phone = getDefaultPhone();
7734:         if (phone == null) return -1;
7735:         HalVersion hv = phone.getHalVersion();
7756:         enforceReadPrivilegedPermission("Needs READ_PRIVILEGED_PHONE_STATE for "
7762:             Phone phone = getPhone(subId);
7763:             if (phone == null) return false;
7765:             boolean isMetered = ApnSettingUtils.isMeteredApnType(apnType, phone);
7766:             return !isMetered || phone.getDataEnabledSettings().isDataEnabled(apnType);
7779:             Phone phone = getPhone(subId);
7780:             if (phone == null) return true; // By default return true.
7782:             return ApnSettingUtils.isMeteredApnType(apnType, phone);
7847:             Phone phone = getPhone(subId);
7848:             if (phone == null) return false;
7850:             return phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(allow);
7863:             Phone phone = getPhone(subId);
7864:             if (phone == null) return false;
7866:             return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
7884:             for (Phone phone : PhoneFactory.getPhones()) {
7885:                 Phone defaultPhone = phone.getImsPhone();
7886:                 if (defaultPhone != null && defaultPhone.getPhoneType() == PHONE_TYPE_IMS) {
22: import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
64: import android.telecom.PhoneAccount;
65: import android.telecom.PhoneAccountHandle;
83: import android.telephony.PhoneCapability;
84: import android.telephony.PhoneNumberRange;
139: import com.android.internal.telephony.PhoneConfigurationManager;
140: import com.android.internal.telephony.PhoneConstantConversions;
141: import com.android.internal.telephony.PhoneConstants;
142: import com.android.internal.telephony.PhoneFactory;
155: import com.android.internal.telephony.imsphone.ImsPhone;
156: import com.android.internal.telephony.imsphone.ImsPhoneCallTracker;
194:     private static final String LOG_TAG = "PhoneInterfaceManager";
195:     private static final boolean DBG = (PhoneGlobals.DBG_LEVEL >= 2);
278:     private static PhoneInterfaceManager sInstance;
280:     private PhoneGlobals mApp;
671:                     defaultPhone.nvReadItem((Integer) request.argument, onCompleted,
698:                     defaultPhone.nvWriteItem(idValue.first, idValue.second, onCompleted,
709:                     defaultPhone.nvWriteCdmaPrl((byte[]) request.argument, onCompleted);
719:                     defaultPhone.resetModemConfig(onCompleted);
765:                     defaultPhone.invokeOemRilRequestRaw((byte[]) request.argument, onCompleted);
861:                     if (defaultPhone != null) {
862:                         defaultPhone.getModemActivityInfo(onCompleted, request.workSource);
893:                     defaultPhone.setAllowedCarriers(argument, onCompleted, request.workSource);
921:                     defaultPhone.getAllowedCarriers(onCompleted, request.workSource);
1127:                     defaultPhone.rebootModem(onCompleted);
1137:                     PhoneConfigurationManager.getInstance()
1147:                         mPhoneConfigurationManager.addToPhoneStatusCache(phoneId, msg.arg1 == 1);
1158:                     PhoneConfigurationManager.getInstance()
1229:                     defaultPhone.eraseModemConfig(onCompleted);
1377:      * Initialize the singleton PhoneInterfaceManager instance.
1378:      * This is only done once, at startup, from PhoneApp.onCreate().
1380:     /* package */ static PhoneInterfaceManager init(PhoneGlobals app) {
1381:         synchronized (PhoneInterfaceManager.class) {
1383:                 sInstance = new PhoneInterfaceManager(app);
1394:         mCM = PhoneGlobals.getInstance().mCM;
1395:         mImsResolver = PhoneGlobals.getInstance().getImsResolver();
1403:         mPhoneConfigurationManager = PhoneConfigurationManager.getInstance();
1410:         return (thePhone != null) ? thePhone : PhoneFactory.getDefaultPhone();
1429:                 ? getDefaultPhone() : getPhone(subId);
1440:         return PhoneFactory.getPhone(mSubscriptionController.getPhoneId(subId));
1458:         PackageManager pm = getDefaultPhone().getContext().getPackageManager();
1485:             PhoneConstants.State state = mCM.getState(subId);
1486:             if (state != PhoneConstants.State.OFFHOOK && state != PhoneConstants.State.RINGING) {
1545:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1550:         return (resultArray[0] == PhoneConstants.PIN_RESULT_SUCCESS) ? true : false;
1558:             final UnlockSim checkSimPin = new UnlockSim(getPhone(subId).getIccCard());
1571:             final UnlockSim checkSimPuk = new UnlockSim(getPhone(subId).getIccCard());
1588:         private int mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1618:                                             mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
1620:                                             mResult = PhoneConstants.PIN_GENERAL_FAILURE;
1623:                                         mResult = PhoneConstants.PIN_RESULT_SUCCESS;
1798:             logv(TelephonyManager.getDefault().getPhoneCount() + " Phones are shutdown.");
1833:             if (defaultPhone != null) {
1834:                 defaultPhone.setRadioPower(turnOn);
1978:                 return PhoneConstantConversions.convertDataState(
1979:                         PhoneConstants.DataState.DISCONNECTED);
2044:             final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
2046:                     callingFeatureId, "getNetworkCountryIsoForPhone")) {
2059:             final int subId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
2288:             getDefaultPhone().setCellInfoListRate(rateInMillis, workSource);
2481:         Log.d(LOG_TAG, "[PhoneIntfMgr] " + msg);
2485:         Log.v(LOG_TAG, "[PhoneIntfMgr] " + msg);
2489:         Log.e(LOG_TAG, "[PhoneIntfMgr] " + msg);
2651:     public void requestNumberVerification(PhoneNumberRange range, long timeoutMillis,
2680:             return getDefaultPhone().needsOtaServiceProvisioning();
2715:             PhoneAccountHandle phoneAccountHandle = PhoneAccountHandleConverter.fromSubId(subId);
2716:             if (phoneAccountHandle == null) {
2719:             return VisualVoicemailSettingsUtil.dump(mApp, phoneAccountHandle);
2803:         SmsController smsController = PhoneFactory.getSmsController();
2938:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
2947:             defaultPhone.sendDialerSpecialCode(inputCode);
3002:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3026:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3122:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3149:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone.
3165:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3241:         // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3259:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3279:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3294:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3313:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3329:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3348:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3364:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3380:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3400:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3416:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3431:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3447:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3463:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3482:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3501:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3519:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3564:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3594:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3627:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3686:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3855:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3880:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3906:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
3932:             // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
4102:             return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4109:                 return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
4172:         int phoneId = UiccController.getInstance().getPhoneIdFromSlotId(slotIndex);
4173:         if (phoneId == -1) {
4177:         return PhoneFactory.getPhone(phoneId);
4212:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4354:                 ComponentInfo bestComponent = EuiccConnector.findBestComponent(getDefaultPhone()
4645:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
4652:             return defaultPhone.getPcscfAddress(apnType);
4882:             getDefaultPhone().setImsRegistrationState(registered);
5019:                     request, messenger, binder, getPhone(subId),
5080:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
5088:             return PhoneFactory.calculatePreferredNetworkType(defaultPhone.getContext(), 0);
5182:             int phoneId = mSubscriptionController.getPhoneId(subId);
5183:             if (DBG) log("setUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5233:             int phoneId = mSubscriptionController.getPhoneId(subId);
5234:             if (DBG) log("isUserDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5271:             int phoneId = mSubscriptionController.getPhoneId(subId);
5272:             if (DBG) log("isDataEnabled: subId=" + subId + " phoneId=" + phoneId);
5376:         int phoneId = SubscriptionManager.getPhoneId(subId);
5377:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5384:             getPhone(phoneId), pkgName);
5401:                 getPhone(i), pkgName);
5412:         if (!SubscriptionManager.isValidPhoneId(phoneId)) {
5413:             loge("phoneId " + phoneId + " is not valid.");
5416:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5418:             loge("getCarrierPackageNamesForIntentAndPhone: No UICC");
5425:     public List<String> getPackagesWithCarrierPrivileges(int phoneId) {
5429:         UiccCard card = UiccController.getInstance().getUiccCard(phoneId);
5792:     public int getRadioAccessFamily(int phoneId, String callingPackage) {
5803:             raf = ProxyController.getInstance().getRadioAccessFamily(phoneId);
5817:             ImsManager.getInstance(defaultPhone.getContext(),
5818:                     defaultPhone.getPhoneId()).setVtSetting(enable);
5827:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, defaultPhone.getSubId(),
5839:                     ImsManager.getInstance(defaultPhone.getContext(), defaultPhone.getPhoneId());
5954:      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
5998:             return PhoneUtils.getSubIdForPhoneAccount(phoneAccount);
6006:             PhoneAccountHandle phoneAccountHandle, String callingPackage, String callingFeatureId) {
6013:             return PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle);
6107:             cleanUpSmsRawTable(getDefaultPhone().getContext());
6118:               sendEraseModemConfig(getDefaultPhone());
6330:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6333:      * PhoneAccount.
6336:     public Uri getVoicemailRingtoneUri(PhoneAccountHandle accountHandle) {
6356:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6359:      * PhoneAccount.
6363:             PhoneAccountHandle phoneAccountHandle, Uri uri) {
6366:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6369:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
6388:      * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
6390:      * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
6393:     public boolean isVoicemailVibrationEnabled(PhoneAccountHandle accountHandle) {
6413:      * @param phoneAccountHandle The handle for the {@link PhoneAccount} for which to set the
6416:      * specific PhoneAccount.
6420:             PhoneAccountHandle phoneAccountHandle, boolean enabled) {
6423:         TelecomManager tm = defaultPhone.getContext().getSystemService(TelecomManager.class);
6426:                     mApp, PhoneUtils.getSubIdForPhoneAccountHandle(phoneAccountHandle),
6767:         (new TelephonyShellCommand(this, getDefaultPhone().getContext()))
7047:             if (checkCarrierPrivilegesForPackageAnyPhone(callingPackage)
7253:         int phoneId = mSubscriptionController.getPhoneId(subId);
7254:         if (phoneId >= 0 && phoneId < list.size() && list.get(phoneId) != null) {
7255:             return list.get(phoneId);
7383:                             mApp, defaultPhone.getSubId(), "isEmergencyNumber(Potential)");
7584:                 getDefaultPhone().getSubId(), callingPackage, callingFeatureId,
7607:         PhoneCapability staticCapability =
7713:             int phoneCount = TelephonyManager.getDefault().getPhoneCount();
7715:             int[] logicalSlotsMapping = new int[phoneCount];
7801:         SmsPermissions permissions = new SmsPermissions(getDefaultPhone(), mApp,
7821:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
7833:             return SubscriptionManager.getResourcesForSubId(getDefaultPhone().getContext(), subId)
7887:                     ImsPhone imsPhone = (ImsPhone) defaultPhone;
7889:                             (ImsPhoneCallTracker) imsPhone.getCallTracker();
7891:                     Rlog.i(LOG_TAG, "setCepEnabled isCepEnabled=" + isCepEnabled + ", for imsPhone "
7892:                             + imsPhone.getMsisdn());
129: import com.android.internal.telephony.DefaultPhoneNotifier;
454:                             getPhoneFromRequest(request).handlePinMmi((String) request.argument)
729:                     getPhoneFromRequest(request).getPreferredNetworkType(onCompleted);
755:                     getPhoneFromRequest(request).setPreferredNetworkType(networkType, onCompleted);
779:                     getPhoneFromRequest(request).setVoiceMailNumber(tagNum.first, tagNum.second,
791:                     getPhoneFromRequest(request).setNetworkSelectionModeAutomatic(onCompleted);
801:                     getPhoneFromRequest(request).getAvailableNetworks(onCompleted);
841:                     getPhoneFromRequest(request).selectNetworkManually(selArg.operatorInfo,
1004:                     getPhoneFromRequest(request).getNetworkSelectionMode(onCompleted);
1025:                     getPhoneFromRequest(request).queryCdmaRoamingPreference(onCompleted);
1041:                     getPhoneFromRequest(request).setCdmaRoamingPreference(mode, onCompleted);
1053:                     getPhoneFromRequest(request).setCdmaSubscription(subscriptionMode, onCompleted);
1168:                         mPhoneConfigurationManager.addToPhoneStatusCache(id,
1423:             return getPhoneFromSubId(request.subId);
1719:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
1794:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
1811:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
1813:                 shutdownRadioUsingPhoneId(i);
2045:             if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
2365:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2494:         return getActivePhoneTypeForSlot(getSlotForDefaultSubscription());
2524:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2557:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2588:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2729:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2896:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
2956:                     .enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
2993:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3019:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3076:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3116:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3141:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3238:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3275:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3309:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3344:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3396:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3478:         //TODO: b/147498511 will add TelephonyPermissions#checkCallingOrSelfReadPrecisePhoneState
3560:         checkModifyPhoneStatePermission(subId, "setRcsProvisioningStatusForCapability");
3624:         checkModifyPhoneStatePermission(subId, "setImsProvisioningStatusForCapability");
3976:                 && !TelephonyPermissions.checkCallingOrSelfReadPhoneStateNoThrow(
4010:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4035:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4099:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4127:         return mSubscriptionController.getPhoneId(getDefaultSubscription());
4189:         return iccOpenLogicalChannelWithPermission(getPhoneFromSubId(subId), callingPackage, aid,
4202:         return iccOpenLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4237:         return iccCloseLogicalChannelWithPermission(getPhoneFromSubId(subId), channel);
4244:         return iccCloseLogicalChannelWithPermission(getPhoneFromSlotIdOrThrowException(slotIndex),
4273:         return iccTransmitApduLogicalChannelWithPermission(getPhoneFromSubId(subId), channel, cla,
4287:                 getPhoneFromSlotIdOrThrowException(slotIndex), channel, cla, command, p1, p2, p3,
4326:         return iccTransmitApduBasicChannelWithPermission(getPhoneFromSubId(subId), callingPackage,
4342:                 getPhoneFromSlotIdOrThrowException(slotIndex), callingPackage, cla, command, p1,
4427:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
4465:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, subId, callingPackage,
4825:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5103:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5392:         for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
5456:         enforceReadPrivilegedPermission("getPackagesWithCarrierPrivilegesForAllPhones");
5462:             for (int i = 0; i < TelephonyManager.getDefault().getPhoneCount(); i++) {
5542:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneNumber(
5569:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
5592:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
5801:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
5851:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
5870:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6007:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp, getDefaultSubscription(),
6008:                 callingPackage, callingFeatureId, "getSubIdForPhoneAccountHandle")) {
6274:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6827:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
6984:             TelephonyPermissions.enforeceCallingOrSelfReadPhoneStatePermissionOrCarrierPrivilege(
7022:                 .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7146:                         slot.getPhoneId(),
7299:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7307:             return mPhoneConfigurationManager.getNumberOfModemsWithSimultaneousDataConnections();
7355:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7382:                     .enforeceCallingOrSelfReadPrivilegedPhoneStatePermissionOrCarrierPrivilege(
7548:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7583:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(mApp,
7608:                 mPhoneConfigurationManager.getStaticPhoneCapability();
7648:             mPhoneConfigurationManager.switchMultiSimConfig(numOfSims);
7688:         if (!TelephonyPermissions.checkCallingOrSelfReadPhoneState(
7695:             return mPhoneConfigurationManager.isRebootRequiredForModemConfigChange();
7704:         metrics.updateEnabledModemBitmap((1 << TelephonyManager.from(mApp).getPhoneCount()) - 1);
7718:                 if (SubscriptionManager.isValidPhoneId(slotInfos[i].getLogicalSlotIdx())) {
7791:                 SubscriptionManager.getPhoneId(subId), UiccController.APP_FAM_3GPP);
7888:                     ImsPhoneCallTracker imsPhoneCallTracker =
7890:                     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, ]
114: public abstract class Phone extends Handler implements PhoneInternalInterface {
471:     protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
488:     protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci,
307:     protected Phone mImsPhone = null;
565:     public void createImsPhone() {
3407:     public Phone getImsPhone() {
4056:     public Phone getDefaultPhone() {
190:     protected static final int EVENT_UPDATE_PHONE_OBJECT            = 42;
277:     protected boolean mIsPhoneInEcmState = false;
304:     protected int mPhoneId;
411:     public String getPhoneName() {
415:     protected void setPhoneName(String name) {
1742:     public void updatePhoneObject(int voiceRadioTech) {
2527:     public abstract int getPhoneType();
3521:     public int getPhoneId() {
3529:     public int getVoicePhoneServiceState() {
104:  * A base implementation for the com.android.internal.telephony.Phone interface.
106:  * Note that implementations of Phone.java are expected to be used
115:     private static final String LOG_TAG = "Phone";
237:      * This method is invoked when the Phone exits Emergency Callback Mode.
275:     // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and
406:      * Returns a string identifier for this phone interface for parties
407:      *  outside the phone app process.
462:      * Constructs a Phone in normal (non-unit test) mode.
473:         this(name, notifier, context, ci, unitTestMode, SubscriptionManager.DEFAULT_PHONE_INDEX,
478:      * Constructs a Phone in normal (non-unit test) mode.
486:      * @param phoneId the phone-id of this phone.
514:         * (i.e. voice) phone calls over the telephony network, and is allowed
539:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
554:         if (getPhoneType() != PhoneConstants.PHONE_TYPE_SIP) {
566:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_SIP) {
570:         synchronized(Phone.lockForRadioTechnologyChange) {
633:         // messages to be handled whether or not the phone is being destroyed
635:         // resources of the phone being destroyed
755:         Phone imsPhone = mImsPhone;
794:      * Gets the context for the phone, as set at initialization time.
850:      * Subclasses of Phone probably want to replace this with a
876:      * Subclasses of Phone probably want to replace this with a
900:      * Subclasses of Phone probably want to replace this with a
912:      * Notify the phone that an SMS has been sent. This will be used determine if the SMS was sent
926:      * Determine if the Phone has recently sent an emergency SMS and is still in the interval of
967:     protected void migrateFrom(Phone from) {
980:         // The emergency state of IMS phone will be cleared in ImsPhone#notifySrvccState after
1038:      *   Connection.getCall() == Phone.getRingingCall()
1058:      * Notifies when phone's video capabilities changes <p>
1063:      *  AsyncResult.result = true if phone supports video calling <p>
1202:      * Example: If Phone.dial is called with "*#31#", then the app will
1514:      * For unit tests; don't send notifications to "Phone"
1531:      * Subclasses of Phone probably want to replace this with a
1636:         // no need for regular phone
1640:      * Subclasses of Phone probably want to replace this with a
1651:      * If this is a simulated phone interface, returns a SimulatedRadioControl.
1665:      * the thread that originally obtained this Phone instance.
1670:                     "com.android.internal.telephony.Phone must be used from within one thread");
1702:      * If the phone has an active call and call waiting occurs,
1703:      * then the phone state is RINGING not OFFHOOK
1712:      * Retrieves the IccFileHandler of the Phone instance
1731:      * Retrieves the Handler of the Phone instance
1738:      * Update the phone object if the voice radio technology has changed
1746:     * Retrieves the ServiceStateTracker of the phone instance.
1754:      * Retrieves the EmergencyNumberTracker of the phone instance.
1817:      * Returns the ICC card interface for this phone, or null
1823:         //throw new Exception("getIccCard Shouldn't be called from Phone");
1998:         if (getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2150:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
2151:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
2152:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
2153:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
2164:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF}
2165:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL}
2166:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO}
2167:      * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO}
2454:     // This property is used to handle phone process crashes, and is the same for CDMA and IMS
2461:      * @return {@code true} if we are in emergency call back mode. This is a period where the phone
2523:      * Return a numerical identifier for the phone radio interface.
2524:      * @return PHONE_TYPE_XXX as defined above.
2537:     /** sets the voice mail count of the phone and notifies listeners. */
3221:      * Subclasses of Phone probably want to replace this with a
3239:      * Notify registrants if phone is video capable.
3360:         Rlog.e(LOG_TAG, "Error! This function should never be executed, inactive Phone.");
3373:      * Gets the Uicc card corresponding to this phone.
3374:      * @return the UiccCard object corresponding to the phone ID.
3404:      * Return an instance of a IMS phone
3518:      * Returns the phone id.
3530:         Phone imsPhone = mImsPhone;
3604:         Phone imsPhone = mImsPhone;
3623:         Phone imsPhone = mImsPhone;
3637:         Phone imsPhone = mImsPhone;
3651:         Phone imsPhone = mImsPhone;
3661:      * @return the IMS MmTel Registration technology for this Phone, defined in
3665:         Phone imsPhone = mImsPhone;
3675:      * Get the IMS MmTel Registration technology for this Phone, defined in
3679:         Phone imsPhone = mImsPhone;
3688:      * Asynchronously get the IMS MmTel Registration state for this Phone.
3691:         Phone imsPhone = mImsPhone;
3749:      *  Set phone radio capability
3751:      *  @param rc the phone radio capability defined in
3760:      *  Get phone radio access family
3780:      *  Get phone radio capability
3794:      *  @param rc the phone radio capability currently in effect for this phone.
3827:      * Registers the handler when phone radio  capability is changed.
3838:      * Unregister for notifications when phone radio type and access technology is changed.
3873:      * Determines if video calling is enabled for the phone.
3879:         Phone imsPhone = mImsPhone;
4011:     public static void checkWfcWifiOnlyModeBeforeDial(Phone imsPhone, int phoneId, Context context)
4051:      * This function returns the parent phone of the current phone. It is applicable
4052:      * only for IMS phone (function is overridden by ImsPhone). For others the phone
4108:      * none of the phone is in service, and one of them has the capability to make the emergency
4115:         for (Phone phone : PhoneFactory.getPhones()) {
4116:             if (phone != null) {
4117:                 ServiceState ss = phone.getServiceStateTracker().getServiceState();
4118:                 // One of the phone is in service, hence the device is not emergency call only.
4171:         pw.println("Phone: subId=" + getSubId());
4328:         pw.println("Phone Local Log: ");
52: import android.telephony.PhoneStateListener;
79: import com.android.internal.telephony.imsphone.ImsPhoneCall;
108:  * originally called PhoneFactory to obtain the interface.
390:      * PhoneNotifier is an abstraction for all system-wide
395:     protected PhoneNotifier mNotifier;
420:      * Retrieves Nai for phones. Returns null if Nai is not set.
489:                     boolean unitTestMode, int phoneId,
491:         mPhoneId = phoneId;
528:          * By default old phones won't have the property set but do generate
562:      * Start setup of ImsPhone, which will start trying to connect to the ImsResolver. Will not be
571:             if (mImsPhone == null) {
572:                 mImsPhone = PhoneFactory.makeImsPhone(mNotifier, this);
573:                 CallManager.getInstance().registerPhone(mImsPhone);
574:                 mImsPhone.registerForSilentRedial(
649:                     PhoneConstants.State state = getState();
651:                             && ((state == PhoneConstants.State.RINGING) ||
652:                                     (state == PhoneConstants.State.IDLE))) {
663:                 if (getState() == PhoneConstants.State.RINGING) {
681:                         if (mImsPhone != null) {
683:                             mImsPhone.notifyRedialConnectionChanged(cn);
687:                         if (mImsPhone != null) {
688:                             mImsPhone.notifyRedialConnectionChanged(null);
762:                     if (imsPhone != null) {
763:                         conn = imsPhone.getHandoverConnection();
764:                         migrateFrom(imsPhone);
766:                         Rlog.d(LOG_TAG, "HANDOVER_STARTED: mImsPhone null");
771:                     if (imsPhone != null) {
772:                         imsPhone.notifySrvccState(srvccState);
774:                         Rlog.d(LOG_TAG, "HANDOVER_COMPLETED: mImsPhone null");
827:      * {@link PhoneConstants.State} which can be obtained using the {@link PhoneStateListener}
992:             // Since CallManager has already registered with both CS and IMS phones,
1709:     public abstract PhoneConstants.State getState();
1893:      * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged
1894:      * PhoneStateListener.onCellInfoChanged} will be invoked.
1909:      * available on this interface. Use PhoneStateNotifier or similar instead.
1993:      * available on this interface. Use PhoneStateNotifier or similar instead.
2035:      * interface. Use <code>PhoneStateNotifier</code> or an equivalent.
2379:     public PhoneConstants.DataState getDataConnectionState(String apnType) {
2380:         return PhoneConstants.DataState.DISCONNECTED;
2455:     // phones
2513:         if (mImsPhone != null) {
2514:             isPresent = isVideoCallOrConference(mImsPhone.getForegroundCall()) ||
2515:                     isVideoCallOrConference(mImsPhone.getBackgroundCall()) ||
2516:                     isVideoCallOrConference(mImsPhone.getRingingCall());
2660:      * Retrieves the MIN for CDMA phones.
2676:      *  Retrieves PRL Version for CDMA phones
3304:      * Retrieves the MSISDN from the UICC. For GSM/UMTS phones, this is equivalent to
3305:      * {@link #getLine1Number()}. For CDMA phones, {@link #getLine1Number()} returns
3306:      * the MDN, so this method is provided to return the MSISDN on CDMA/LTE phones.
3314:      * Retrieves the EF_PNN from the UICC For GSM/UMTS phones.
3323:      * {@link android.telephony.PhoneStateListener} instead.
3326:     public PhoneConstants.DataState getDataConnectionState() {
3327:         return getDataConnectionState(PhoneConstants.APN_TYPE_DEFAULT);
3344:      * @return {@link PhoneConstants#LTE_ON_CDMA_UNKNOWN}, {@link PhoneConstants#LTE_ON_CDMA_FALSE}
3345:      * or {@link PhoneConstants#LTE_ON_CDMA_TRUE}
3359:         // This function should be overridden by class GsmCdmaPhone.
3408:         return mImsPhone;
3474:      * Return if UT capability of ImsPhone is enabled or not
3478:         if (mImsPhone != null) {
3479:             return mImsPhone.isUtEnabled();
3498:         // dialInternal shall be overriden by GsmCdmaPhone
3526:      * Return the service state of mImsPhone if it is STATE_IN_SERVICE
3531:         if (imsPhone != null
3532:                 && imsPhone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
3606:         if (imsPhone != null) {
3607:             isImsRegistered = imsPhone.isImsRegistered();
3625:         if (imsPhone != null) {
3626:             isWifiCallingEnabled = imsPhone.isWifiCallingEnabled();
3639:         if (imsPhone != null) {
3640:             isAvailable = imsPhone.isImsCapabilityAvailable(capability, regTech);
3653:         if (imsPhone != null) {
3654:             isVolteEnabled = imsPhone.isVolteEnabled();
3667:         if (imsPhone != null) {
3668:             regTech = imsPhone.getImsRegistrationTech();
3680:         if (imsPhone != null) {
3681:             imsPhone.getImsRegistrationTech(callback);
3692:         if (imsPhone != null) {
3693:             imsPhone.getImsRegistrationState(callback);
3810:         int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
3821:             int type = PhoneFactory.calculatePreferredNetworkType(mContext, getSubId());
3865:         if (mImsPhone == null) {
3869:         return mImsPhone.isImsAvailable();
3880:         if (imsPhone != null) {
3881:             return imsPhone.isVideoEnabled();
4013:         if (imsPhone == null || !imsPhone.isWifiCallingEnabled()) {
4014:             ImsManager imsManager = ImsManager.getInstance(context, phoneId);
4068:         if (mImsPhone == null) return null;
4069:         return mImsPhone.getVtDataUsage(perUidStats);
4209:         if (mImsPhone != null) {
4211:                 mImsPhone.dump(fd, pw, args);
391:      * state change notification. DefaultPhoneNotifier is
464:      * @param notifier An instance of DefaultPhoneNotifier,
480:      * @param notifier An instance of DefaultPhoneNotifier,
2341:         // This function is added to send the notification to DefaultPhoneNotifier.
2466:         return mIsPhoneInEcmState;
2473:         mIsPhoneInEcmState = isInEcm;
2499:         if (call instanceof ImsPhoneCall) {
2500:             ImsPhoneCall imsPhoneCall = (ImsPhoneCall) call;
2501:             ImsCall imsCall = imsPhoneCall.getImsCall();
2555:                 mPhoneId, UiccController.APP_FAM_3GPP);
3280:      * A fucntion of type getPhoneProp(propType) where propType is an
3378:         return mUiccController.getUiccCard(mPhoneId);
3514:         return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
3522:         return mPhoneId;
3852:         ImsManager imsManager = ImsManager.getInstance(mContext, mPhoneId);
4172:         pw.println(" mPhoneId=" + mPhoneId);
4199:         pw.println(" getPhoneName()=" + getPhoneName());
4200:         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/superproject:frameworks/base/cmds/statsd/src/atoms.proto: [ master, ]
5072:         PHONE = 9;
2311:         HARDWARE_FAILED_MICROPHONE = 1;
2481: message PhoneSignalStrengthChanged {
2493: message PhoneServiceStateChanged {
2505: message PhoneStateChanged {
116:         PhoneSignalStrengthChanged phone_signal_strength_changed = 40;
170:         PhoneServiceStateChanged phone_service_state_changed = 94;
171:         PhoneStateChanged phone_state_changed = 95;
1259:  *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
1264:         // The keyguard is hidden when the phone is unlocked.
1266:         // The keyguard is shown when the phone is locked (screen turns off).
1280:  *   frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
2476:  * Logs phone signal strength changes.
2488:  * Logs when the phone state, sim state or signal strength changes
2500:  * Logs when the phone becomes on or off.
3037:  *      frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java
1427:     // For multi-sim phones, this distinguishes between the sim cards.
1449:     // For multi-sim phones, this distinguishes between the sim cards.
4867:  * time_in_state files not being present on some phones, have not been addressed. These should be
6080:  * Track how we arbitrate between microphone/input requests.
6095:  * Track how we arbitrate between microphone requests.
6110:  * Track how we arbitrate between microphone/input requests.
6125:  * Track how we arbitrate between microphone/input requests.
android.googlesource.com/platform/frameworks/base:cmds/statsd/src/atoms.proto: [ master, ] Duplicate result
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/external/valgrind:include/vki/vki-linux.h: [ master, ]
1643:   char phone[VKI_ISDN_MSNLEN];
1645: } vki_isdn_net_ioctl_phone;
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:frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java: [ master, ]
17: package com.android.systemui.statusbar.phone;
3540:     public void onPhoneHintStarted() {
37: import static com.android.systemui.statusbar.phone.BarTransitions.MODE_LIGHTS_OUT;
38: import static com.android.systemui.statusbar.phone.BarTransitions.MODE_LIGHTS_OUT_TRANSPARENT;
39: import static com.android.systemui.statusbar.phone.BarTransitions.MODE_OPAQUE;
40: import static com.android.systemui.statusbar.phone.BarTransitions.MODE_SEMI_TRANSPARENT;
41: import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSLUCENT;
42: import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARENT;
43: import static com.android.systemui.statusbar.phone.BarTransitions.MODE_WARNING;
44: import static com.android.systemui.statusbar.phone.BarTransitions.TransitionMode;
213: import com.android.systemui.statusbar.phone.UnlockMethodCache.OnUnlockMethodChangedListener;
3542:         mKeyguardIndicationController.showTransientIndication(R.string.phone_hint);
264:     // Should match the values in PhoneWindowManager
340:     private PhoneStatusBarPolicy mIconPolicy;
357:     protected PhoneStatusBarView mStatusBarView;
380:     protected HeadsUpManagerPhone mHeadsUpManager;
774:         mIconPolicy = new PhoneStatusBarPolicy(mContext, mIconController);
841:                     PhoneStatusBarView oldStatusBarView = mStatusBarView;
842:                     mStatusBarView = (PhoneStatusBarView) fragment.getView();
847:                     // CollapsedStatusBarFragment re-inflated PhoneStatusBarView and both of
849:                     // PhoneStatusBarView's new instance will set to be gone in
852:                     // it needs to notify PhoneStatusBarView's new instance to update the correct
2447:     // called by makeStatusbar and also by PhoneStatusBarView
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/libxkbcommon:xkbcommon/xkbcommon/xkbcommon-keysyms.h: [ master, ]
2596: #define XKB_KEY_XF86Phone		0x1008FF6E   /* Launch phone; dial number   */
1488: #define XKB_KEY_telephone                     0x0af9  /* U+260E BLACK TELEPHONE */
1489: #define XKB_KEY_telephonerecorder             0x0afa  /* U+2315 TELEPHONE RECORDER */
android.googlesource.com/platform/tools/acloud:internal/constants.py: [ master, ]
61: FLAVOR_PHONE = "phone"
21:     "aosp_phone": "aosp_cf_x86_phone-userdebug",
69:     FLAVOR_PHONE, FLAVOR_AUTO, FLAVOR_WEAR, FLAVOR_TV, FLAVOR_IOT,
108: # For gce_x86_phones remote instances
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, ]
174:     public static final String PHONE_PROCESS_NAME = "com.android.phone";
1943:     public static final int PHONE_TYPE_NONE = PhoneConstants.PHONE_TYPE_NONE;
1945:     public static final int PHONE_TYPE_GSM = PhoneConstants.PHONE_TYPE_GSM;
1947:     public static final int PHONE_TYPE_CDMA = PhoneConstants.PHONE_TYPE_CDMA;
1949:     public static final int PHONE_TYPE_SIP = PhoneConstants.PHONE_TYPE_SIP;
1951:     public static final int PHONE_TYPE_IMS = PhoneConstants.PHONE_TYPE_IMS;
1959:     public static final int PHONE_TYPE_THIRD_PARTY = PhoneConstants.PHONE_TYPE_THIRD_PARTY;
2284:     public String getNetworkOperatorForPhone(int phoneId) {
3358:     public String getSimOperatorNumericForPhone(int phoneId) {
3395:     public String getSimOperatorNameForPhone(int phoneId) {
3427:     public String getSimCountryIsoForPhone(int phoneId) {
7919:     public int checkCarrierPrivilegesForPackageAnyPhone(String pkgName) {
7941:     public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) {
8822:     public boolean isWorldPhone() {
9026:     public void setSimOperatorNumericForPhone(int phoneId, String numeric) {
9050:     public void setSimOperatorNameForPhone(int phoneId, String name) {
9074:     public void setSimCountryIsoForPhone(int phoneId, String iso) {
9098:     public void setSimStateForPhone(int phoneId, String state) {
9209:     public void setBasebandVersionForPhone(int phoneId, String version) {
9250:     public String getBasebandVersionForPhone(int phoneId) {
9310:     public String getOtaSpNumberSchemaForPhone(int phoneId, String defaultValue) {
9341:     public boolean getSmsReceiveCapableForPhone(int phoneId, boolean defaultValue) {
9371:     public boolean getSmsSendCapableForPhone(int phoneId, boolean defaultValue) {
9411:     public void setNetworkOperatorNameForPhone(int phoneId, String name) {
9436:     public void setNetworkOperatorNumericForPhone(int phoneId, String numeric) {
9461:     public void setNetworkRoamingForPhone(int phoneId, boolean isRoaming) {
9490:     public void setDataNetworkTypeForPhone(int phoneId, int type) {
560:     public static final String ACTION_PHONE_STATE_CHANGED =
810:     public static final String EXTRA_PHONE_ACCOUNT_HANDLE =
421:     public int getPhoneCount() {
512:     public TelephonyManager createForPhoneAccountHandle(PhoneAccountHandle phoneAccountHandle) {
1973:     public int getCurrentPhoneType() {
1988:     public int getCurrentPhoneType(int subId) {
2006:     public int getCurrentPhoneTypeForSlot(int slotIndex) {
2035:     public int getPhoneType() {
2042:     private int getPhoneTypeFromProperty() {
2048:     private int getPhoneTypeFromProperty(int phoneId) {
2055:     private int getPhoneTypeFromNetworkType() {
2060:     private int getPhoneTypeFromNetworkType(int phoneId) {
2081:     public static int getPhoneType(int networkMode) {
6399:     private int getPhoneId() {
6414:     private int getPhoneId(int preferredSubId) {
9265:     public void setPhoneType(int type) {
9279:     public void setPhoneType(int phoneId, int type) {
9504:     public int getSubIdForPhoneAccount(@Nullable PhoneAccount phoneAccount) {
9525:     public @Nullable PhoneAccountHandle getPhoneAccountHandleForSubscriptionId(int subscriptionId) {
170:      * The process name of the Phone app as well as many other apps that use this process name, such
506:      * phone account.
508:      * @return a TelephonyManager that uses the given phone account for all calls, or {@code null}
509:      * if the phone account does not correspond to a valid subscription ID.
537:      * extra {@link #EXTRA_INCOMING_NUMBER} provides the phone number for incoming and outgoing
542:      * {@link android.Manifest.permission#READ_PHONE_STATE} permission, it will receive the
543:      * broadcast twice; one with the {@link #EXTRA_INCOMING_NUMBER} populated with the phone number,
559:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
561:             "android.intent.action.PHONE_STATE";
564:      * The Phone app sends this intent when a user opts to respond-via-message during an incoming
571:      * same way: the path part of the URI contains the recipient's phone number or a comma-separated
572:      * set of phone numbers if there are multiple recipients. For example, {@code
586:      * &lt;!-- Service that delivers SMS messages received from the phone "quick response" -->
636:      * The {@link #EXTRA_PHONE_ACCOUNT_HANDLE} extra indicates which {@link PhoneAccountHandle} to
641:      * @see #EXTRA_PHONE_ACCOUNT_HANDLE
666:      * The lookup key used with the {@link #ACTION_PHONE_STATE_CHANGED} broadcast
698:      * Extra key used with the {@link #ACTION_PHONE_STATE_CHANGED} broadcast
699:      * for a String containing the incoming or outgoing phone number.
701:      * This extra is only populated for receivers of the {@link #ACTION_PHONE_STATE_CHANGED}
703:      * {@link android.Manifest.permission#READ_PHONE_STATE} permissions.
705:      * For incoming calls, the phone number is only guaranteed to be populated when the
709:      * For outgoing calls, the phone number is only guaranteed to be populated when the
717:      * to retrieve the phone number for calls instead.  Apps performing call screening should use
731:      * Requires the READ_PRECISE_PHONE_STATE permission.
779:      * The {@link #EXTRA_PHONE_ACCOUNT_HANDLE} extra indicates which {@link PhoneAccountHandle} the
793:      * @see #EXTRA_PHONE_ACCOUNT_HANDLE
811:             "android.telephony.extra.PHONE_ACCOUNT_HANDLE";
1231:      * The phone id where the data stall recovery is attempted.
1234:      * Requires the READ_PHONE_STATE permission.
1245:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
1299:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1447:      * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}.
1449:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
1460:      * Requires Permission: READ_PRIVILEGED_PHONE_STATE.
1467:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1487:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
1488:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
1499:      *     READ_PHONE_STATE permission then null is returned.</li>
1501:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1510:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1529:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
1530:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
1541:      *     READ_PHONE_STATE permission then null is returned.</li>
1543:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1554:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1578:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1589:      *     <li>The caller holds the READ_PRIVILEGED_PHONE_STATE permission.</li>
1591:      *     {@link Manifest.permission#READ_PHONE_STATE} permission.</li>
1605:      *     READ_PHONE_STATE permission then null is returned.</li>
1607:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1614:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1660:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
1661:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
1672:      *     READ_PHONE_STATE permission then null is returned.</li>
1674:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1679:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1687:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
1688:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
1699:      *     READ_PHONE_STATE permission then null is returned.</li>
1701:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1708:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1759:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
1760:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
1768:      *     READ_PHONE_STATE permission then null is returned.</li>
1770:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1775:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
1783:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
1784:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier
1792:      *     READ_PHONE_STATE permission then null is returned.</li>
1794:      *     the READ_PHONE_STATE permission, or if the calling app is targeting API level 29 or
1854:                         + " phone type doesn't match CellLocation type");
1942:     /** No phone radio. */
1944:     /** Phone radio is GSM. */
1946:     /** Phone radio is CDMA. */
1948:     /** Phone is via SIP. */
1950:     /** Phone is via IMS. */
1954:      * Phone is via Third Party.
1962:      * Returns the current phone type.
1965:      * @see #PHONE_TYPE_NONE
1966:      * @see #PHONE_TYPE_GSM
1967:      * @see #PHONE_TYPE_CDMA
1968:      * @see #PHONE_TYPE_SIP
1978:      * Returns a constant indicating the device phone type for a subscription.
1980:      * @see #PHONE_TYPE_NONE
1981:      * @see #PHONE_TYPE_GSM
1982:      * @see #PHONE_TYPE_CDMA
1984:      * @param subId for which phone type is returned
1992:             // still may want to know what type of phone we've got.
2027:      * Returns a constant indicating the device phone type.  This
2030:      * @see #PHONE_TYPE_NONE
2031:      * @see #PHONE_TYPE_GSM
2032:      * @see #PHONE_TYPE_CDMA
2033:      * @see #PHONE_TYPE_SIP
2037:             return PHONE_TYPE_NONE;
2050:                 phoneId, TelephonyProperties.current_active_phone(), null);
2061:         // When the system property CURRENT_ACTIVE_PHONE, has not been set,
2068:         return TelephonyManager.PHONE_TYPE_NONE;
2072:      * This function returns the type of the phone, depending
2076:      * @return Phone Type
2086:             return PhoneConstants.PHONE_TYPE_CDMA;
2104:             return PhoneConstants.PHONE_TYPE_GSM;
2106:         // Use CDMA Phone for the global mode including CDMA
2110:             return PhoneConstants.PHONE_TYPE_CDMA;
2114:                 return PhoneConstants.PHONE_TYPE_CDMA;
2116:                 return PhoneConstants.PHONE_TYPE_GSM;
2119:             return PhoneConstants.PHONE_TYPE_GSM;
2311:      * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
2320:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2403:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
2507:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2539:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2555:             // This could happen before phone restarts due to crashing
2567:      * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
2591:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2604:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2620:             // This could happen before phone restarts due to crashing
2628:      * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
2632:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2641:     @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
2657:             // This could happen before phone restarts due to crashing
2938:      * <p class="note">Requires the READ_PRIVILEGED_PHONE_STATE permission.
2973:      * <p class="note">Requires the READ_PRIVILEGED_PHONE_STATE permission.
2989:      * <p class="note">Requires the READ_PRIVILEGED_PHONE_STATE permission.
3047:             // This could happen before phone restarts due to crashing
3127:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3200:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3233:      * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
3240:     @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
3435:      * <p>Requires Permission: READ_PRIVILEGED_PHONE_STATE, for the calling app to be the device or
3436:      * profile owner and have the READ_PHONE_STATE permission, or that the calling app has carrier