Messaging: Show quick reply choices only on wearable devices am: dffc4fa578 am: 3a329b53bc am: 449c30ad6b am: c825a989f7 am: be4a26b080

Change-Id: I402769598d651aa2e4bcc1aa46bca440e62047fd
This commit is contained in:
Han Wang
2020-03-31 21:04:21 +00:00
committed by Automerger Merge Worker
@@ -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());
}