From dffc4fa5783cfa854edaf11ff3c789e588ad66c8 Mon Sep 17 00:00:00 2001 From: Han Wang <416810799@qq.com> Date: Tue, 17 Mar 2020 04:43:11 +0200 Subject: [PATCH] Messaging: Show quick reply choices only on wearable devices Change-Id: I4b81643c051a9b1377f2046c1aa0515c590736fc --- .../android/messaging/datamodel/BugleNotifications.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/com/android/messaging/datamodel/BugleNotifications.java b/src/com/android/messaging/datamodel/BugleNotifications.java index 9b96c6e..0e54027 100644 --- a/src/com/android/messaging/datamodel/BugleNotifications.java +++ b/src/com/android/messaging/datamodel/BugleNotifications.java @@ -906,6 +906,10 @@ public class BugleNotifications { final NotificationCompat.Action.Builder actionBuilder = new NotificationCompat.Action.Builder(R.drawable.ic_wear_reply, context.getString(replyLabelRes), replyPendingIntent); + + notifBuilder.addAction(actionBuilder.build()); + + // Support the action on a wearable device as well final String[] choices = context.getResources().getStringArray( R.array.notification_reply_choices); final RemoteInput remoteInput = new RemoteInput.Builder(Intent.EXTRA_TEXT).setLabel( @@ -913,9 +917,6 @@ public class BugleNotifications { setChoices(choices) .build(); actionBuilder.addRemoteInput(remoteInput); - notifBuilder.addAction(actionBuilder.build()); - - // Support the action on a wearable device as well wearableExtender.addAction(actionBuilder.build()); }