diff options
author | Daniel Sandler <dsandler@google.com> | 2011-02-07 16:12:16 -0500 |
---|---|---|
committer | Daniel Sandler <dsandler@google.com> | 2011-02-07 16:12:16 -0500 |
commit | 32cd1d5053fdca49463adc83adb7b7dad13904e0 (patch) | |
tree | 2f56aeb6cc08eb9ee055f91fb811645e7ad82c83 /tests | |
parent | f313e95821cdb7e9dca8e61d87747064a63e807b (diff) | |
parent | 31796297d472512a748d7fb483055ad7609b13cd (diff) | |
download | frameworks_base-32cd1d5053fdca49463adc83adb7b7dad13904e0.zip frameworks_base-32cd1d5053fdca49463adc83adb7b7dad13904e0.tar.gz frameworks_base-32cd1d5053fdca49463adc83adb7b7dad13904e0.tar.bz2 |
resolved conflicts for merge of 31796297 to master
Change-Id: Ice632b3378f8f67c186245fdb63b022ade864ba1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java index 90c2a1a..f463a19 100644 --- a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java +++ b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java @@ -35,6 +35,10 @@ import android.widget.TextView; import android.widget.ProgressBar; import android.os.PowerManager; +// private NM API +import android.app.INotificationManager; +import com.android.internal.statusbar.StatusBarNotification; + public class NotificationTestList extends TestActivity { private final static String TAG = "NotificationTestList"; @@ -205,6 +209,15 @@ public class NotificationTestList extends TestActivity } }, + new Test("Null Icon #1 (when=now)") { + public void run() { + Notification n = new Notification(0, null, System.currentTimeMillis()); + n.setLatestEventInfo(NotificationTestList.this, "Persistent #1", + "This is the same notification!!!", makeIntent()); + mNM.notify(1, n); + } + }, + new Test("Bad resource #1 (when=create)") { public void run() { Notification n = new Notification(R.drawable.icon2, @@ -752,6 +765,30 @@ public class NotificationTestList extends TestActivity } }, + new Test("System priority notification") { + public void run() { + Notification n = new Notification.Builder(NotificationTestList.this) + .setSmallIcon(R.drawable.notification1) + .setContentTitle("System priority") + .setContentText("This should appear before all others") + .getNotification(); + + int[] idOut = new int[1]; + try { + INotificationManager directLine = mNM.getService(); + directLine.enqueueNotificationWithTagPriority( + getPackageName(), + null, + 1, + StatusBarNotification.PRIORITY_SYSTEM, + n, + idOut); + } catch (android.os.RemoteException ex) { + // oh well + } + } + }, + new Test("Crash") { public void run() { |