Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d989163 authored by Michael Potter's avatar Michael Potter Committed by Jochen Sprickerhof
Browse files

colored notification icon (#547)

colored notification icon
parent 869f5cef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ public class DynamicTheme {
        }
    }

    private static String getPrimaryColor(Context context) {
    public static String getPrimaryColor(Context context) {
        return Utils.getSharedPreference(context, COLOR_PREF, TEAL);
    }

+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import android.text.style.URLSpan;
import android.util.Log;
import android.widget.Toast;

import com.android.calendar.DynamicTheme;
import com.android.calendar.Utils;
import com.android.calendar.alerts.AlertService.NotificationWrapper;

@@ -259,6 +260,8 @@ public class AlertReceiver extends BroadcastReceiver {
        notificationBuilder.setContentTitle(title);
        notificationBuilder.setContentText(summaryText);
        notificationBuilder.setSmallIcon(R.drawable.stat_notify_calendar);
        int color = DynamicTheme.getColorId(DynamicTheme.getPrimaryColor(context));
        notificationBuilder.setColor(context.getResources().getColor(color));
        notificationBuilder.setContentIntent(clickIntent);
        notificationBuilder.setDeleteIntent(deleteIntent);