Merge pull request #2569 from ByteHamster/white-icon

Removed large icon from notification
This commit is contained in:
Martin Fietz 2018-03-18 10:19:20 +01:00 committed by GitHub
commit 6dbe772345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -339,12 +339,9 @@ public class DownloadService extends Service {
}
private void setupNotificationBuilders() {
Bitmap icon = BitmapFactory.decodeResource(getResources(), R.drawable.stat_notify_sync);
notificationCompatBuilder = new NotificationCompat.Builder(this)
.setOngoing(true)
.setContentIntent(ClientConfig.downloadServiceCallbacks.getNotificationContentIntent(this))
.setLargeIcon(icon)
.setSmallIcon(R.drawable.stat_notify_sync);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
notificationCompatBuilder.setVisibility(Notification.VISIBILITY_PUBLIC);
@ -511,10 +508,6 @@ public class DownloadService extends Service {
successfulDownloads, failedDownloads)
)
.setSmallIcon(R.drawable.stat_notify_sync_error)
.setLargeIcon(
BitmapFactory.decodeResource(getResources(),
R.drawable.stat_notify_sync_error)
)
.setContentIntent(
ClientConfig.downloadServiceCallbacks.getReportNotificationContentIntent(this)
)
@ -565,7 +558,6 @@ public class DownloadService extends Service {
.setStyle(new NotificationCompat.BigTextStyle().bigText(getText(R.string.authentication_notification_msg)
+ ": " + resourceTitle))
.setSmallIcon(R.drawable.ic_stat_authentication)
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_stat_authentication))
.setAutoCancel(true)
.setContentIntent(ClientConfig.downloadServiceCallbacks.getAuthentificationNotificationContentIntent(DownloadService.this, downloadRequest));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {