summaryrefslogtreecommitdiff
path: root/java/com/android/incallui/StatusBarNotifier.java
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-05-03 10:27:13 -0700
committerEric Erfanian <erfanian@google.com>2017-05-03 12:01:21 -0700
commit8369df095a73a77b3715f8ae7ba06089cebca4ce (patch)
tree1a45d60921e293c6088efeaf4d9c408456f3e0e2 /java/com/android/incallui/StatusBarNotifier.java
parentafa29d4a8659eeffc8d92a6216b154f594eeb895 (diff)
This change reflects the Dialer V10 RC00 branch.
RC00 is based on: branch: dialer-android_release_branch/153304843.1 synced to: 153304843 following the instructions at go/dialer-aosp-release. In this release: * Removes final apache sources. * Uses native lite compilation. More drops will follow with subsequent release candidates until we reach our final v10 release, in cadence with our prebuilt drops. Test: TreeHugger, on device Change-Id: Ic9684057230f9b579c777820c746cd21bf45ec0f
Diffstat (limited to 'java/com/android/incallui/StatusBarNotifier.java')
-rw-r--r--java/com/android/incallui/StatusBarNotifier.java24
1 files changed, 10 insertions, 14 deletions
diff --git a/java/com/android/incallui/StatusBarNotifier.java b/java/com/android/incallui/StatusBarNotifier.java
index 405eede34..a6a81c6ef 100644
--- a/java/com/android/incallui/StatusBarNotifier.java
+++ b/java/com/android/incallui/StatusBarNotifier.java
@@ -119,7 +119,6 @@ public class StatusBarNotifier
private String mSavedContentTitle;
private Uri mRingtone;
private StatusBarCallListener mStatusBarCallListener;
- private boolean mShowFullScreenIntent;
public StatusBarNotifier(@NonNull Context context, @NonNull ContactInfoCache contactInfoCache) {
Objects.requireNonNull(context);
@@ -224,7 +223,7 @@ public class StatusBarNotifier
setStatusBarCallListener(null);
}
if (mCurrentNotification != NOTIFICATION_NONE) {
- LogUtil.d("StatusBarNotifier.cancelNotification", "cancel");
+ LogUtil.i("StatusBarNotifier.cancelNotification", "cancel");
mNotificationManager.cancel(mCurrentNotification);
}
mCurrentNotification = NOTIFICATION_NONE;
@@ -324,8 +323,7 @@ public class StatusBarNotifier
contentTitle,
callState,
notificationType,
- contactInfo.contactRingtoneUri,
- InCallPresenter.getInstance().shouldShowFullScreenNotification())) {
+ contactInfo.contactRingtoneUri)) {
return;
}
@@ -361,10 +359,8 @@ public class StatusBarNotifier
if (notificationType == NOTIFICATION_INCOMING_CALL) {
NotificationChannelManager.applyChannel(
builder, mContext, Channel.INCOMING_CALL, accountHandle);
- if (InCallPresenter.getInstance().shouldShowFullScreenNotification()) {
- configureFullScreenIntent(
- builder, createLaunchPendingIntent(true /* isFullScreen */), callList, call);
- }
+ configureFullScreenIntent(
+ builder, createLaunchPendingIntent(true /* isFullScreen */), callList, call);
// Set the notification category and bump the priority for incoming calls
builder.setCategory(Notification.CATEGORY_CALL);
builder.setPriority(Notification.PRIORITY_MAX);
@@ -501,8 +497,7 @@ public class StatusBarNotifier
String contentTitle,
int state,
int notificationType,
- Uri ringtone,
- boolean showFullScreenIntent) {
+ Uri ringtone) {
// The two are different:
// if new title is not null, it should be different from saved version OR
@@ -511,15 +506,17 @@ public class StatusBarNotifier
(contentTitle != null && !contentTitle.equals(mSavedContentTitle))
|| (contentTitle == null && mSavedContentTitle != null);
+ boolean largeIconChanged =
+ mSavedLargeIcon == null ? largeIcon != null : !mSavedLargeIcon.sameAs(largeIcon);
+
// any change means we are definitely updating
boolean retval =
(mSavedIcon != icon)
|| !Objects.equals(mSavedContent, content)
|| (mCallState != state)
- || (mSavedLargeIcon != largeIcon)
+ || largeIconChanged
|| contentTitleChanged
- || !Objects.equals(mRingtone, ringtone)
- || mShowFullScreenIntent != showFullScreenIntent;
+ || !Objects.equals(mRingtone, ringtone);
// If we aren't showing a notification right now or the notification type is changing,
// definitely do an update.
@@ -537,7 +534,6 @@ public class StatusBarNotifier
mSavedLargeIcon = largeIcon;
mSavedContentTitle = contentTitle;
mRingtone = ringtone;
- mShowFullScreenIntent = showFullScreenIntent;
if (retval) {
LogUtil.d(