summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorChristine Chen <christinech@google.com>2013-09-10 16:10:23 -0700
committerChristine Chen <christinech@google.com>2013-09-10 17:48:26 -0700
commitf05f341d8bf54a1052129a741cb6e2b4c2ff8ac8 (patch)
tree0c47a8214e17fb28ab027f78604a9a3e91a31bad /InCallUI
parenta060bb9eac9ea333b4a3e3ff46631b578b9cd6ef (diff)
Adds onUiReady and onUiUnready to the presenter
- ConferenceManagerPresenter needs these two functions to listen to CallList changes. - Moves super.onUiUnready() to the top of the onUiUnready methods for both the AnswerPresenter and ConferenceManagerPresenter classes. Bug: 10696097 Change-Id: I050071f10ebe5112d9d41192ea8c78593189bd9b
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/AnswerPresenter.java1
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonPresenter.java5
-rw-r--r--InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java16
3 files changed, 18 insertions, 4 deletions
diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java
index e8bcc99c1..e820929a0 100644
--- a/InCallUI/src/com/android/incallui/AnswerPresenter.java
+++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java
@@ -56,7 +56,6 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
if (mCallId != Call.INVALID_CALL_ID) {
CallList.getInstance().removeCallUpdateListener(mCallId, this);
}
-
}
@Override
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index f14d851a7..ec8e84471 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -50,13 +50,12 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
@Override
public void onUiUnready(CallButtonUi ui) {
+ super.onUiUnready(ui);
+
InCallPresenter.getInstance().removeListener(this);
AudioModeProvider.getInstance().removeListener(this);
mProximitySensor = null;
-
- // set Ui to null, so should go last
- super.onUiUnready(ui);
}
@Override
diff --git a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
index ccda4a579..041614db6 100644
--- a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
+++ b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
@@ -39,8 +39,24 @@ public class ConferenceManagerPresenter
private Context mContext;
@Override
+ public void onUiReady(ConferenceManagerUi ui) {
+ super.onUiReady(ui);
+
+ // register for call state changes last
+ InCallPresenter.getInstance().addListener(this);
+ }
+
+ @Override
+ public void onUiUnready(ConferenceManagerUi ui) {
+ super.onUiUnready(ui);
+
+ InCallPresenter.getInstance().removeListener(this);
+ }
+
+ @Override
public void onStateChange(InCallState state, CallList callList) {
if (getUi().isFragmentVisible()) {
+ Log.v(this, "onStateChange" + state);
if (state == InCallState.INCALL && callList.getActiveOrBackgroundCall() != null &&
callList.getActiveOrBackgroundCall().isConferenceCall()) {
Log.v(this, "Number of existing calls is " +