Initial Android Auto support

This adds android auto support accordign to
https://developer.android.com/training/auto/messaging/index.html#messaging
However, since android auto is not officially supported in my country,
the functionality is limited. Which means that I have not been able
to fully test everything yet.

What work is:
* Message notification is shown.
* When you click on it, the message is read.

Closes #5880
This commit is contained in:
Mattias Eriksson
2016-09-14 23:58:24 +02:00
committed by Moxie Marlinspike
parent ce812ed8ba
commit 9148b7da5f
7 changed files with 263 additions and 0 deletions

View File

@@ -258,6 +258,8 @@ public class MessageNotifier {
notificationState.getMarkAsReadIntent(context),
notificationState.getQuickReplyIntent(context, notifications.get(0).getRecipients()),
notificationState.getWearableReplyIntent(context, notifications.get(0).getRecipients()));
builder.addAndroidAutoAction(notificationState.getAndroidAutoReplyIntent(context, notifications.get(0).getRecipients()),
notificationState.getAndroidAutoHeardIntent(context, notifications.get(0).getRecipients()), notifications.get(0).getTimestamp());
ListIterator<NotificationItem> iterator = notifications.listIterator(notifications.size());