summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/incallui/CallCardPresenter.java10
-rw-r--r--src/com/android/incallui/StatusBarNotifier.java4
-rw-r--r--src/com/android/incallui/VideoCallFragment.java22
3 files changed, 16 insertions, 20 deletions
diff --git a/src/com/android/incallui/CallCardPresenter.java b/src/com/android/incallui/CallCardPresenter.java
index 1c5ea6b8..39678611 100644
--- a/src/com/android/incallui/CallCardPresenter.java
+++ b/src/com/android/incallui/CallCardPresenter.java
@@ -217,7 +217,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
maybeStartSearch(mPrimary, true);
mPrimary.setSessionModificationState(Call.SessionModificationState.NO_REQUEST);
} else if (primaryForwardedChanged && mPrimary != null) {
- updatePrimaryDisplayInfo(mPrimaryContactInfo, isConference(mPrimary));
+ updatePrimaryDisplayInfo();
}
if (mSecondary == null) {
@@ -527,7 +527,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
null /* number */,
getConferenceString(mPrimary),
false /* nameIsNumber */,
- isForwarded,
+ isForwarded(mPrimary),
null /* label */,
getConferencePhoto(mPrimary),
false /* isSipCall */,
@@ -571,7 +571,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
return number;
}
- private boolean isCDMAPhone(long subscription) {
+ private boolean isCDMAPhone(int subscription) {
boolean isCDMA = false;
int phoneType = TelephonyManager.getDefault().isMultiSimEnabled()
? TelephonyManager.getDefault().getCurrentPhoneType(subscription)
@@ -582,7 +582,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
return isCDMA;
}
- private boolean isRoaming(long subscription) {
+ private boolean isRoaming(int subscription) {
if (TelephonyManager.getDefault().isMultiSimEnabled()) {
return TelephonyManager.getDefault().isNetworkRoaming(subscription);
} else {
@@ -867,7 +867,7 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
boolean isManageConferenceVisible();
}
- public long getActiveSubscription() {
+ public int getActiveSubscription() {
return SubscriptionManager.getDefaultSubId();
}
}
diff --git a/src/com/android/incallui/StatusBarNotifier.java b/src/com/android/incallui/StatusBarNotifier.java
index be5d7c3e..ca76d235 100644
--- a/src/com/android/incallui/StatusBarNotifier.java
+++ b/src/com/android/incallui/StatusBarNotifier.java
@@ -308,9 +308,9 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener {
if (TelephonyManager.getDefault().isMultiSimEnabled()) {
SubscriptionManager mgr = SubscriptionManager.from(mContext);
- SubscriptionInfo subInfoRecord = mgr.getActiveSubscriptionInfo(call.subId);
+ SubscriptionInfo subInfoRecord = mgr.getActiveSubscriptionInfo(call.getSubId());
if (subInfoRecord != null) {
- builder.setSubText(subInfoRecord.displayName);
+ builder.setSubText(subInfoRecord.getDisplayName());
}
}
diff --git a/src/com/android/incallui/VideoCallFragment.java b/src/com/android/incallui/VideoCallFragment.java
index e50ead0a..04154e9c 100644
--- a/src/com/android/incallui/VideoCallFragment.java
+++ b/src/com/android/incallui/VideoCallFragment.java
@@ -23,6 +23,7 @@ import android.content.res.Configuration;
import android.graphics.Point;
import android.graphics.SurfaceTexture;
import android.os.Bundle;
+import android.text.TextUtils;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.Surface;
@@ -39,6 +40,7 @@ import android.telecom.Connection.VideoProvider;
import android.telecom.VideoProfile;
import android.telecom.Connection;
+import java.util.ArrayList;
/**
* Fragment containing video calling surfaces.
*/
@@ -720,32 +722,26 @@ public class VideoCallFragment extends BaseFragment<VideoCallPresenter,
}
final Resources resources = context.getResources();
-
- String callSubstateChangedText = "";
+ final ArrayList<String> texts = new ArrayList<String>();
if (isEnabled(Connection.CALL_SUBSTATE_AUDIO_CONNECTED_SUSPENDED, callSubstate)) {
- callSubstateChangedText +=
- resources.getString(R.string.call_substate_connected_suspended_audio);
+ texts.add(resources.getString(R.string.call_substate_connected_suspended_audio));
}
if (isEnabled(Connection.CALL_SUBSTATE_VIDEO_CONNECTED_SUSPENDED, callSubstate)) {
- callSubstateChangedText +=
- resources.getString(R.string.call_substate_connected_suspended_video);
+ texts.add(resources.getString(R.string.call_substate_connected_suspended_video));
}
if (isEnabled(Connection.CALL_SUBSTATE_AVP_RETRY, callSubstate)) {
- callSubstateChangedText +=
- resources.getString(R.string.call_substate_avp_retry);
+ texts.add(resources.getString(R.string.call_substate_avp_retry));
}
if (isNotEnabled(Connection.CALL_SUBSTATE_ALL, callSubstate)) {
- callSubstateChangedText = resources.getString(R.string.call_substate_call_resumed);
+ texts.add(resources.getString(R.string.call_substate_call_resumed));
}
- if (!callSubstateChangedText.isEmpty()) {
- String callSubstateLabelText = resources.getString(R.string.call_substate_label);
- Toast.makeText(context, callSubstateLabelText + callSubstateChangedText,
- Toast.LENGTH_SHORT).show();
+ if (!texts.isEmpty()) {
+ Toast.makeText(context, TextUtils.join("\n", texts), Toast.LENGTH_SHORT).show();
}
}