summaryrefslogtreecommitdiffstats
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
commit3a8eaf2d4872b73624a654e3da219728d1811e54 (patch)
tree4ae0c5d7e60b79c8577870b93747aed4e9ca3bea
parent25c3e808b91061e71d4cb1d1eccb0bc6beeb93a7 (diff)
downloadpackages_apps_InCallUI-3a8eaf2d4872b73624a654e3da219728d1811e54.tar.gz
packages_apps_InCallUI-3a8eaf2d4872b73624a654e3da219728d1811e54.tar.bz2
packages_apps_InCallUI-3a8eaf2d4872b73624a654e3da219728d1811e54.zip
[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--src/com/android/incallui/ConferenceManagerPresenter.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/com/android/incallui/ConferenceManagerPresenter.java b/src/com/android/incallui/ConferenceManagerPresenter.java
index bef4ef30..86fc18ff 100644
--- a/src/com/android/incallui/ConferenceManagerPresenter.java
+++ b/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;