summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMick Lin <Mick.Lin@mediatek.com>2015-01-09 09:07:07 +0800
committerleozwang <leozwang@google.com>2015-01-09 11:20:21 -0800
commit6cf8e8bf4e197d533c8b4ac9f177ff4252062637 (patch)
tree088e77784643a22c4babc3c3bb98683489f80852
parente9a89b276628770d80bbd7d92cc6b38b1384e3a8 (diff)
[DS] Fix a bug about Sip incoming call screen do not show.
For buganizer #18847828 Dismiss the conference management screen when call incoming. Change-Id: I470d059ae69a5a54b54de6be12b4fe335c23b8f1
-rw-r--r--InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
index bef4ef30a..86fc18ff3 100644
--- a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
+++ b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
@@ -21,6 +21,7 @@ import android.content.Context;
import com.android.incallui.InCallPresenter.InCallDetailsListener;
import com.android.incallui.InCallPresenter.InCallState;
import com.android.incallui.InCallPresenter.InCallStateListener;
+import com.android.incallui.InCallPresenter.IncomingCallListener;
import com.google.common.base.Preconditions;
@@ -32,7 +33,7 @@ import java.util.List;
*/
public class ConferenceManagerPresenter
extends Presenter<ConferenceManagerPresenter.ConferenceManagerUi>
- implements InCallStateListener, InCallDetailsListener {
+ implements InCallStateListener, InCallDetailsListener, IncomingCallListener {
private Context mContext;
@@ -42,6 +43,7 @@ public class ConferenceManagerPresenter
// register for call state changes last
InCallPresenter.getInstance().addListener(this);
+ InCallPresenter.getInstance().addIncomingCallListener(this);
}
@Override
@@ -49,6 +51,7 @@ public class ConferenceManagerPresenter
super.onUiUnready(ui);
InCallPresenter.getInstance().removeListener(this);
+ InCallPresenter.getInstance().removeIncomingCallListener(this);
}
@Override
@@ -90,6 +93,15 @@ public class ConferenceManagerPresenter
}
}
+ @Override
+ public void onIncomingCall(InCallState oldState, InCallState newState, Call call) {
+ // When incoming call exists, set conference ui invisible.
+ if (getUi().isFragmentVisible()) {
+ Log.d(this, "onIncomingCall()... Conference ui is showing, hide it.");
+ InCallPresenter.getInstance().showConferenceCallManager(false);
+ }
+ }
+
public void init(Context context, CallList callList) {
mContext = Preconditions.checkNotNull(context);
mContext = context;