From: Andy Scherzinger Date: Sun, 27 Sep 2015 19:40:52 +0000 (+0200) Subject: Add ownCloud color to notifications (only works on lollipop and up) for progress... X-Git-Tag: oc-android-1.9^2~44^2~5 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/796b1bd297e171968d76a2a9c7f351540caa8861?hp=--cc Add ownCloud color to notifications (only works on lollipop and up) for progress bar and icon background --- 796b1bd297e171968d76a2a9c7f351540caa8861 diff --git a/src/com/owncloud/android/notifications/NotificationBuilderWithProgressBar.java b/src/com/owncloud/android/notifications/NotificationBuilderWithProgressBar.java index c71b35f2..5dd043f5 100644 --- a/src/com/owncloud/android/notifications/NotificationBuilderWithProgressBar.java +++ b/src/com/owncloud/android/notifications/NotificationBuilderWithProgressBar.java @@ -55,7 +55,8 @@ public class NotificationBuilderWithProgressBar extends NotificationCompat.Build if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { return new NotificationBuilderWithProgressBar(context); } else { - return new NotificationCompat.Builder(context); + return new NotificationCompat.Builder(context). + setColor(context.getResources().getColor(R.color.primary)); } } diff --git a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java index 43ddae33..7f8b0db1 100644 --- a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java +++ b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java @@ -526,6 +526,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { private NotificationCompat.Builder createNotificationBuilder() { NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getContext()); notificationBuilder.setSmallIcon(R.drawable.notification_icon).setAutoCancel(true); + notificationBuilder.setColor(getContext().getResources().getColor(R.color.primary)); return notificationBuilder; }