2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-05 16:45:08 +00:00

Made notifications from KDE Connect silent

Flag "requestAnswer" should be renamed to "silent", using both for now.
This commit is contained in:
Albert Vaca
2015-01-20 23:10:53 -08:00
parent 39af8f96e6
commit 8765b7c692

View File

@@ -258,6 +258,13 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_NOTIFICATION);
if (packageName.equals("org.kde.kdeconnect_tp"))
{
//Make our own notifications silent :)
np.set("silent", true);
np.set("requestAnswer", true); //For compatibility with old desktop versions of KDE Connect that don't support "silent"
}
/*
//TODO: Add support for displaying app icons to desktop plasmoid and uncomment this piece of code
try {
@@ -281,7 +288,10 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
np.set("isClearable", statusBarNotification.isClearable());
np.set("ticker", getTickerText(notification));
np.set("time", Long.toString(statusBarNotification.getPostTime()));
if (requestAnswer) np.set("requestAnswer", true);
if (requestAnswer) {
np.set("requestAnswer", true);
np.set("silent", true);
}
device.sendPackage(np);
}