aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/android/internal
diff options
context:
space:
mode:
authorSandeep Kunta <skunta@codeaurora.org>2014-05-12 16:54:35 +0530
committerEd Carrigan <cretin45@gmail.com>2014-09-02 21:27:19 +0000
commit5dd6633e946bfa3c729ddbd008f7735caaeede3d (patch)
tree046acd85a7e81c0dc9296be41eb195ffe887203c /src/java/com/android/internal
parenta8f2ace62cfc688cc4bd99d5105df7374fe20e7b (diff)
downloadandroid_frameworks_opt_telephony-5dd6633e946bfa3c729ddbd008f7735caaeede3d.tar.gz
android_frameworks_opt_telephony-5dd6633e946bfa3c729ddbd008f7735caaeede3d.tar.bz2
android_frameworks_opt_telephony-5dd6633e946bfa3c729ddbd008f7735caaeede3d.zip
MSIM(DSDA): Add conversation sub
Add conversation sub Change-Id: I67f508baf66ba5ebc86a4f430af739d6ba8180ba CRs-Fixed: 659123
Diffstat (limited to 'src/java/com/android/internal')
-rw-r--r--src/java/com/android/internal/telephony/CallManager.java13
-rw-r--r--src/java/com/android/internal/telephony/ExtCallManager.java39
2 files changed, 31 insertions, 21 deletions
diff --git a/src/java/com/android/internal/telephony/CallManager.java b/src/java/com/android/internal/telephony/CallManager.java
index fb8ba73b5..fb67b6a21 100644
--- a/src/java/com/android/internal/telephony/CallManager.java
+++ b/src/java/com/android/internal/telephony/CallManager.java
@@ -2282,10 +2282,6 @@ public class CallManager {
return false;
}
- public void deactivateLchState(int sub) {
- Rlog.e(LOG_TAG, " deactivateLchState not supported");
- }
-
public void startDtmf(char c, int subscription) {
Rlog.e(LOG_TAG, " startDtmf not supported for subscription");
}
@@ -2293,4 +2289,13 @@ public class CallManager {
public void stopDtmf(int subscription) {
Rlog.e(LOG_TAG, " stopDtmf not supported for subscription");
}
+
+ public void setSubInConversation(int subscription) {
+ Rlog.e(LOG_TAG, " setSubInConversation not supported");
+ }
+
+ public int getSubInConversation() {
+ Rlog.e(LOG_TAG, " getSubInConversation not supported");
+ return 0;
+ }
}
diff --git a/src/java/com/android/internal/telephony/ExtCallManager.java b/src/java/com/android/internal/telephony/ExtCallManager.java
index 824e34fcd..7eeed2c14 100644
--- a/src/java/com/android/internal/telephony/ExtCallManager.java
+++ b/src/java/com/android/internal/telephony/ExtCallManager.java
@@ -74,6 +74,10 @@ public class ExtCallManager extends CallManager {
// taken on this sub.
private static int mActiveSub = 0;
+ // Holds the subscription on which call is active (non-LCH).
+ // When no subscription has active call (non-LCH), it holds INVALID_SUBSCRIPTION.
+ private static int mSubInConversation = MSimConstants.INVALID_SUBSCRIPTION;
+
// Holds the LCH status of subscription
private enum LchState {
INACTIVE,
@@ -255,6 +259,19 @@ public class ExtCallManager extends CallManager {
}
@Override
+ public void setSubInConversation(int subscription) {
+ Rlog.d(LOG_TAG, "setSubInConversation existing:" + mSubInConversation + " new:"
+ + subscription);
+ mSubInConversation = subscription;
+ }
+
+ @Override
+ public int getSubInConversation() {
+ if (VDBG) Rlog.d(LOG_TAG, "getSubInConversation = " + mSubInConversation);
+ return mSubInConversation;
+ }
+
+ @Override
public boolean getLocalCallHoldStatus(int subscription) {
boolean status = false;
@@ -273,7 +290,7 @@ public class ExtCallManager extends CallManager {
* @param sub to be updated
* @param reserveLchState true to retain the previous lch state; otherwise false
*/
- private void updateLchStatus(int sub, boolean reserveLchState) {
+ private void updateLchStatus(int sub) {
LchState lchStatus = LchState.INACTIVE;
Phone offHookPhone = getFgPhone(sub);
Call call = offHookPhone.getForegroundCall();
@@ -288,13 +305,10 @@ public class ExtCallManager extends CallManager {
if ((state == Call.State.ACTIVE) || (state == Call.State.DIALING) ||
(state == Call.State.HOLDING) || (state == Call.State.ALERTING)) {
- if (sub != getActiveSubscription()) {
- // if sub is not an active sub and if it has an active
+ if (sub != getSubInConversation()) {
+ // if sub is not conversation sub and if it has an active
// voice call then update lchStatus as Active
lchStatus = LchState.ACTIVE;
- } else if (reserveLchState == true){
- // otherwise don't change the lch status unless we really want to
- lchStatus = mLchStatus[sub];
}
}
// Update state only if the new state is different
@@ -307,17 +321,6 @@ public class ExtCallManager extends CallManager {
}
}
- private void updateLchStatus(int sub) {
- // set reserveLchState to true to reserve the lch state
- updateLchStatus(sub, true);
- }
-
- @Override
- public void deactivateLchState(int sub) {
- Rlog.d(LOG_TAG, "Deactivating Sub" + sub + "'s Lch state.");
- updateLchStatus(sub, false);
- }
-
@Override
public void setAudioMode() {
if (VDBG) Rlog.d(LOG_TAG, "in setAudioMode State = " + getState());
@@ -503,6 +506,7 @@ public class ExtCallManager extends CallManager {
@Override
public void acceptCall(Call ringingCall, int callType) throws CallStateException {
+ setSubInConversation(ringingCall.getPhone().getSubscription());
updateLchOnOtherSub(ringingCall.getPhone().getSubscription());
super.acceptCall(ringingCall, callType);
}
@@ -556,6 +560,7 @@ public class ExtCallManager extends CallManager {
}
}
+ setSubInConversation(subscription);
updateLchOnOtherSub(subscription);
if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {