From e64eaa9727e2eecafb3d4d67eff6ae61c43535bd Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Fri, 26 Sep 2014 16:52:21 -0700 Subject: Fix for not being able to return to InCallUI after accepting call via BT No longer require that the activity was previously started for bringToForeground to work. That check seemed to be unnecessary and was causing problems in the case when the UI hadn't been shown previously (e.g. accepting a call via BT). Tested with the following scenarios: 1) Accepting an incoming call HUN via finger 2) Returning to in-call screen via dialer after accepting HUN via BT 3) Returning to in-call screen via lock screen after accepting HUN via BT 4) Returning to in-call screen via notification after accepting HUn via BT 5) Accepting a full screen call via BT 6) Receiving call waiting 7) Adding a new call 8) Conference calls Bug: 17654200 Change-Id: I4886c9a611a71fd04eeb154960293f6b1494b4b2 --- InCallUI/src/com/android/incallui/InCallPresenter.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java index a51aa9169..1eb7c8792 100644 --- a/InCallUI/src/com/android/incallui/InCallPresenter.java +++ b/InCallUI/src/com/android/incallui/InCallPresenter.java @@ -629,11 +629,13 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener { */ public void bringToForeground(boolean showDialpad) { // Before we bring the incall UI to the foreground, we check to see if: - // 1. We've already started the activity once for this session - // 2. If it exists, the activity is not already in the foreground - // 3. We are in a state where we want to show the incall ui - if (mIsActivityPreviouslyStarted && !isShowingInCallUi() && - mInCallState != InCallState.NO_CALLS) { + // 1. It is not currently in the foreground + // 2. We are in a state where we want to show the incall ui (i.e. there are calls to + // be displayed) + // If the activity hadn't actually been started previously, yet there are still calls + // present (e.g. a call was accepted by a bluetooth or wired headset), we want to + // bring it up the UI regardless. + if (!isShowingInCallUi() && mInCallState != InCallState.NO_CALLS) { showInCall(showDialpad, false /* newOutgoingCall */); } } -- cgit v1.2.3