summaryrefslogtreecommitdiffstats
path: root/src/com/android/incallui/InCallPresenter.java
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
commit120c3547957d69fa938de4510078b99c381e5153 (patch)
tree3480496dc2c0df96ccb088a3415a105129e1131a /src/com/android/incallui/InCallPresenter.java
parent625ac576cb403744ef0baeba8e8993da963461ee (diff)
downloadpackages_apps_InCallUI-120c3547957d69fa938de4510078b99c381e5153.tar.gz
packages_apps_InCallUI-120c3547957d69fa938de4510078b99c381e5153.tar.bz2
packages_apps_InCallUI-120c3547957d69fa938de4510078b99c381e5153.zip
Allow bringToForeground to work even after activity is destroyed
bug:10550460 Change-Id: I63d8b13c423c198603768e17a1ef15bbbb4c7705
Diffstat (limited to 'src/com/android/incallui/InCallPresenter.java')
-rw-r--r--src/com/android/incallui/InCallPresenter.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/com/android/incallui/InCallPresenter.java b/src/com/android/incallui/InCallPresenter.java
index bfff83fe..7f15ba97 100644
--- a/src/com/android/incallui/InCallPresenter.java
+++ b/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