From c843e6b17a1b2d7ec9e42927edfe0a2ad73517a3 Mon Sep 17 00:00:00 2001
From: lucasgaley <34111019+lucasgaley@users.noreply.github.com>
Date: Fri, 15 Feb 2019 05:56:47 -0700
Subject: [PATCH] Adding functionality for an additional "disconnected" accent.
---
.../java/nodomain/freeyourgadget/gadgetbridge/util/GB.java | 4 ++--
app/src/main/res/values/colors.xml | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/GB.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/GB.java
index aace268af6..0a6d64c64f 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/GB.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/GB.java
@@ -98,7 +98,7 @@ public static Notification createNotification(GBDevice device, Context context)
.setContentText(text)
.setSmallIcon(connected ? R.drawable.ic_notification : R.drawable.ic_notification_disconnected)
.setContentIntent(getContentIntent(context))
- .setColor(context.getResources().getColor(R.color.accent))
+ .setColor(context.getResources().getColor(connected ? R.color.accent : R.color.accent_disconnected))
.setOngoing(true);
Intent deviceCommunicationServiceIntent = new Intent(context, DeviceCommunicationService.class);
@@ -132,7 +132,7 @@ public static Notification createNotification(String text, Context context) {
.setContentText(text)
.setSmallIcon(R.drawable.ic_notification_disconnected)
.setContentIntent(getContentIntent(context))
- .setColor(context.getResources().getColor(R.color.accent))
+ .setColor(context.getResources().getColor(R.color.accent_disconnected))
.setOngoing(true);
if (GBApplication.getPrefs().getString("last_device_address", null) != null) {
Intent deviceCommunicationServiceIntent = new Intent(context, DeviceCommunicationService.class);
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index cf32627f01..a64c8a2cba 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -7,6 +7,7 @@
#dd2c00
#0091ea
+ #ea0000
#000000
#ffffff