set notification channel to low priority

This commit is contained in:
Kyle Spearrin 2017-11-21 17:52:23 -05:00
parent 1fafc29ec3
commit b48e8eeb0e

View file

@ -347,12 +347,12 @@ namespace Bit.Android
var pendingIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.UpdateCurrent); var pendingIntent = PendingIntent.GetActivity(this, 0, intent, PendingIntentFlags.UpdateCurrent);
var notificationContent = Build.VERSION.SdkInt > BuildVersionCodes.KitkatWatch ? var notificationContent = Build.VERSION.SdkInt > BuildVersionCodes.KitkatWatch ?
App.Resources.AppResources.BitwardenAutofillServiceNotificationContent : AppResources.BitwardenAutofillServiceNotificationContent :
App.Resources.AppResources.BitwardenAutofillServiceNotificationContentOld; AppResources.BitwardenAutofillServiceNotificationContentOld;
var builder = new Notification.Builder(this); var builder = new Notification.Builder(this);
builder.SetSmallIcon(Resource.Drawable.notification_sm) builder.SetSmallIcon(Resource.Drawable.notification_sm)
.SetContentTitle(App.Resources.AppResources.BitwardenAutofillService) .SetContentTitle(AppResources.BitwardenAutofillService)
.SetContentText(notificationContent) .SetContentText(notificationContent)
.SetTicker(notificationContent) .SetTicker(notificationContent)
.SetWhen(now) .SetWhen(now)
@ -370,7 +370,7 @@ namespace Bit.Android
if(_notificationChannel == null) if(_notificationChannel == null)
{ {
_notificationChannel = new NotificationChannel("bitwarden_autofill_service", _notificationChannel = new NotificationChannel("bitwarden_autofill_service",
AppResources.BitwardenAutofillService, NotificationImportance.Default); AppResources.AutofillService, NotificationImportance.Low);
notificationManager.CreateNotificationChannel(_notificationChannel); notificationManager.CreateNotificationChannel(_notificationChannel);
} }
builder.SetChannelId(_notificationChannel.Id); builder.SetChannelId(_notificationChannel.Id);