Removed large icon
Closes #2541. We do not need the same icon twice. As the icon is displayed white-on-white, it is not visible anyways. This also gives more space to the notification text
This commit is contained in:
parent
287bb5f7e1
commit
6e5b639608
|
@ -339,12 +339,9 @@ public class DownloadService extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupNotificationBuilders() {
|
private void setupNotificationBuilders() {
|
||||||
Bitmap icon = BitmapFactory.decodeResource(getResources(), R.drawable.stat_notify_sync);
|
|
||||||
|
|
||||||
notificationCompatBuilder = new NotificationCompat.Builder(this)
|
notificationCompatBuilder = new NotificationCompat.Builder(this)
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.setContentIntent(ClientConfig.downloadServiceCallbacks.getNotificationContentIntent(this))
|
.setContentIntent(ClientConfig.downloadServiceCallbacks.getNotificationContentIntent(this))
|
||||||
.setLargeIcon(icon)
|
|
||||||
.setSmallIcon(R.drawable.stat_notify_sync);
|
.setSmallIcon(R.drawable.stat_notify_sync);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
notificationCompatBuilder.setVisibility(Notification.VISIBILITY_PUBLIC);
|
notificationCompatBuilder.setVisibility(Notification.VISIBILITY_PUBLIC);
|
||||||
|
@ -511,10 +508,6 @@ public class DownloadService extends Service {
|
||||||
successfulDownloads, failedDownloads)
|
successfulDownloads, failedDownloads)
|
||||||
)
|
)
|
||||||
.setSmallIcon(R.drawable.stat_notify_sync_error)
|
.setSmallIcon(R.drawable.stat_notify_sync_error)
|
||||||
.setLargeIcon(
|
|
||||||
BitmapFactory.decodeResource(getResources(),
|
|
||||||
R.drawable.stat_notify_sync_error)
|
|
||||||
)
|
|
||||||
.setContentIntent(
|
.setContentIntent(
|
||||||
ClientConfig.downloadServiceCallbacks.getReportNotificationContentIntent(this)
|
ClientConfig.downloadServiceCallbacks.getReportNotificationContentIntent(this)
|
||||||
)
|
)
|
||||||
|
@ -565,7 +558,6 @@ public class DownloadService extends Service {
|
||||||
.setStyle(new NotificationCompat.BigTextStyle().bigText(getText(R.string.authentication_notification_msg)
|
.setStyle(new NotificationCompat.BigTextStyle().bigText(getText(R.string.authentication_notification_msg)
|
||||||
+ ": " + resourceTitle))
|
+ ": " + resourceTitle))
|
||||||
.setSmallIcon(R.drawable.ic_stat_authentication)
|
.setSmallIcon(R.drawable.ic_stat_authentication)
|
||||||
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_stat_authentication))
|
|
||||||
.setAutoCancel(true)
|
.setAutoCancel(true)
|
||||||
.setContentIntent(ClientConfig.downloadServiceCallbacks.getAuthentificationNotificationContentIntent(DownloadService.this, downloadRequest));
|
.setContentIntent(ClientConfig.downloadServiceCallbacks.getAuthentificationNotificationContentIntent(DownloadService.this, downloadRequest));
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
|
Loading…
Reference in New Issue