Merge pull request #126 from roidelapluie/qksms
Allow QKSMS notifications to be handled as a generic notification if …
This commit is contained in:
commit
aa524cc5ea
|
@ -132,7 +132,6 @@ public class NotificationListener extends NotificationListenerService {
|
|||
source.equals("com.android.systemui") ||
|
||||
source.equals("com.android.dialer") ||
|
||||
source.equals("com.android.mms") ||
|
||||
source.equals("com.moez.QKSMS") ||
|
||||
source.equals("com.cyanogenmod.eleven")) {
|
||||
return;
|
||||
}
|
||||
|
@ -149,6 +148,12 @@ public class NotificationListener extends NotificationListenerService {
|
|||
}
|
||||
}
|
||||
|
||||
if (source.equals("com.moez.QKSMS")) {
|
||||
if (!"never".equals(sharedPrefs.getString("notification_mode_sms", "when_screen_off"))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
HashSet<String> blacklist = (HashSet<String>) sharedPrefs.getStringSet("package_blacklist", null);
|
||||
if (blacklist != null && blacklist.contains(source)) {
|
||||
return;
|
||||
|
@ -167,6 +172,9 @@ public class NotificationListener extends NotificationListenerService {
|
|||
case "com.android.email":
|
||||
notificationKind = NotificationKind.EMAIL;
|
||||
break;
|
||||
case "com.moez.QKSMS":
|
||||
notificationKind = NotificationKind.SMS;
|
||||
break;
|
||||
case "eu.siacs.conversations":
|
||||
notificationKind = NotificationKind.CHAT;
|
||||
break;
|
||||
|
|
|
@ -7,5 +7,6 @@ public enum NotificationKind {
|
|||
CHAT,
|
||||
EMAIL,
|
||||
FACEBOOK,
|
||||
SMS,
|
||||
TWITTER,
|
||||
}
|
||||
|
|
|
@ -635,6 +635,10 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
|||
icon_id = PebbleIconID.GENERIC_EMAIL;
|
||||
color_id = PebbleColor.JaegerGreen;
|
||||
break;
|
||||
case SMS:
|
||||
icon_id = PebbleIconID.GENERIC_SMS;
|
||||
color_id = PebbleColor.VividViolet;
|
||||
break;
|
||||
case FACEBOOK:
|
||||
icon_id = PebbleIconID.NOTIFICATION_FACEBOOK;
|
||||
color_id = PebbleColor.VeryLightBlue;
|
||||
|
|
Loading…
Reference in New Issue