summaryrefslogtreecommitdiff
path: root/tests/StatusBar/src
diff options
context:
space:
mode:
authorJulia Reynolds <juliacr@google.com>2015-10-19 13:51:23 -0400
committerJulia Reynolds <juliacr@google.com>2015-11-20 14:25:07 -0500
commit233a5f97ea7b46814747a99f584b08d4e8c70105 (patch)
tree7d5c87f2ceaf09200c49d80e66ce03023567e8fc /tests/StatusBar/src
parent3f72604be806c0173b5dca0225cadf6e7c872147 (diff)
Implement notification ranking by topic.
Including sensitive notification visibility & DND bypass. Bug: 22451710 Change-Id: I5f3a0c6d59de0495cb904bad6f886eb29ed4bda4
Diffstat (limited to 'tests/StatusBar/src')
-rw-r--r--tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
index 67b9d7784fed..8eb30d23b206 100644
--- a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
+++ b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
@@ -160,6 +160,36 @@ public class NotificationTestList extends TestActivity
}
},
+ new Test("with topic Hello") {
+ public void run() {
+ Notification n = new Notification.Builder(NotificationTestList.this)
+ .setSmallIcon(R.drawable.icon1)
+ .setWhen(mActivityCreateTime)
+ .setContentTitle("hihi")
+ .setContentText("This is a notification!!!")
+ .setContentIntent(makeIntent2())
+ .setTopic(new Notification.Topic("hello", "Hello"))
+ .build();
+
+ mNM.notify(999, n);
+ }
+ },
+
+ new Test("with topic GoodBye") {
+ public void run() {
+ Notification n = new Notification.Builder(NotificationTestList.this)
+ .setSmallIcon(R.drawable.icon1)
+ .setWhen(mActivityCreateTime)
+ .setContentTitle("byebye")
+ .setContentText("This is a notification!!!")
+ .setContentIntent(makeIntent2())
+ .setTopic(new Notification.Topic("bye", "Goodbye"))
+ .build();
+
+ mNM.notify(9999, n);
+ }
+ },
+
new Test("Whens") {
public void run()
{