summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-07-10 17:14:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-10 17:14:29 +0000
commitcf283bba3ec5b831275b3d48939e7afa1563cbf9 (patch)
tree52e694c3229e5e75835e536a1136039fbeb87d89
parent4047eeeff9e898aebd8f0434dc6cd10b812ee809 (diff)
parentb60d1c1ddbf5a0ba0d121d7691a0d84f96ad939d (diff)
am b64e028d: am 02c8a447: am 3841184b: am c061fd29: Merge "Fix for glowpad not showing when dialing out + call waiting" into mnc-dev
* commit 'b64e028d49620bfec1ed13c9c44db81476477bbd': Fix for glowpad not showing when dialing out + call waiting
-rw-r--r--InCallUI/src/com/android/incallui/AnswerPresenter.java24
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java5
2 files changed, 14 insertions, 15 deletions
diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java
index 950db3912..1453fa517 100644
--- a/InCallUI/src/com/android/incallui/AnswerPresenter.java
+++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java
@@ -71,18 +71,16 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
@Override
public void onIncomingCall(InCallState oldState, InCallState newState, Call call) {
Log.d(this, "onIncomingCall: " + this);
- if (getUi() != null) {
- Call modifyCall = CallList.getInstance().getVideoUpgradeRequestCall();
- if (modifyCall != null) {
- showAnswerUi(false);
- Log.d(this, "declining upgrade request id: ");
- CallList.getInstance().removeCallUpdateListener(mCallId, this);
- InCallPresenter.getInstance().declineUpgradeRequest(getUi().getContext());
- }
- if (!call.getId().equals(mCallId)) {
- // A new call is coming in.
- processIncomingCall(call);
- }
+ Call modifyCall = CallList.getInstance().getVideoUpgradeRequestCall();
+ if (modifyCall != null) {
+ showAnswerUi(false);
+ Log.d(this, "declining upgrade request id: ");
+ CallList.getInstance().removeCallUpdateListener(mCallId, this);
+ InCallPresenter.getInstance().declineUpgradeRequest(getUi().getContext());
+ }
+ if (!call.getId().equals(mCallId)) {
+ // A new call is coming in.
+ processIncomingCall(call);
}
}
@@ -98,7 +96,7 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
public void onDisconnect(Call call) {
// no-op
}
-
+
public void onSessionModificationStateChange(int sessionModificationState) {
boolean isUpgradePending = sessionModificationState ==
Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST;
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index 236129637..ff1a50fcb 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -219,6 +219,9 @@ public class InCallPresenter implements CallList.Listener,
mProximitySensor = proximitySensor;
addListener(mProximitySensor);
+ addIncomingCallListener(mAnswerPresenter);
+ addInCallUiListener(mAnswerPresenter);
+
mCallList = callList;
// This only gets called by the service so this is okay.
@@ -1556,8 +1559,6 @@ public class InCallPresenter implements CallList.Listener,
* Private constructor. Must use getInstance() to get this singleton.
*/
private InCallPresenter() {
- addIncomingCallListener(mAnswerPresenter);
- addInCallUiListener(mAnswerPresenter);
}
/**