Lines Matching refs:Phone
17 package com.android.phone;
102 import com.android.internal.telephony.Phone;
123 import com.android.phone.vvm.PhoneAccountHandleConverter;
124 import com.android.phone.vvm.RemoteVvmTaskManager;
125 import com.android.phone.vvm.VisualVoicemailSettingsUtil;
126 import com.android.phone.vvm.VisualVoicemailSmsFilterConfig;
212 private Phone mPhone;
300 * A handler that processes messages on the main thread in the phone process. Since many
301 * of the Phone calls are not thread safe this is needed to shuttle the requests from the
302 * inbound binder threads to the main thread in the phone process. The Binder thread
323 final Phone phone = getPhoneFromRequest(request);
344 request.result = phone != null ?
345 phone.handleUssdRequest(ussdRequest, wrappedCallback)
359 final Phone phone = getPhoneFromRequest(request);
360 request.result = phone != null ?
402 Phone phone = getPhone(end_subId);
403 if (phone == null) {
404 if (DBG) log("CMD_END_CALL: no phone for id: " + end_subId);
407 int phoneType = phone.getPhoneType();
413 // GSM: End the call as per the Phone state
416 throw new IllegalStateException("Unexpected phone type: " + phoneType);
1085 /* package */ static PhoneInterfaceManager init(PhoneGlobals app, Phone phone) {
1088 sInstance = new PhoneInterfaceManager(app, phone);
1097 private PhoneInterfaceManager(PhoneGlobals app, Phone phone) {
1099 mPhone = phone;
1115 ServiceManager.addService("phone", this);
1118 private Phone getPhoneFromRequest(MainThreadRequest request) {
1124 Phone phone = getPhoneFromRequest(request);
1125 return phone == null ? null :
1126 UiccController.getInstance().getUiccCard(phone.getPhoneId());
1129 // returns phone associated with the subId.
1130 private Phone getPhone(int subId) {
1152 // PENDING: should we just silently fail if phone is offhook or ringing?
1170 // from the context of the phone app.
1218 Log.i(LOG_TAG, "endCall: called without modify phone state.");
1240 * This should only be called from the main thread of the Phone app.
1295 final Phone phone = getPhone(subId);
1296 if (phone != null) {
1297 return (phone.getState() == PhoneConstants.State.OFFHOOK);
1315 final Phone phone = getPhone(subId);
1316 if (phone != null) {
1317 return (phone.getState() == PhoneConstants.State.RINGING);
1335 final Phone phone = getPhone(subId);
1336 if (phone != null) {
1337 return (phone.getState() == PhoneConstants.State.IDLE);
1493 final Phone phone = getPhone(subId);
1494 if (phone != null) {
1495 phone.updateServiceLocation();
1514 final Phone phone = getPhone(subId);
1515 if (phone != null) {
1516 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
1529 final Phone phone = getPhone(subId);
1530 if (phone != null) {
1531 phone.setRadioPower(!isRadioOnForSubscriber(subId));
1541 final Phone phone = getPhone(subId);
1542 if (phone == null) {
1545 if ((phone.getServiceState().getState() !=
1558 Phone phone = PhoneFactory.getPhone(i);
1559 if (phone != null && phone.isRadioAvailable()) return true;
1567 logv("Shutting down Phone " + i);
1574 Phone phone = PhoneFactory.getPhone(phoneId);
1575 if (phone != null && phone.isRadioAvailable()) {
1576 phone.shutdownRadio();
1582 final Phone defaultPhone = PhoneFactory.getDefaultPhone();
1587 loge("There's no default phone.");
1594 final Phone phone = getPhone(subId);
1595 if (phone != null) {
1596 phone.setRadioPower(turnOn);
1608 final Phone phone = getPhone(subId);
1609 if (phone != null) {
1610 phone.setUserDataEnabled(true);
1622 final Phone phone = getPhone(subId);
1623 if (phone != null) {
1624 phone.setUserDataEnabled(false);
1633 final Phone phone = getPhone(subId);
1634 if (phone != null) {
1635 return phone.isDataAllowed();
1667 Phone phone = PhoneFactory.getPhone(slotIndex);
1668 return phone == null ? TelephonyManager.CALL_STATE_IDLE :
1669 PhoneConstantConversions.convertCallState(phone.getState());
1674 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1675 if (phone != null) {
1676 return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
1684 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1685 if (phone != null) {
1686 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
1703 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1704 if (phone == null) {
1709 phone.getCellLocation(workSource).fillInNotifierBundle(data);
1730 Phone phone = PhoneFactory.getPhone(phoneId);
1731 if (phone != null) {
1732 ServiceStateTracker sst = phone.getServiceStateTracker();
1752 final Phone phone = getPhone(subId);
1753 if (phone != null) {
1754 phone.enableLocationUpdates();
1767 final Phone phone = getPhone(subId);
1768 if (phone != null) {
1769 phone.disableLocationUpdates();
1816 for (Phone phone : PhoneFactory.getPhones()) {
1817 final List<CellInfo> info = phone.getAllCellInfo(workSource);
1832 Phone phone = PhoneFactory.getPhone(slotIndex);
1833 if (phone == null) {
1836 int subId = phone.getSubId();
1841 return phone.getImei();
1846 Phone phone = PhoneFactory.getPhone(slotIndex);
1847 if (phone == null) {
1850 int subId = phone.getSubId();
1855 return phone.getMeid();
1860 Phone phone = PhoneFactory.getPhone(slotIndex);
1861 if (phone == null) {
1864 int subId = phone.getSubId();
1869 return phone.getDeviceSvn();
1874 final Phone phone = getPhone(subId);
1875 return phone == null ? TelephonyManager.UNKNOWN_CARRIER_ID : phone.getCarrierId();
1880 final Phone phone = getPhone(subId);
1881 return phone == null ? null : phone.getCarrierName();
1939 final Phone phone = PhoneFactory.getPhone(slotIndex);
1940 if (phone == null) {
1943 return phone.getPhoneType();
1961 final Phone phone = getPhone(subId);
1962 if (phone != null) {
1963 return phone.getCdmaEriIconIndex();
1985 final Phone phone = getPhone(subId);
1986 if (phone != null) {
1987 return phone.getCdmaEriIconMode();
2007 final Phone phone = getPhone(subId);
2008 if (phone != null) {
2009 return phone.getCdmaEriText();
2022 final Phone phone = getPhone(subId);
2023 if (mPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA && phone != null) {
2024 return phone.getLine1Number();
2037 final Phone phone = getPhone(subId);
2038 if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2039 return phone.getCdmaMin();
2130 // Make the calls as the phone process.
2153 final Phone phone = getPhone(subId);
2154 if (phone != null) {
2155 phone.setVoiceActivationState(activationState);
2168 final Phone phone = getPhone(subId);
2169 if (phone != null) {
2170 phone.setDataActivationState(activationState);
2182 final Phone phone = getPhone(subId);
2183 if (phone != null) {
2184 return phone.getVoiceActivationState();
2196 final Phone phone = getPhone(subId);
2197 if (phone != null) {
2198 return phone.getDataActivationState();
2216 final Phone phone = getPhone(subId);
2217 if (phone != null) {
2218 return phone.getVoiceMessageCount();
2230 final Phone phone = getPhone(subId);
2231 return (phone == null ? false : phone.isConcurrentVoiceAndDataAllowed());
2258 final Phone phone = getPhone(getDefaultSubscription());
2259 if (phone != null) {
2260 return phone.getServiceState().getDataNetworkType();
2276 final Phone phone = getPhone(subId);
2277 if (phone != null) {
2278 return phone.getServiceState().getDataNetworkType();
2302 final Phone phone = getPhone(subId);
2303 if (phone != null) {
2304 return phone.getServiceState().getDataNetworkType();
2320 final Phone phone = getPhone(subId);
2321 if (phone != null) {
2322 return phone.getServiceState().getVoiceNetworkType();
2342 final Phone phone = PhoneFactory.getPhone(slotIndex);
2343 if (phone != null) {
2344 return phone.getIccCard().hasIccCard();
2356 * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
2357 * or {@link Phone#LTE_ON_CDMA_TRUE}
2371 final Phone phone = getPhone(subId);
2372 if (phone == null) {
2375 return phone.getLteOnCdmaMode();
2379 public void setPhone(Phone phone) {
2380 mPhone = phone;
2961 Phone phone = PhoneFactory.getPhone(phoneId);
2962 if (phone != null) {
2964 phone.setUserDataEnabled(enable);
2966 loge("setUserDataEnabled: no phone for subId=" + subId);
3006 Phone phone = PhoneFactory.getPhone(phoneId);
3007 if (phone != null) {
3008 boolean retVal = phone.isUserDataEnabled();
3012 if (DBG) loge("isUserDataEnabled: no phone subId=" + subId + " retVal=false");
3038 Phone phone = PhoneFactory.getPhone(phoneId);
3039 if (phone != null) {
3040 boolean retVal = phone.isDataEnabled();
3044 if (DBG) loge("isDataEnabled: no phone subId=" + subId + " retVal=false");
3051 final Phone phone = getPhone(subId);
3052 if (phone == null) {
3056 UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
3062 phone.getContext().getPackageManager());
3067 final Phone phone = getPhone(subId);
3068 if (phone == null) {
3073 UiccController.getInstance().getUiccProfileForPhone(phone.getPhoneId());
3078 return profile.getCarrierPrivilegeStatusForUid(phone.getContext().getPackageManager(), uid);
3163 final Phone phone = getPhone(subId);
3164 UiccCard card = phone == null ? null : phone.getUiccCard();
3184 final Phone phone = getPhone(subId);
3185 if (phone == null) {
3188 final String subscriberId = phone.getSubscriberId();
3342 final Phone phone = getPhone(subId);
3343 return phone == null ? false : phone.setOperatorBrandOverride(brand);
3351 final Phone phone = getPhone(subId);
3352 if (phone == null) {
3355 return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
3403 Phone phone = PhoneFactory.getPhone(phoneId);
3404 if (phone == null) {
3407 int subId = phone.getSubId();
3476 * Returns the unique device ID of phone, for example, the IMEI for
3484 final Phone phone = PhoneFactory.getPhone(0);
3485 if (phone == null) {
3488 int subId = phone.getSubId();
3493 return phone.getDeviceId();
3503 Phone phone = getPhone(subId);
3504 if (phone != null) {
3505 return phone.isImsRegistered();
3520 Phone phone = getPhone(subId);
3521 if (phone != null) {
3522 return phone.isWifiCallingEnabled();
3532 Phone phone = getPhone(subId);
3533 if (phone != null) {
3534 return phone.isVolteEnabled();
3544 Phone phone = getPhone(subId);
3545 if (phone != null) {
3546 return phone.isVideoEnabled();
3557 Phone phone = getPhone(subId);
3558 if (phone != null) {
3559 return phone.getImsRegistrationTech();
3620 final Phone defaultPhone = getPhone(info.getSubscriptionId());
3727 final Phone phone = getPhone(subId);
3728 if (phone == null) {
3732 return phone.getServiceState();
3736 * Returns the URI for the per-account voicemail ringtone set in Phone settings.
3745 Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
3746 if (phone == null) {
3747 phone = mPhone;
3750 return VoicemailNotificationSettingsUtil.getRingtoneUri(phone.getContext());
3774 Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
3775 if (phone == null){
3776 phone = mPhone;
3778 VoicemailNotificationSettingsUtil.setRingtoneUri(phone.getContext(), uri);
3782 * Returns whether vibration is set for voicemail notification in Phone settings.
3790 Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
3791 if (phone == null) {
3792 phone = mPhone;
3795 return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone.getContext());
3820 Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(phoneAccountHandle);
3821 if (phone == null){
3822 phone = mPhone;
3824 VoicemailNotificationSettingsUtil.setVibrationEnabled(phone.getContext(), enabled);
3828 * Make sure either called from same process as self (phone) or IPC caller has read privilege.
3838 * Make sure either called from same process as self (phone) or IPC caller has send SMS
3875 Phone phone = getPhone(subId);
3876 if (phone == null) {
3881 aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
3898 Phone phone = getPhone(subId);
3899 if (phone == null) {
3904 esn = phone.getEsn();
3920 Phone phone = getPhone(subId);
3921 if (phone == null) {
3926 cdmaPrlVersion = phone.getCdmaPrlVersion();
3989 final Phone phone = getPhone(subId);
3990 if (phone == null) {
3995 phone.carrierActionSetMeteredApnsEnabled(enabled);
4010 final Phone phone = getPhone(subId);
4011 if (phone == null) {
4016 phone.carrierActionSetRadioEnabled(enabled);
4034 final Phone phone = getPhone(subId);
4035 if (phone == null) {
4040 phone.carrierActionReportDefaultNetworkStatus(report);
4047 * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
4054 writer.println("Permission Denial: can't dump Phone from pid="
4086 Phone phone = getPhone(subId);
4087 if (phone != null) {
4088 return phone.getVtDataUsage(perUidStats);
4102 Phone phone = getPhone(subId);
4103 if (phone != null) {
4104 phone.setPolicyDataEnabled(enabled);
4120 Phone phone = getPhone(subId);
4121 if (phone != null) {
4122 return phone.getClientRequestStats();
4146 Phone phone = PhoneFactory.getPhone(slotIndex);
4148 if (phone != null) {
4149 phone.setSimPowerState(state);
4169 * Check if phone is in emergency callback mode
4170 * @return true if phone is in emergency callback mode
4176 final Phone phone = getPhone(subId);
4177 if (phone != null) {
4178 return phone.isInEcm();
4193 Phone p = getPhone(subId);
4265 final Phone phone = getPhone(subId);
4266 if (phone == null) {
4271 phone.setRadioIndicationUpdateMode(filters, mode);
4287 Phone phone = getPhone(subId);
4288 if (phone == null) {
4291 UiccCard uiccCard = phone.getUiccCard();
4330 * not set, return {@link Phone#PREFERRED_NT_MODE}.
4337 String.valueOf(Phone.PREFERRED_NT_MODE)));
4344 final Phone phone = getPhone(subId);
4345 if (phone == null) {
4349 phone.setCarrierTestOverride(mccmnc, imsi, iccid, gid1, gid2, plmn, spn);
4355 final Phone phone = getPhone(subId);
4356 if (phone == null) {
4360 return phone.getCarrierIdListVersion();