summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2013-08-29 22:29:47 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-29 22:29:48 +0000
commit55b990cc582b77cc7f778ee7459e750e35de2d67 (patch)
treebba73c052e16438406d8dd7adf9a0f0382798439 /InCallUI
parent99728aa60960209f0bbbc5bae5880e639e10520c (diff)
parent21017574bf99db38d739ae5dd81711a56cd1756c (diff)
Merge "Allow new call waiting calls to pop up when not in foreground." into klp-dev
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java8
-rw-r--r--InCallUI/src/com/android/incallui/StatusBarNotifier.java13
2 files changed, 11 insertions, 10 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index ff2c8d4d0..cc4cee277 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -269,7 +269,7 @@ public class InCallPresenter implements CallList.Listener {
* the UI needs to be started or finished depending on the new state and does it.
*/
private InCallState startOrFinishUi(InCallState newState) {
- Log.d(this, "startOrFinishUi: " + newState.toString());
+ Log.d(this, "startOrFinishUi: " + mInCallState + " -> " + newState);
// TODO(klp): Consider a proper state machine implementation
@@ -302,10 +302,8 @@ public class InCallPresenter implements CallList.Listener {
// [ AND NOW YOU'RE IN THE CALL. voila! ]
//
// Our app is started using a fullScreen notification. We need to do this whenever
- // we get an incoming call or if this is the first time we are displaying (the previous
- // state was HIDDEN).
- final boolean startStartupSequence = (InCallState.INCOMING == newState ||
- InCallState.HIDDEN == mInCallState);
+ // we get an incoming call.
+ final boolean startStartupSequence = (InCallState.INCOMING == newState);
// A new outgoing call indicates that the user just now dialed a number and when that
// happens we need to display the screen immediateley.
diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
index 1f9951ff5..658eac950 100644
--- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java
+++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java
@@ -69,6 +69,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
*/
@Override
public void onStateChange(InCallState state, CallList callList) {
+ Log.d(this, "onStateChange");
updateNotification(state, callList);
}
@@ -108,6 +109,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
* (Use updateNotificationAndLaunchIncomingCallUi() for that.)
*/
public void updateNotification(InCallState state, CallList callList) {
+ Log.d(this, "updateNotification");
// allowFullScreenIntent=false means *don't* allow the incoming
// call UI to be launched.
updateInCallNotification(false, state, callList);
@@ -182,6 +184,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
final Call call = getCallToShow(callList);
if (shouldSuppressNotification(state, call)) {
+ Log.d(this, "Suppressing notification");
cancelInCall();
return;
}
@@ -224,7 +227,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
// Set the intent as a full screen intent as well if requested
if (allowFullScreenIntent) {
- configureFullScreenIntent(builder, inCallPendingIntent);
+ configureFullScreenIntent(builder, inCallPendingIntent, call);
}
// set the content
@@ -385,7 +388,8 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
/**
* Adds fullscreen intent to the builder.
*/
- private void configureFullScreenIntent(Notification.Builder builder, PendingIntent intent) {
+ private void configureFullScreenIntent(Notification.Builder builder, PendingIntent intent,
+ Call call) {
// Ok, we actually want to launch the incoming call
// UI at this point (in addition to simply posting a notification
// to the status bar). Setting fullScreenIntent will cause
@@ -415,14 +419,13 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener,
// TODO: there should be a cleaner way of avoiding this
// problem (see discussion in bug 3184149.)
- // TODO(klp): reenable this for klp
- /*if (incomingCall.getState() == Call.State.CALL_WAITING) {
+ if (call.getState() == Call.State.CALL_WAITING) {
Log.i(this, "updateInCallNotification: call-waiting! force relaunch...");
// Cancel the IN_CALL_NOTIFICATION immediately before
// (re)posting it; this seems to force the
// NotificationManager to launch the fullScreenIntent.
mNotificationManager.cancel(IN_CALL_NOTIFICATION);
- }*/
+ }
}
private Notification.Builder getNotificationBuilder() {