aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-09-06 12:13:50 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-09-06 12:13:50 +0200
commit7e811498690a27a8f1b06feedfbc2a1dbe129cd0 (patch)
tree9e58add217b3c5bb872eb70e2de0d2344fa48204 /src
parent1dc55f72e3212ae2b317c87c421aaa32a7a80950 (diff)
show reply action on wear devices
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/services/NotificationService.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java
index 8e8a5d85..74a94c3f 100644
--- a/src/main/java/eu/siacs/conversations/services/NotificationService.java
+++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java
@@ -321,10 +321,12 @@ public class NotificationService {
} else {
modifyForTextOnly(mBuilder, messages);
}
+ RemoteInput remoteInput = new RemoteInput.Builder("text_reply").setLabel(UIHelper.getMessageHint(mXmppConnectionService, conversation)).build();
+ NotificationCompat.Action action = new NotificationCompat.Action.Builder(R.drawable.ic_send_text_offline, "Reply", createReplyIntent(conversation)).addRemoteInput(remoteInput).build();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
- RemoteInput remoteInput = new RemoteInput.Builder("text_reply").setLabel(UIHelper.getMessageHint(mXmppConnectionService, conversation)).build();
- NotificationCompat.Action action = new NotificationCompat.Action.Builder(R.drawable.ic_send_text_offline, "Reply", createReplyIntent(conversation)).addRemoteInput(remoteInput).build();
mBuilder.addAction(action);
+ } else {
+ mBuilder.extend(new NotificationCompat.WearableExtender().addAction(action));
}
if ((message = getFirstDownloadableMessage(messages)) != null) {
mBuilder.addAction(