summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2013-09-16 13:34:46 -0700
committerSantos Cordon <santoscordon@google.com>2013-09-17 17:12:28 +0000
commite0f4789b09bb94af923e6a8365ce5e8a50fb9652 (patch)
tree3d8860c51e674e2139c1a52747fac0416f747658
parent812c0e88d5d86c29e4942f9a1010a95cce789657 (diff)
Allow bringToForeground to work even after activity is destroyed
bug:10550460 Change-Id: I63d8b13c423c198603768e17a1ef15bbbb4c7705
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index bfff83fe5..7f15ba979 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -60,7 +60,7 @@ public class InCallPresenter implements CallList.Listener {
* in-call session (e.g., StatusBarNotifier). This gets reset when the session ends in the
* tear-down method.
*/
- private boolean mActivityPreviouslyStarted = false;
+ private boolean mIsActivityPreviouslyStarted = false;
public static synchronized InCallPresenter getInstance() {
if (sInCallPresenter == null) {
@@ -295,7 +295,7 @@ public class InCallPresenter implements CallList.Listener {
}
public boolean isActivityPreviouslyStarted() {
- return mActivityPreviouslyStarted;
+ return mIsActivityPreviouslyStarted;
}
/**
@@ -313,7 +313,7 @@ public class InCallPresenter implements CallList.Listener {
}
if (showing) {
- mActivityPreviouslyStarted = true;
+ mIsActivityPreviouslyStarted = true;
}
}
@@ -322,11 +322,10 @@ public class InCallPresenter implements CallList.Listener {
*/
public void bringToForeground(boolean showDialpad) {
// Before we bring the incall UI to the foreground, we check to see if:
- // 1. there is an activity
- // 2. the activity is not already in the foreground
+ // 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 (isActivityStarted() &&
- !isShowingInCallUi() &&
+ if (mIsActivityPreviouslyStarted && !isShowingInCallUi() &&
mInCallState != InCallState.NO_CALLS) {
showInCall(showDialpad);
}
@@ -427,7 +426,7 @@ public class InCallPresenter implements CallList.Listener {
Log.i(this, "attemptCleanup? " + shouldCleanup);
if (shouldCleanup) {
- mActivityPreviouslyStarted = false;
+ mIsActivityPreviouslyStarted = false;
// blow away stale contact info so that we get fresh data on
// the next set of calls