Home | History | Annotate | Download | only in phone

Lines Matching defs:phone

17 package com.android.phone;
91 import com.android.internal.telephony.Phone;
109 import com.android.phone.vvm.PhoneAccountHandleConverter;
110 import com.android.phone.vvm.RemoteVvmTaskManager;
111 import com.android.phone.vvm.VisualVoicemailSettingsUtil;
112 import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
186 private Phone mPhone;
274 * A handler that processes messages on the main thread in the phone process. Since many
275 * of the Phone calls are not thread safe this is needed to shuttle the requests from the
276 * inbound binder threads to the main thread in the phone process. The Binder thread
297 final Phone phone = getPhoneFromRequest(request);
318 request.result = phone != null ?
319 phone.handleUssdRequest(ussdRequest, wrappedCallback)
333 final Phone phone = getPhoneFromRequest(request);
334 request.result = phone != null ?
376 Phone phone = getPhone(end_subId);
377 if (phone == null) {
378 if (DBG) log("CMD_END_CALL: no phone for id: " + end_subId);
381 int phoneType = phone.getPhoneType();
387 // GSM: End the call as per the Phone state
390 throw new IllegalStateException("Unexpected phone type: " + phoneType);
1043 /* package */ static PhoneInterfaceManager init(PhoneGlobals app, Phone phone) {
1046 phone);
1055 private PhoneInterfaceManager(PhoneGlobals app, Phone phone) {
1057 mPhone = phone;
1073 ServiceManager.addService("phone", this);
1076 private Phone getPhoneFromRequest(MainThreadRequest request) {
1082 Phone phone = getPhoneFromRequest(request);
1083 return phone == null ? null :
1084 UiccController.getInstance().getUiccCard(phone.getPhoneId());
1087 // returns phone associated with the subId.
1088 private Phone getPhone(int subId) {
1110 // PENDING: should we just silently fail if phone is offhook or ringing?
1128 // from the context of the phone app.
1193 * This should only be called from the main thread of the Phone app.
1247 final Phone phone = getPhone(subId);
1248 if (phone != null) {
1249 return (phone.getState() == PhoneConstants.State.OFFHOOK);
1266 final Phone phone = getPhone(subId);
1267 if (phone != null) {
1268 return (phone.getState() == PhoneConstants.State.RINGING);
1285 final Phone phone = getPhone(subId);
1286 if (phone != null) {
1287 return (phone.getState() == PhoneConstants.State.IDLE);
1443 final Phone phone = getPhone(subId);
1444 if (phone != null) {
1445 phone.updateServiceLocation();
1463 final Phone phone = getPhone(subId);
1464 if (phone != null) {
1465 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
1478 final Phone phone = getPhone(subId);
1479 if (phone != null) {
1480 phone.setRadioPower(!isRadioOnForSubscriber(subId));
1490 final Phone phone = getPhone(subId);
1491 if (phone == null) {
1494 if ((phone.getServiceState().getState() !=
1507 Phone phone = PhoneFactory.getPhone(i);
1508 if (phone != null && phone.isRadioAvailable()) return true;
1516 logv("Shutting down Phone " + i);
1523 Phone phone = PhoneFactory.getPhone(phoneId);
1524 if (phone != null && phone.isRadioAvailable()) {
1525 phone.shutdownRadio();
1531 final Phone defaultPhone = PhoneFactory.getDefaultPhone();
1536 loge("There's no default phone.");
1543 final Phone phone = getPhone(subId);
1544 if (phone != null) {
1545 phone.setRadioPower(turnOn);
1557 final Phone phone = getPhone(subId);
1558 if (phone != null) {
1559 phone.setDataEnabled(true);
1571 final Phone phone = getPhone(subId);
1572 if (phone != null) {
1573 phone.setDataEnabled(false);
1582 final Phone phone = getPhone(subId);
1583 if (phone != null) {
1584 return phone.isDataAllowed();
1616 Phone phone = PhoneFactory.getPhone(slotIndex);
1617 return phone == null ? TelephonyManager.CALL_STATE_IDLE :
1618 PhoneConstantConversions.convertCallState(phone.getState());
1623 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1624 if (phone != null) {
1625 return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
1633 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1634 if (phone != null) {
1635 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
1650 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1651 if (phone == null) {
1656 phone.getCellLocation(workSource).fillInNotifierBundle(data);
1687 final Phone phone = getPhone(subId);
1688 if (phone != null) {
1689 phone.enableLocationUpdates();
1702 final Phone phone = getPhone(subId);
1703 if (phone != null) {
1704 phone.disableLocationUpdates();
1747 for (Phone phone : PhoneFactory.getPhones()) {
1748 final List<CellInfo> info = phone.getAllCellInfo(workSource);
1766 Phone phone = PhoneFactory.getPhone(slotIndex);
1767 return phone == null ? null : phone.getImei();
1775 Phone phone = PhoneFactory.getPhone(slotIndex);
1776 return phone == null ? null : phone.getMeid();
1784 Phone phone = PhoneFactory.getPhone(slotIndex);
1785 return phone == null ? null : phone.getDeviceSvn();
1872 final Phone phone = PhoneFactory.getPhone(slotIndex);
1873 if (phone == null) {
1876 return phone.getPhoneType();
1893 final Phone phone = getPhone(subId);
1894 if (phone != null) {
1895 return phone.getCdmaEriIconIndex();
1916 final Phone phone = getPhone(subId);
1917 if (phone != null) {
1918 return phone.getCdmaEriIconMode();
1937 final Phone phone = getPhone(subId);
1938 if (phone != null) {
1939 return phone.getCdmaEriText();
1951 final Phone phone = getPhone(subId);
1952 if (mPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA && phone != null) {
1953 return phone.getLine1Number();
1965 final Phone phone = getPhone(subId);
1966 if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
1967 return phone.getCdmaMin();
2051 // Make the calls as the phone process.
2073 final Phone phone = getPhone(subId);
2074 if (phone != null) {
2075 phone.setVoiceActivationState(activationState);
2087 final Phone phone = getPhone(subId);
2088 if (phone != null) {
2089 phone.setDataActivationState(activationState);
2103 final Phone phone = getPhone(subId);
2104 if (phone != null) {
2105 return phone.getVoiceActivationState();
2119 final Phone phone = getPhone(subId);
2120 if (phone != null) {
2121 return phone.getDataActivationState();
2139 final Phone phone = getPhone(subId);
2140 if (phone != null) {
2141 return phone.getVoiceMessageCount();
2153 final Phone phone = getPhone(subId);
2154 return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
2180 final Phone phone = getPhone(getDefaultSubscription());
2181 if (phone != null) {
2182 return phone.getServiceState().getDataNetworkType();
2197 final Phone phone = getPhone(subId);
2198 if (phone != null) {
2199 return phone.getServiceState().getDataNetworkType();
2222 final Phone phone = getPhone(subId);
2223 if (phone != null) {
2224 return phone.getServiceState().getDataNetworkType();
2239 final Phone phone = getPhone(subId);
2240 if (phone != null) {
2241 return phone.getServiceState().getVoiceNetworkType();
2261 final Phone phone = PhoneFactory.getPhone(slotIndex);
2262 if (phone != null) {
2263 return phone.getIccCard().hasIccCard();
2275 * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
2276 * or {@link Phone#LTE_ON_CDMA_TRUE}
2289 final Phone phone = getPhone(subId);
2290 if (phone == null) {
2293 return phone.getLteOnCdmaMode();
2297 public void setPhone(Phone phone) {
2298 mPhone = phone;
2747 Phone phone = PhoneFactory.getPhone(phoneId);
2748 if (phone != null) {
2750 phone.setDataEnabled(enable);
2752 loge("setDataEnabled: no phone for subId=" + subId);
2773 Phone phone = PhoneFactory.getPhone(phoneId);
2774 if (phone != null) {
2775 boolean retVal = phone.getDataEnabled();
2779 if (DBG) loge("getDataEnabled: no phone subId=" + subId + " retVal=false");
2786 final Phone phone = getPhone(subId);
2787 if (phone == null) {
2791 UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
2797 phone.getContext().getPackageManager());
2882 final Phone phone = getPhone(subId);
2883 UiccCard card = phone == null ? null : phone.getUiccCard();
2902 final Phone phone = getPhone(subId);
2903 if (phone == null) {
2906 final String subscriberId = phone.getSubscriberId();
3053 final Phone phone = getPhone(subId);
3054 return phone == null ? false : phone.setOperatorBrandOverride(brand);
3062 final Phone phone = getPhone(subId);
3063 if (phone == null) {
3066 return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
3166 * Returns the unique device ID of phone, for example, the IMEI for
3178 final Phone phone = PhoneFactory.getPhone(0);
3179 if (phone != null) {
3180 return phone.getDeviceId();
3244 * Besides READ_PHONE_STATE, WRITE_SMS and READ_SMS also allow apps to get phone numbers.
3305 setPreferredNetworkType(subId, Phone.PREFERRED_NT_MODE);
3347 final Phone defaultPhone = getPhone(info.getSubscriptionId());
3423 final Phone phone = getPhone(subId);
3424 if (phone == null) {
3428 return phone.getServiceState();
3432 * Returns the URI for the per-account voicemail ringtone set in Phone settings.
3441 Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
3442 if (phone == null) {
3443 phone = mPhone;
3446 return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
3469 Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
3470 if (phone == null){
3471 phone = mPhone;
3473 VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
3477 * Returns whether vibration is set for voicemail notification in Phone settings.
3485 Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
3486 if (phone == null) {
3487 phone = mPhone;
3490 return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
3514 Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
3515 if (phone == null){
3516 phone = mPhone;
3518 VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
3522 * Make sure either called from same process as self (phone) or IPC caller has read privilege.
3532 * Make sure either called from same process as self (phone) or IPC caller has send SMS
3569 Phone phone = getPhone(subId);
3570 if (phone == null) {
3575 aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
3592 Phone phone = getPhone(subId);
3593 if (phone == null) {
3598 esn = phone.getEsn();
3614 Phone phone = getPhone(subId);
3615 if (phone == null) {
3620 cdmaPrlVersion = phone.getCdmaPrlVersion();
3682 final Phone phone = getPhone(subId);
3683 if (phone == null) {
3688 phone.carrierActionSetMeteredApnsEnabled(enabled);
3703 final Phone phone = getPhone(subId);
3704 if (phone == null) {
3709 phone.carrierActionSetRadioEnabled(enabled);
3727 final Phone phone = getPhone(subId);
3728 if (phone == null) {
3733 phone.carrierActionReportDefaultNetworkStatus(report);
3740 * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
3747 writer.println("Permission Denial: can't dump Phone from pid="
3772 Phone phone = getPhone(subId);
3773 if (phone != null) {
3774 return phone.getVtDataUsage(perUidStats);
3788 Phone phone = getPhone(subId);
3789 if (phone != null) {
3790 phone.setPolicyDataEnabled(enabled);
3805 Phone phone = getPhone(subId);
3806 if (phone != null) {
3807 return phone.getClientRequestStats();
3836 Phone phone = PhoneFactory.getPhone(slotIndex);
3838 if (phone != null) {
3839 phone.setSimPowerState(state);
3859 * Check if phone is in emergency callback mode
3860 * @return true if phone is in emergency callback mode
3864 final Phone phone = getPhone(subId);
3865 if (phone != null) {
3866 return phone.isInEcm();
3881 Phone p = getPhone(subId);