Merge "Show call ended if call disconnects while dialpad is showing" into klp-dev
diff --git a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
index 041614d..d0f62d7 100644
--- a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
+++ b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
@@ -21,6 +21,7 @@
import com.android.incallui.ContactInfoCache.ContactCacheEntry;
import com.android.incallui.InCallPresenter.InCallState;
import com.android.incallui.InCallPresenter.InCallStateListener;
+import com.android.services.telephony.common.Call;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSortedSet;
@@ -57,11 +58,13 @@
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 " +
- String.valueOf(callList.getActiveCall().getChildCallIds().size()));
- update(callList);
+ if (state == InCallState.INCALL) {
+ final Call call = callList.getActiveOrBackgroundCall();
+ if (call != null && call.isConferenceCall()) {
+ Log.v(this, "Number of existing calls is " +
+ String.valueOf(call.getChildCallIds().size()));
+ update(callList);
+ }
} else {
getUi().setVisible(false);
}