Color fix

This commit is contained in:
emanuele-f 2021-03-07 13:09:36 +01:00
parent d04b93edd0
commit 407f1386ec

View File

@ -277,6 +277,7 @@ public class CaptureService extends VpnService implements Runnable {
mNotificationBuilder = new NotificationCompat.Builder(this, NOTIFY_CHAN_VPNSERVICE)
.setSmallIcon(R.drawable.ic_logo)
.setColor(getResources().getColor(R.color.colorPrimary))
.setContentIntent(pi)
.setOngoing(true)
.setAutoCancel(false)
@ -284,9 +285,6 @@ public class CaptureService extends VpnService implements Runnable {
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setPriority(NotificationCompat.PRIORITY_LOW); // see IMPORTANCE_LOW
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
mNotificationBuilder.setColor(getColor(R.color.colorPrimary));
if(Utils.isTv(this)) {
// This is the icon which is visualized
Drawable banner = ContextCompat.getDrawable(this, R.drawable.banner);