summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2013-09-18 22:06:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-09-18 22:06:38 +0000
commit715422b7fbfde59981a7e8421c86be14ad88f786 (patch)
treedb35bae054458f212eb19711fbe12b790d453835 /InCallUI
parent0d4591e41a2a172381aeddc73d20a812db13a4ac (diff)
parente0f4789b09bb94af923e6a8365ce5e8a50fb9652 (diff)
Merge "Allow bringToForeground to work even after activity is destroyed" into klp-dev
Diffstat (limited to 'InCallUI')
-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 9267d1085..8c52aab2c 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