Merge "Revert "Messaging: Show quick reply choices only on wearable devices"" am: 3de360b933 am: 54f00b323c

Change-Id: I51a8c7a63a22711d5fc17451f7e6e17316f885ea
This commit is contained in:
Treehugger Robot
2020-05-20 19:32:06 +00:00
committed by Automerger Merge Worker
@@ -906,10 +906,6 @@ public class BugleNotifications {
final NotificationCompat.Action.Builder actionBuilder = final NotificationCompat.Action.Builder actionBuilder =
new NotificationCompat.Action.Builder(R.drawable.ic_wear_reply, new NotificationCompat.Action.Builder(R.drawable.ic_wear_reply,
context.getString(replyLabelRes), replyPendingIntent); context.getString(replyLabelRes), replyPendingIntent);
notifBuilder.addAction(actionBuilder.build());
// Support the action on a wearable device as well
final String[] choices = context.getResources().getStringArray( final String[] choices = context.getResources().getStringArray(
R.array.notification_reply_choices); R.array.notification_reply_choices);
final RemoteInput remoteInput = new RemoteInput.Builder(Intent.EXTRA_TEXT).setLabel( final RemoteInput remoteInput = new RemoteInput.Builder(Intent.EXTRA_TEXT).setLabel(
@@ -917,6 +913,9 @@ public class BugleNotifications {
setChoices(choices) setChoices(choices)
.build(); .build();
actionBuilder.addRemoteInput(remoteInput); actionBuilder.addRemoteInput(remoteInput);
notifBuilder.addAction(actionBuilder.build());
// Support the action on a wearable device as well
wearableExtender.addAction(actionBuilder.build()); wearableExtender.addAction(actionBuilder.build());
} }