diff options
author | Santos Cordon <santoscordon@google.com> | 2013-08-29 02:43:56 -0700 |
---|---|---|
committer | Santos Cordon <santoscordon@google.com> | 2013-08-29 02:43:56 -0700 |
commit | 21017574bf99db38d739ae5dd81711a56cd1756c (patch) | |
tree | bd4d95a9c8a7a6b423e1d9399e77242d2201f063 /InCallUI/src/com/android/incallui/StatusBarNotifier.java | |
parent | facff288cfbdfcfd9281a64fa05a78532acf3d90 (diff) |
Allow new call waiting calls to pop up when not in foreground.
Added some additional debug logging.
Allow full-screen startup sequence to happen with any transition
to IN_CALL state, not just from a HIDDEN state.
(e.g., from IN_CALL -> INCOMING)
And for the grand finale, uncomment the code that would have made
this work from the beginning. :P
bug:10396126
Change-Id: Id34805941b75b28d4876153bb1bf0305142fc4cd
Diffstat (limited to 'InCallUI/src/com/android/incallui/StatusBarNotifier.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/StatusBarNotifier.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java index f8289c90b..b1af4f0e3 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); } @@ -102,6 +103,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); @@ -176,6 +178,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener, final Call call = getCallToShow(callList); if (shouldSuppressNotification(state, call)) { + Log.d(this, "Suppressing notification"); cancelInCall(); return; } @@ -222,7 +225,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 @@ -383,7 +386,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 @@ -413,14 +417,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() { |