Home | History | Annotate | Download | only in phone

Lines Matching refs:phone

17 package com.android.phone;
60 import com.android.internal.telephony.Phone;
66 import com.android.phone.CallGatewayManager.RawGatewayInfo;
72 * Misc utilities for the Phone app.
93 // State of the Phone's audio modes
96 static final int AUDIO_IDLE = 0; /** audio behaviour at phone idle */
110 /** Phone state changed event*/
116 /** poll phone DISCONNECTING status interval */
119 /** poll phone DISCONNECTING status times limit */
149 new ComponentName("com.android.phone",
188 * Register the ConnectionHandler with the phone, to receive connection events
218 final Phone phone = ringingCall.getPhone();
219 final boolean phoneIsCdma = (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA);
237 // Set the Phone Call State to SINGLE_ACTIVE
242 // Set the Phone Call State to CONF_CALL
303 * based on the current Phone state, as follows:
373 * @param phone the Phone object.
376 static boolean hangupRingingAndActive(Phone phone) {
379 Call ringingCall = phone.getRingingCall();
380 Call fgCall = phone.getForegroundCall();
453 * Answers the incoming call specified by "ringing", and ends the currently active phone call.
456 * current call. e.g. when you are having a phone call with CDMA network and has received
457 * a SIP call, then we won't expect our telephony can manage those phone calls simultaneously.
458 * Note that some types of network may allow multiple phone calls at once; GSM allows to hold
459 * an ongoing phone call, so we don't need to end the active call. The caller of this method
460 * needs to check if the network allows multiple phone calls or not.
475 // while active call and waiting call are from the same phone
476 // i.e. both from GSM phone
493 * For a CDMA phone, advance the call state upon making a new
501 * @param app The phone instance.
507 // This is the first outgoing call. Set the Phone Call State to ACTIVE
511 // This is the second outgoing call. Set the Phone Call State to 3WAY
523 public static int placeCall(Context context, Phone phone, String number, Uri contactRef,
525 return placeCall(context, phone, number, contactRef, isEmergencyCall,
530 * Dial the number using the phone passed in.
537 * @param phone the Phone object.
539 * NOT the phone number to connect to. It is used only to build the
551 public static int placeCall(Context context, Phone phone, String number, Uri contactRef,
595 // Remember if the phone state was in IDLE state before this call.
600 connection = app.mCM.dial(phone, numberToDial, VideoProfile.STATE_AUDIO_ONLY);
613 int phoneType = phone.getPhoneType();
629 // phone.dial() succeeded: we're now in a normal phone call.
673 // sanitized phone numbers.
691 static void sendEmptyFlash(Phone phone) {
692 if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
693 Call fgCall = phone.getForegroundCall();
697 switchHoldingAndActive(phone.getBackgroundCall());
746 // Set the Phone Call State to conference
857 static void displayMMIComplete(final Phone phone, Context context, final MmiCode mmiCode,
918 // indicate to the Phone app that the progress dialog has
1023 phone.sendUssdResponse(inputText.getText().toString());
1053 phone.sendUssdResponse(inputText.getText().toString());
1089 static boolean cancelMmiCode(Phone phone) {
1090 List<? extends MmiCode> pendingMmis = phone.getPendingMmiCodes();
1098 // in the phone UI, because during the MMI operation, an Alert panel
1121 * initiated this outgoing call), figure out the actual phone number we
1131 * phone number with separators and keypad letters stripped out, or a raw
1134 * @return the phone number corresponding to the specified Intent, or null
1151 // If the EXTRA_ACTUAL_NUMBER_TO_DIAL extra is present, get the phone
1168 * Gets the phone number to be called from an intent. Requires a Context
1169 * to access the contacts database, and a Phone to access the voicemail
1172 * <p>If <code>phone</code> is <code>null</code>, the function will return
1175 * <code>null</code> for person/phone URIs.</p>
1184 * a <code>voicemail:</code> URI, but <code>phone</code> does not
1187 * @return the phone number (or SIP address) that would be called by the intent,
1218 * extract a phone number from the specified Connection, and feed that
1223 * phone number from the Connection.
1254 // querying a new CallerInfo using the connection's phone number.
1299 throw new IllegalStateException("Unexpected phone type: " + phoneType);
1379 // querying a new CallerInfo using the connection's phone number.
1389 log("PhoneUtils.startGetCallerInfo: new query for phone number...");
1392 log("- phone: " + c.getCall().getPhone());
1404 default: log(" ==> Unknown phone type"); break;
1611 newCi.phoneNumber = ci.phoneNumber; // To get formatted phone number
1635 // the phone number being displayed, if applicable.
1726 // Sanity-check that this is OK given the current state of the phone.
1744 // Note: this method is used even when the phone is encrypted. At that moment
1870 * Get the mute state of foreground phone, which has the current
1881 * Sets the audio mode per current phone state.
1887 * Look for ANY connections on the phone that qualify as being
1891 * all the phone's call objects.
1893 /* package */ static boolean hasDisconnectedConnections(Phone phone) {
1894 return hasDisconnectedConnections(phone.getForegroundCall()) ||
1895 hasDisconnectedConnections(phone.getBackgroundCall()) ||
1896 hasDisconnectedConnections(phone.getRingingCall());
1923 * state of the Phone.
1941 * state of the Phone.
1951 // This phone has the concept of explicit "Hold" and "Unhold" actions.
1954 // Even when foreground phone device doesn't support hold/unhold, phone devices
1967 * state of the Phone.
1972 // CDMA: "Swap" is enabled only when the phone reaches a *generic*.
1990 throw new IllegalStateException("Unexpected phone type: " + phoneType);
1996 * state of the Phone.
2019 * state of the Phone.
2022 Phone phone = cm.getActiveFgCall().getPhone();
2025 if (isPhoneInEcm(phone)) {
2029 int phoneType = phone.getPhoneType();
2058 throw new IllegalStateException("Unexpected phone type: " + phoneType);
2086 * Handles certain "corner cases" for CNAP. When we receive weird phone numbers
2091 * @return the new String that should be used for the phone number
2107 // phone number, so if this happens, change it to "Unknown" in the CallerInfo
2148 // Support for 3rd party phone service providers.
2152 * Check if a phone number can be route through a 3rd party
2153 * gateway. The number must be a global phone number in numerical
2175 * Returns whether the phone is in ECM ("Emergency Callback Mode") or not.
2177 /* package */ static boolean isPhoneInEcm(Phone phone) {
2178 if ((phone != null) && TelephonyCapabilities.supportsEcm(phone)) {
2179 return phone.isInEcm();
2185 * Returns the most appropriate Phone object to handle a call
2190 * @param number the phone number, or SIP address.
2192 public static Phone pickPhoneBasedOnNumber(CallManager cm, String scheme, String number,
2203 Phone phone = getSipPhoneFromUri(cm, primarySipUri);
2204 if (phone != null) return phone;
2210 public static Phone getSipPhoneFromUri(CallManager cm, String target) {
2211 for (Phone phone : cm.getAllPhones()) {
2212 if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_SIP) {
2213 String sipUri = ((SipPhone) phone).getSipUri();
2216 "found SipPhone! obj = " + phone + ", "
2217 + phone.getClass());
2218 return phone;
2226 * Returns true when the given call is in INCOMING state and there's no foreground phone call,
2227 * meaning the call is the first real incoming call the phone is having.
2252 // General phone and call state debugging/testing code
2255 /* package */ static void dumpCallState(Phone phone) {
2258 Log.d(LOG_TAG, "- Phone: " + phone + ", name = " + phone.getPhoneName()
2259 + ", state = " + phone.getState());
2263 Call call = phone.getForegroundCall();
2273 call = phone.getBackgroundCall();
2283 call = phone.getRingingCall();
2294 final boolean hasRingingCall = !phone.getRingingCall().isIdle();
2295 final boolean hasActiveCall = !phone.getForegroundCall().isIdle();
2296 final boolean hasHoldingCall = !phone.getBackgroundCall().isIdle();
2306 if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
2358 for (Phone phone : CallManager.getInstance().getAllPhones()) {
2359 if (phone != null) {
2360 Log.d(LOG_TAG, "Phone: " + phone + ", name = " + phone.getPhoneName()
2361 + ", state = " + phone.getState());
2363 call = phone.getForegroundCall();
2369 call = phone.getBackgroundCall();
2374 call = phone.getRingingCall();
2401 public static PhoneAccountHandle makePstnPhoneAccountHandle(Phone phone) {
2402 return makePstnPhoneAccountHandleWithPrefix(phone, "", false);
2406 Phone phone, String prefix, boolean isEmergency) {
2410 String.valueOf(phone.getFullIccSerialNumber());
2429 Phone phone = getPhoneForPhoneAccountHandle(handle);
2430 if (phone != null) {
2431 return phone.getSubId();
2436 public static Phone getPhoneForPhoneAccountHandle(PhoneAccountHandle handle) {
2445 * Determine if a given phone account corresponds to an active SIM
2449 * @param handle The handle for the phone account to check
2450 * @return {@code true} If there is an active SIM for this phone account,
2461 private static Phone getPhoneFromIccId(String iccId) {
2463 for (Phone phone : PhoneFactory.getPhones()) {
2464 String phoneIccId = phone.getFullIccSerialNumber();
2466 return phone;
2477 for (Phone phone : PhoneFactory.getPhones()) {
2478 IccCard sim = phone.getIccCard();
2480 if (VDBG) Log.v(LOG_TAG, "register for ICC status, phone " + phone.getPhoneId());
2481 sim.registerForNetworkLocked(handler, event, phone);
2492 for (Phone phone : PhoneFactory.getPhones()) {
2493 phone.setRadioPower(enabled);