Merge "Add avatars to the test message notifications."
diff --git a/tests/EmbeddedKitchenSinkApp/res/drawable/avatar1.png b/tests/EmbeddedKitchenSinkApp/res/drawable/avatar1.png
new file mode 100644
index 0000000..94e4cf1
--- /dev/null
+++ b/tests/EmbeddedKitchenSinkApp/res/drawable/avatar1.png
Binary files differ
diff --git a/tests/EmbeddedKitchenSinkApp/res/drawable/avatar2.png b/tests/EmbeddedKitchenSinkApp/res/drawable/avatar2.png
new file mode 100644
index 0000000..10021f2
--- /dev/null
+++ b/tests/EmbeddedKitchenSinkApp/res/drawable/avatar2.png
Binary files differ
diff --git a/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/notification/NotificationFragment.java b/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/notification/NotificationFragment.java
index d7230fc..4de7e5a 100644
--- a/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/notification/NotificationFragment.java
+++ b/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/notification/NotificationFragment.java
@@ -11,6 +11,7 @@
import android.app.RemoteInput;
import android.content.Context;
import android.content.Intent;
+import android.graphics.drawable.Icon;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@@ -156,8 +157,14 @@
intent,
PendingIntent.FLAG_UPDATE_CURRENT);
- Person personJohn = new Person.Builder().setName("John Doe").build();
- Person personJane = new Person.Builder().setName("Jane Roe").build();
+ Person personJohn = new Person.Builder()
+ .setName("John Doe")
+ .setIcon(Icon.createWithResource(v.getContext(), R.drawable.avatar1))
+ .build();
+ Person personJane = new Person.Builder()
+ .setName("Jane Roe")
+ .setIcon(Icon.createWithResource(v.getContext(), R.drawable.avatar2))
+ .build();
Notification.MessagingStyle messagingStyle =
new Notification.MessagingStyle(personJohn)
.setConversationTitle("Whassup")