diff options
author | Chiao Cheng <chiaocheng@google.com> | 2013-09-13 21:30:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-09-13 21:30:03 +0000 |
commit | 1dbfc0f5f3d298c7fed175b25fffe2e9757b7160 (patch) | |
tree | 568829b3dcbee43d1f7f9533596a857ea40c977a | |
parent | 02ade580384ccd853b6a9909aa0b4423fada84df (diff) | |
parent | 7dac444afe26abaec15dfbe55a1548f785ad2521 (diff) |
Merge "Fix NullPointerException." into klp-dev
-rw-r--r-- | InCallUI/src/com/android/incallui/StatusBarNotifier.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java index ad1a67e77..bdbb1253d 100644 --- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java +++ b/InCallUI/src/com/android/incallui/StatusBarNotifier.java @@ -461,6 +461,14 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener, * Returns true if notification should not be shown in the current state. */ private boolean shouldSuppressNotification(InCallState state, Call call) { + + // We can still be in the INCALL state when a call is disconnected (in order to show + // the "Call ended" screen. So check that we have an active connection too. + if (call == null) { + Log.v(this, "suppressing: no call"); + return true; + } + // Suppress the in-call notification if the InCallScreen is the // foreground activity, since it's already obvious that you're on a // call. (The status bar icon is needed only if you navigate *away* @@ -473,13 +481,6 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener, shouldSuppress = true; } - // We can still be in the INCALL state when a call is disconnected (in order to show - // the "Call ended" screen. So check that we have an active connection too. - if (call == null) { - Log.v(this, "suppressing: no call"); - shouldSuppress = true; - } - // If there's an incoming ringing call: always show the // notification, since the in-call notification is what actually // launches the incoming call UI in the first place (see |