Home | History | Annotate | Download | only in phone

Lines Matching refs:Phone

17 package com.android.phone;
69 import com.android.internal.telephony.Phone;
80 import com.android.phone.settings.VoicemailNotificationSettingsUtil;
146 private Phone mPhone;
229 * A handler that processes messages on the main thread in the phone process. Since many
230 * of the Phone calls are not thread safe this is needed to shuttle the requests from the
231 * inbound binder threads to the main thread in the phone process. The Binder thread
252 final Phone phone = getPhoneFromRequest(request);
253 request.result = phone != null ?
295 Phone phone = getPhone(end_subId);
296 if (phone == null) {
297 if (DBG) log("CMD_END_CALL: no phone for id: " + end_subId);
300 int phoneType = phone.getPhoneType();
306 // GSM: End the call as per the Phone state
309 throw new IllegalStateException("Unexpected phone type: " + phoneType);
848 /* package */ static PhoneInterfaceManager init(PhoneGlobals app, Phone phone) {
851 sInstance = new PhoneInterfaceManager(app, phone);
860 private PhoneInterfaceManager(PhoneGlobals app, Phone phone) {
862 mPhone = phone;
877 ServiceManager.addService("phone", this);
880 private Phone getPhoneFromRequest(MainThreadRequest request) {
886 Phone phone = getPhoneFromRequest(request);
887 return phone == null ? null :
888 UiccController.getInstance().getUiccCard(phone.getPhoneId());
891 // returns phone associated with the subId.
892 private Phone getPhone(int subId) {
914 // PENDING: should we just silently fail if phone is offhook or ringing?
932 // from the context of the phone app.
997 * This should only be called from the main thread of the Phone app.
1051 final Phone phone = getPhone(subId);
1052 if (phone != null) {
1053 return (phone.getState() == PhoneConstants.State.OFFHOOK);
1070 final Phone phone = getPhone(subId);
1071 if (phone != null) {
1072 return (phone.getState() == PhoneConstants.State.RINGING);
1089 final Phone phone = getPhone(subId);
1090 if (phone != null) {
1091 return (phone.getState() == PhoneConstants.State.IDLE);
1247 final Phone phone = getPhone(subId);
1248 if (phone != null) {
1249 phone.updateServiceLocation();
1267 final Phone phone = getPhone(subId);
1268 if (phone != null) {
1269 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
1282 final Phone phone = getPhone(subId);
1283 if (phone != null) {
1284 phone.setRadioPower(!isRadioOnForSubscriber(subId));
1294 final Phone phone = getPhone(subId);
1295 if (phone == null) {
1298 if ((phone.getServiceState().getState() !=
1311 Phone phone = PhoneFactory.getPhone(i);
1312 if (phone != null && phone.isRadioAvailable()) return true;
1320 logv("Shutting down Phone " + i);
1327 Phone phone = PhoneFactory.getPhone(phoneId);
1328 if (phone != null && phone.isRadioAvailable()) {
1329 phone.shutdownRadio();
1339 final Phone phone = getPhone(subId);
1340 if (phone != null) {
1341 phone.setRadioPower(turnOn);
1353 final Phone phone = getPhone(subId);
1354 if (phone != null) {
1355 phone.setDataEnabled(true);
1367 final Phone phone = getPhone(subId);
1368 if (phone != null) {
1369 phone.setDataEnabled(false);
1380 final Phone phone = getPhone(subId);
1381 if (phone != null) {
1382 return phone.isDataConnectivityPossible();
1405 Phone phone = PhoneFactory.getPhone(slotId);
1406 return phone == null ? TelephonyManager.CALL_STATE_IDLE :
1407 DefaultPhoneNotifier.convertCallState(phone.getState());
1412 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1413 if (phone != null) {
1414 return DefaultPhoneNotifier.convertDataState(phone.getDataConnectionState());
1422 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1423 if (phone != null) {
1424 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
1445 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1446 if (phone == null) {
1449 phone.getCellLocation().fillInNotifierBundle(data);
1480 final Phone phone = getPhone(subId);
1481 if (phone != null) {
1482 phone.enableLocationUpdates();
1495 final Phone phone = getPhone(subId);
1496 if (phone != null) {
1497 phone.disableLocationUpdates();
1552 for (Phone phone : PhoneFactory.getPhones()) {
1553 final List<CellInfo> info = phone.getAllCellInfo();
1554 if (info != null) cellInfos.addAll(phone.getAllCellInfo());
1573 Phone phone = PhoneFactory.getPhone(slotId);
1574 return phone == null ? null : phone.getImei();
1582 Phone phone = PhoneFactory.getPhone(slotId);
1583 return phone == null ? null : phone.getDeviceSvn();
1711 final Phone phone = PhoneFactory.getPhone(slotId);
1712 if (phone == null) {
1715 return phone.getPhoneType();
1732 final Phone phone = getPhone(subId);
1733 if (phone != null) {
1734 return phone.getCdmaEriIconIndex();
1755 final Phone phone = getPhone(subId);
1756 if (phone != null) {
1757 return phone.getCdmaEriIconMode();
1776 final Phone phone = getPhone(subId);
1777 if (phone != null) {
1778 return phone.getCdmaEriText();
1790 final Phone phone = getPhone(subId);
1791 if (mPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA && phone != null) {
1792 return phone.getLine1Number();
1804 final Phone phone = getPhone(subId);
1805 if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
1806 return phone.getCdmaMin();
1842 final Phone phone = getPhone(subId);
1843 if (phone != null) {
1844 return phone.getVoiceMessageCount();
1858 final Phone phone = getPhone(getDefaultSubscription());
1859 if (phone != null) {
1860 return phone.getServiceState().getDataNetworkType();
1875 final Phone phone = getPhone(subId);
1876 if (phone != null) {
1877 return phone.getServiceState().getDataNetworkType();
1900 final Phone phone = getPhone(subId);
1901 if (phone != null) {
1902 return phone.getServiceState().getDataNetworkType();
1917 final Phone phone = getPhone(subId);
1918 if (phone != null) {
1919 return phone.getServiceState().getVoiceNetworkType();
1939 final Phone phone = getPhone(subId[0]);
1940 if (subId != null && phone != null) {
1941 return phone.getIccCard().hasIccCard();
1953 * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
1954 * or {@link Phone#LTE_ON_CDMA_TRUE}
1967 final Phone phone = getPhone(subId);
1968 if (phone == null) {
1971 return phone.getLteOnCdmaMode();
1975 public void setPhone(Phone phone) {
1976 mPhone = phone;
2350 Phone phone = PhoneFactory.getPhone(phoneId);
2351 if (phone != null) {
2353 phone.setDataEnabled(enable);
2355 loge("setDataEnabled: no phone for subId=" + subId);
2379 Phone phone = PhoneFactory.getPhone(phoneId);
2380 if (phone != null) {
2381 boolean retVal = phone.getDataEnabled();
2385 if (DBG) loge("getDataEnabled: no phone subId=" + subId + " retVal=false");
2392 final Phone phone = getPhone(subId);
2393 if (phone == null) {
2397 UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
2403 phone.getContext().getPackageManager());
2488 final Phone phone = getPhone(subId);
2489 UiccCard card = phone == null ? null : phone.getUiccCard();
2508 final Phone phone = getPhone(subId);
2509 if (phone == null) {
2512 final String subscriberId = phone.getSubscriberId();
2659 final Phone phone = getPhone(subId);
2660 return phone == null ? false : phone.setOperatorBrandOverride(brand);
2668 final Phone phone = getPhone(subId);
2669 if (phone == null) {
2672 return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
2771 * Returns the unique device ID of phone, for example, the IMEI for
2783 final Phone phone = PhoneFactory.getPhone(0);
2784 if (phone != null) {
2785 return phone.getDeviceId();
2849 * Besides READ_PHONE_STATE, WRITE_SMS and READ_SMS also allow apps to get phone numbers.
2891 setPreferredNetworkType(subId, Phone.PREFERRED_NT_MODE);
2933 final Phone defaultPhone = getPhone(info.getSubscriptionId());
3009 final Phone phone = getPhone(subId);
3010 if (phone == null) {
3014 return phone.getServiceState();
3018 * Returns the URI for the per-account voicemail ringtone set in Phone settings.
3027 final Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
3028 if (phone == null) {
3032 return VoicemailNotificationSettingsUtil.getRingtoneUri(phone);
3036 * Returns whether vibration is set for voicemail notification in Phone settings.
3044 final Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
3045 if (phone == null) {
3049 return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone);