summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-09-26 16:52:21 -0700
committerYorke Lee <yorkelee@google.com>2014-09-26 16:55:13 -0700
commite64eaa9727e2eecafb3d4d67eff6ae61c43535bd (patch)
treed5b9e04b0f26a51d3836294c31b6caf89fb2d260 /InCallUI
parent9b75781430dbc6edaf223676fccc570b931cd7c2 (diff)
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
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java12
1 files 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 */);
}
}