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.systemui") ||
|
||||||
source.equals("com.android.dialer") ||
|
source.equals("com.android.dialer") ||
|
||||||
source.equals("com.android.mms") ||
|
source.equals("com.android.mms") ||
|
||||||
source.equals("com.moez.QKSMS") ||
|
|
||||||
source.equals("com.cyanogenmod.eleven")) {
|
source.equals("com.cyanogenmod.eleven")) {
|
||||||
return;
|
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);
|
HashSet<String> blacklist = (HashSet<String>) sharedPrefs.getStringSet("package_blacklist", null);
|
||||||
if (blacklist != null && blacklist.contains(source)) {
|
if (blacklist != null && blacklist.contains(source)) {
|
||||||
return;
|
return;
|
||||||
|
@ -167,6 +172,9 @@ public class NotificationListener extends NotificationListenerService {
|
||||||
case "com.android.email":
|
case "com.android.email":
|
||||||
notificationKind = NotificationKind.EMAIL;
|
notificationKind = NotificationKind.EMAIL;
|
||||||
break;
|
break;
|
||||||
|
case "com.moez.QKSMS":
|
||||||
|
notificationKind = NotificationKind.SMS;
|
||||||
|
break;
|
||||||
case "eu.siacs.conversations":
|
case "eu.siacs.conversations":
|
||||||
notificationKind = NotificationKind.CHAT;
|
notificationKind = NotificationKind.CHAT;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -7,5 +7,6 @@ public enum NotificationKind {
|
||||||
CHAT,
|
CHAT,
|
||||||
EMAIL,
|
EMAIL,
|
||||||
FACEBOOK,
|
FACEBOOK,
|
||||||
|
SMS,
|
||||||
TWITTER,
|
TWITTER,
|
||||||
}
|
}
|
||||||
|
|
|
@ -635,6 +635,10 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
||||||
icon_id = PebbleIconID.GENERIC_EMAIL;
|
icon_id = PebbleIconID.GENERIC_EMAIL;
|
||||||
color_id = PebbleColor.JaegerGreen;
|
color_id = PebbleColor.JaegerGreen;
|
||||||
break;
|
break;
|
||||||
|
case SMS:
|
||||||
|
icon_id = PebbleIconID.GENERIC_SMS;
|
||||||
|
color_id = PebbleColor.VividViolet;
|
||||||
|
break;
|
||||||
case FACEBOOK:
|
case FACEBOOK:
|
||||||
icon_id = PebbleIconID.NOTIFICATION_FACEBOOK;
|
icon_id = PebbleIconID.NOTIFICATION_FACEBOOK;
|
||||||
color_id = PebbleColor.VeryLightBlue;
|
color_id = PebbleColor.VeryLightBlue;
|
||||||
|
|
Loading…
Reference in New Issue