Lines Matching refs:phone
17 package com.android.phone;
73 import com.android.internal.telephony.Phone;
85 import com.android.phone.settings.VisualVoicemailSettingsUtil;
86 import com.android.phone.settings.VoicemailNotificationSettingsUtil;
155 private Phone mPhone;
238 * A handler that processes messages on the main thread in the phone process. Since many
239 * of the Phone calls are not thread safe this is needed to shuttle the requests from the
240 * inbound binder threads to the main thread in the phone process. The Binder thread
261 final Phone phone = getPhoneFromRequest(request);
262 request.result = phone != null ?
304 Phone phone = getPhone(end_subId);
305 if (phone == null) {
306 if (DBG) log("CMD_END_CALL: no phone for id: " + end_subId);
309 int phoneType = phone.getPhoneType();
315 // GSM: End the call as per the Phone state
318 throw new IllegalStateException("Unexpected phone type: " + phoneType);
919 /* package */ static PhoneInterfaceManager init(PhoneGlobals app, Phone phone) {
922 sInstance = new PhoneInterfaceManager(app, phone);
931 private PhoneInterfaceManager(PhoneGlobals app, Phone phone) {
933 mPhone = phone;
948 ServiceManager.addService("phone", this);
951 private Phone getPhoneFromRequest(MainThreadRequest request) {
957 Phone phone = getPhoneFromRequest(request);
958 return phone == null ? null :
959 UiccController.getInstance().getUiccCard(phone.getPhoneId());
962 // returns phone associated with the subId.
963 private Phone getPhone(int subId) {
985 // PENDING: should we just silently fail if phone is offhook or ringing?
1003 // from the context of the phone app.
1068 * This should only be called from the main thread of the Phone app.
1122 final Phone phone = getPhone(subId);
1123 if (phone != null) {
1124 return (phone.getState() == PhoneConstants.State.OFFHOOK);
1141 final Phone phone = getPhone(subId);
1142 if (phone != null) {
1143 return (phone.getState() == PhoneConstants.State.RINGING);
1160 final Phone phone = getPhone(subId);
1161 if (phone != null) {
1162 return (phone.getState() == PhoneConstants.State.IDLE);
1318 final Phone phone = getPhone(subId);
1319 if (phone != null) {
1320 phone.updateServiceLocation();
1338 final Phone phone = getPhone(subId);
1339 if (phone != null) {
1340 return phone.getServiceState().getState() != ServiceState.STATE_POWER_OFF;
1353 final Phone phone = getPhone(subId);
1354 if (phone != null) {
1355 phone.setRadioPower(!isRadioOnForSubscriber(subId));
1365 final Phone phone = getPhone(subId);
1366 if (phone == null) {
1369 if ((phone.getServiceState().getState() !=
1382 Phone phone = PhoneFactory.getPhone(i);
1383 if (phone != null && phone.isRadioAvailable()) return true;
1391 logv("Shutting down Phone " + i);
1398 Phone phone = PhoneFactory.getPhone(phoneId);
1399 if (phone != null && phone.isRadioAvailable()) {
1400 phone.shutdownRadio();
1410 final Phone phone = getPhone(subId);
1411 if (phone != null) {
1412 phone.setRadioPower(turnOn);
1424 final Phone phone = getPhone(subId);
1425 if (phone != null) {
1426 phone.setDataEnabled(true);
1438 final Phone phone = getPhone(subId);
1439 if (phone != null) {
1440 phone.setDataEnabled(false);
1451 final Phone phone = getPhone(subId);
1452 if (phone != null) {
1453 return phone.isDataConnectivityPossible();
1476 Phone phone = PhoneFactory.getPhone(slotId);
1477 return phone == null ? TelephonyManager.CALL_STATE_IDLE :
1478 DefaultPhoneNotifier.convertCallState(phone.getState());
1483 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1484 if (phone != null) {
1485 return DefaultPhoneNotifier.convertDataState(phone.getDataConnectionState());
1493 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1494 if (phone != null) {
1495 return DefaultPhoneNotifier.convertDataActivityState(phone.getDataActivityState());
1516 Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
1517 if (phone == null) {
1520 phone.getCellLocation().fillInNotifierBundle(data);
1551 final Phone phone = getPhone(subId);
1552 if (phone != null) {
1553 phone.enableLocationUpdates();
1566 final Phone phone = getPhone(subId);
1567 if (phone != null) {
1568 phone.disableLocationUpdates();
1623 for (Phone phone : PhoneFactory.getPhones()) {
1624 final List<CellInfo> info = phone.getAllCellInfo();
1625 if (info != null) cellInfos.addAll(phone.getAllCellInfo());
1644 Phone phone = PhoneFactory.getPhone(slotId);
1645 return phone == null ? null : phone.getImei();
1653 Phone phone = PhoneFactory.getPhone(slotId);
1654 return phone == null ? null : phone.getDeviceSvn();
1782 final Phone phone = PhoneFactory.getPhone(slotId);
1783 if (phone == null) {
1786 return phone.getPhoneType();
1803 final Phone phone = getPhone(subId);
1804 if (phone != null) {
1805 return phone.getCdmaEriIconIndex();
1826 final Phone phone = getPhone(subId);
1827 if (phone != null) {
1828 return phone.getCdmaEriIconMode();
1847 final Phone phone = getPhone(subId);
1848 if (phone != null) {
1849 return phone.getCdmaEriText();
1861 final Phone phone = getPhone(subId);
1862 if (mPhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA && phone != null) {
1863 return phone.getLine1Number();
1875 final Phone phone = getPhone(subId);
1876 if (phone != null && phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
1877 return phone.getCdmaMin();
1965 final Phone phone = getPhone(subId);
1966 if (phone != null) {
1967 return phone.getVoiceMessageCount();
1981 final Phone phone = getPhone(getDefaultSubscription());
1982 if (phone != null) {
1983 return phone.getServiceState().getDataNetworkType();
1998 final Phone phone = getPhone(subId);
1999 if (phone != null) {
2000 return phone.getServiceState().getDataNetworkType();
2023 final Phone phone = getPhone(subId);
2024 if (phone != null) {
2025 return phone.getServiceState().getDataNetworkType();
2040 final Phone phone = getPhone(subId);
2041 if (phone != null) {
2042 return phone.getServiceState().getVoiceNetworkType();
2062 final Phone phone = getPhone(subId[0]);
2063 if (subId != null && phone != null) {
2064 return phone.getIccCard().hasIccCard();
2076 * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
2077 * or {@link Phone#LTE_ON_CDMA_TRUE}
2090 final Phone phone = getPhone(subId);
2091 if (phone == null) {
2094 return phone.getLteOnCdmaMode();
2098 public void setPhone(Phone phone) {
2099 mPhone = phone;
2473 Phone phone = PhoneFactory.getPhone(phoneId);
2474 if (phone != null) {
2476 phone.setDataEnabled(enable);
2478 loge("setDataEnabled: no phone for subId=" + subId);
2502 Phone phone = PhoneFactory.getPhone(phoneId);
2503 if (phone != null) {
2504 boolean retVal = phone.getDataEnabled();
2508 if (DBG) loge("getDataEnabled: no phone subId=" + subId + " retVal=false");
2515 final Phone phone = getPhone(subId);
2516 if (phone == null) {
2520 UiccCard card = UiccController.getInstance().getUiccCard(phone.getPhoneId());
2526 phone.getContext().getPackageManager());
2611 final Phone phone = getPhone(subId);
2612 UiccCard card = phone == null ? null : phone.getUiccCard();
2631 final Phone phone = getPhone(subId);
2632 if (phone == null) {
2635 final String subscriberId = phone.getSubscriberId();
2782 final Phone phone = getPhone(subId);
2783 return phone == null ? false : phone.setOperatorBrandOverride(brand);
2791 final Phone phone = getPhone(subId);
2792 if (phone == null) {
2795 return phone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList, cdmaRoamingList,
2894 * Returns the unique device ID of phone, for example, the IMEI for
2906 final Phone phone = PhoneFactory.getPhone(0);
2907 if (phone != null) {
2908 return phone.getDeviceId();
2972 * Besides READ_PHONE_STATE, WRITE_SMS and READ_SMS also allow apps to get phone numbers.
3014 setPreferredNetworkType(subId, Phone.PREFERRED_NT_MODE);
3056 final Phone defaultPhone = getPhone(info.getSubscriptionId());
3132 final Phone phone = getPhone(subId);
3133 if (phone == null) {
3137 return phone.getServiceState();
3141 * Returns the URI for the per-account voicemail ringtone set in Phone settings.
3150 final Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
3151 if (phone == null) {
3155 return VoicemailNotificationSettingsUtil.getRingtoneUri(phone);
3159 * Returns whether vibration is set for voicemail notification in Phone settings.
3167 final Phone phone = PhoneUtils.getPhoneForPhoneAccountHandle(accountHandle);
3168 if (phone == null) {
3172 return VoicemailNotificationSettingsUtil.isVibrationEnabled(phone);
3176 * Make sure either called from same process as self (phone) or IPC caller has read privilege.
3195 Phone phone = getPhone(subId);
3196 if (phone == null) {
3201 aid = UiccController.getInstance().getUiccCard(phone.getPhoneId())
3218 Phone phone = getPhone(subId);
3219 if (phone == null) {
3224 esn = phone.getEsn();
3240 Phone phone = getPhone(subId);
3241 if (phone == null) {
3246 cdmaPrlVersion = phone.getCdmaPrlVersion();
3303 final Phone phone = getPhone(subId);
3304 if (phone == null) {
3309 phone.carrierActionSetMeteredApnsEnabled(enabled);
3324 final Phone phone = getPhone(subId);
3325 if (phone == null) {
3330 phone.carrierActionSetRadioEnabled(enabled);
3337 * Called when "adb shell dumpsys phone" is invoked. Dump is also automatically invoked when a
3344 writer.println("Permission Denial: can't dump Phone from pid="
3370 final Phone[] phones = PhoneFactory.getPhones();
3372 for (Phone phone : phones) {
3373 total += phone.getVtDataUsage();
3387 Phone phone = getPhone(subId);
3388 if (phone != null) {
3389 phone.setPolicyDataEnabled(enabled);