Add ownCloud color to notifications (only works on lollipop and up) for progress...
authorAndy Scherzinger <info@andy-scherzinger.de>
Sun, 27 Sep 2015 19:40:52 +0000 (21:40 +0200)
committerAndy Scherzinger <info@andy-scherzinger.de>
Sun, 27 Sep 2015 19:40:52 +0000 (21:40 +0200)
src/com/owncloud/android/notifications/NotificationBuilderWithProgressBar.java
src/com/owncloud/android/syncadapter/FileSyncAdapter.java

index c71b35f..5dd043f 100644 (file)
@@ -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));
         }
     }
     
index 43ddae3..7f8b0db 100644 (file)
@@ -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;
     }