From 6b339a30130efa6792ebae4645b7d0300391a775 Mon Sep 17 00:00:00 2001 From: Lukas Veneziano Date: Wed, 27 Dec 2017 08:59:09 +0100 Subject: [PATCH] Added notification type for threema app --- .../gadgetbridge/model/AppNotificationType.java | 3 +++ .../freeyourgadget/gadgetbridge/model/NotificationType.java | 4 +++- .../gadgetbridge/service/btle/BLETypeConversions.java | 1 + .../gadgetbridge/service/devices/huami/HuamiIcon.java | 5 +++-- .../freeyourgadget/gadgetbridge/util/NotificationUtils.java | 1 + 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/AppNotificationType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/AppNotificationType.java index e7c021201..afcc2d232 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/AppNotificationType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/AppNotificationType.java @@ -69,6 +69,9 @@ public class AppNotificationType extends HashMap { // Telegram put("org.telegram.messenger", NotificationType.TELEGRAM); + // Threema + put("ch.threema.app", NotificationType.TELEGRAM); + // Twitter put("org.mariotaku.twidere", NotificationType.TWITTER); put("com.twitter.android", NotificationType.TWITTER); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java index 936a1f60d..0881bc58b 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/NotificationType.java @@ -56,7 +56,8 @@ public enum NotificationType { SKYPE(PebbleIconID.NOTIFICATION_SKYPE, PebbleColor.VividCerulean), SLACK(PebbleIconID.NOTIFICATION_SLACK, PebbleColor.Folly), SNAPCHAT(PebbleIconID.NOTIFICATION_SNAPCHAT, PebbleColor.Icterine), - TELEGRAM(PebbleIconID.NOTIFICATION_TELEGRAM, PebbleColor.VividCerulean), + TELEGRAM(PebbleIconID.NOTIFICATION_TELEGRAM, PebbleColor.JaegerGreen), + THREEMA(PebbleIconID.NOTIFICATION_HIPCHAT, PebbleColor.VividCerulean), TRANSIT(PebbleIconID.LOCATION, PebbleColor.JaegerGreen), TWITTER(PebbleIconID.NOTIFICATION_TWITTER, PebbleColor.BlueMoon), VIBER(PebbleIconID.NOTIFICATION_VIBER, PebbleColor.VividViolet), @@ -101,6 +102,7 @@ public enum NotificationType { case RIOT: case SIGNAL: case TELEGRAM: + case THREEMA: case WHATSAPP: case GOOGLE_MESSENGER: case GOOGLE_HANGOUTS: diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle/BLETypeConversions.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle/BLETypeConversions.java index c297ec88e..12806b2e6 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle/BLETypeConversions.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/btle/BLETypeConversions.java @@ -288,6 +288,7 @@ public class BLETypeConversions { case SKYPE: case SNAPCHAT: case TELEGRAM: + case THREEMA: case TWITTER: case WHATSAPP: case VIBER: diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiIcon.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiIcon.java index 2e388ab1a..bf1720a12 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiIcon.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/HuamiIcon.java @@ -60,7 +60,6 @@ public class HuamiIcon { public static final byte WEATHER = 35; public static final byte HR_WARNING_36 = 36; - public static byte mapToIconId(NotificationType type) { switch (type) { case UNKNOWN: @@ -104,6 +103,8 @@ public class HuamiIcon { return SNAPCHAT; case TELEGRAM: return TELEGRAM; + case THREEMA: + return CHAT_BLUE_13; case VIBER: return VIBER; case WECHAT: @@ -115,4 +116,4 @@ public class HuamiIcon { } return APP_11; } -} \ No newline at end of file +} diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/NotificationUtils.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/NotificationUtils.java index e5ed419e9..140eed573 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/NotificationUtils.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/NotificationUtils.java @@ -46,6 +46,7 @@ public class NotificationUtils { case SKYPE: case SNAPCHAT: case TELEGRAM: + case THREEMA: case TWITTER: case WHATSAPP: case VIBER: