summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/CallManager.java15
-rwxr-xr-xtelephony/java/com/android/internal/telephony/cdma/CDMAPhone.java4
-rwxr-xr-xtelephony/java/com/android/internal/telephony/sip/SipPhoneBase.java4
3 files changed, 14 insertions, 9 deletions
diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java
index d74a547..5b49305 100644
--- a/telephony/java/com/android/internal/telephony/CallManager.java
+++ b/telephony/java/com/android/internal/telephony/CallManager.java
@@ -380,12 +380,17 @@ public final class CallManager {
break;
case OFFHOOK:
Phone fgPhone = getFgPhone();
- // Enable IN_CALL mode while foreground call is in DIALING,
- // ALERTING, ACTIVE and DISCONNECTING state and not from sipPhone
+ // While foreground call is in DIALING,
+ // ALERTING, ACTIVE and DISCONNECTING state
if (getActiveFgCallState() != Call.State.IDLE
- && getActiveFgCallState() != Call.State.DISCONNECTED
- && !(fgPhone instanceof SipPhone)) {
- mode = AudioManager.MODE_IN_CALL;
+ && getActiveFgCallState() != Call.State.DISCONNECTED) {
+ if (fgPhone instanceof SipPhone) {
+ // enable IN_COMMUNICATION audio mode for sipPhone
+ mode = AudioManager.MODE_IN_COMMUNICATION;
+ } else {
+ // enable IN_CALL audio mode for telephony
+ mode = AudioManager.MODE_IN_CALL;
+ }
}
break;
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
index b9d5673..099bc30 100755
--- a/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CDMAPhone.java
@@ -934,13 +934,13 @@ public class CDMAPhone extends PhoneBase {
switch(action) {
case CANCEL_ECM_TIMER:
removeCallbacks(mExitEcmRunnable);
- mEcmTimerResetRegistrants.notifyResult(new Boolean(true));
+ mEcmTimerResetRegistrants.notifyResult(Boolean.TRUE);
break;
case RESTART_ECM_TIMER:
long delayInMillis = SystemProperties.getLong(
TelephonyProperties.PROPERTY_ECM_EXIT_TIMER, DEFAULT_ECM_EXIT_TIMER_VALUE);
postDelayed(mExitEcmRunnable, delayInMillis);
- mEcmTimerResetRegistrants.notifyResult(new Boolean(false));
+ mEcmTimerResetRegistrants.notifyResult(Boolean.FALSE);
break;
default:
Log.e(LOG_TAG, "handleTimerInEmergencyCallbackMode, unsupported action " + action);
diff --git a/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java b/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java
index afd4d0c..db9e35a 100755
--- a/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java
+++ b/telephony/java/com/android/internal/telephony/sip/SipPhoneBase.java
@@ -101,12 +101,12 @@ abstract class SipPhoneBase extends PhoneBase {
}
protected void startRingbackTone() {
- AsyncResult result = new AsyncResult(null, new Boolean(true), null);
+ AsyncResult result = new AsyncResult(null, Boolean.TRUE, null);
mRingbackRegistrants.notifyRegistrants(result);
}
protected void stopRingbackTone() {
- AsyncResult result = new AsyncResult(null, new Boolean(false), null);
+ AsyncResult result = new AsyncResult(null, Boolean.FALSE, null);
mRingbackRegistrants.notifyRegistrants(result);
}