From 8369df095a73a77b3715f8ae7ba06089cebca4ce Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Wed, 3 May 2017 10:27:13 -0700 Subject: 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 --- java/com/android/incallui/StatusBarNotifier.java | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'java/com/android/incallui/StatusBarNotifier.java') 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( -- cgit v1.2.3