diff options
author | Joe Onorato <joeo@android.com> | 2010-02-03 20:21:41 -0800 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2010-02-03 20:21:41 -0800 |
commit | 68065e0a1980ab6abf8963b48b011efa017fe1c2 (patch) | |
tree | 3d6d4184f359e3bfea6783a97d0de7c2d99d7ab5 /tests/StatusBar | |
parent | 378a1488bb76d4786025a10e36c2d638cbd2cb6a (diff) | |
download | frameworks_base-68065e0a1980ab6abf8963b48b011efa017fe1c2.zip frameworks_base-68065e0a1980ab6abf8963b48b011efa017fe1c2.tar.gz frameworks_base-68065e0a1980ab6abf8963b48b011efa017fe1c2.tar.bz2 |
Fix 1667521 - system process crash after bad notification
The steps to reproduce this were kind of interesting. You needed to have
a notification with a bogus RemoteViews in the first position in the list,
and then have another notification come in with an earlier timestampe. In
that case, it would get a bad index for the new (not bogus) view that was
being added.
Diffstat (limited to 'tests/StatusBar')
-rw-r--r-- | tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java index ffc2cbc..f548145 100644 --- a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java +++ b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java @@ -121,6 +121,32 @@ public class NotificationTestList extends TestActivity } }, + new Test("Bad resource #2") { + public void run() + { + Notification n = new Notification(NotificationTestList.this, + R.drawable.ic_statusbar_missedcall, + null, System.currentTimeMillis()-(1000*60*60*24), + "(453) 123-2328", + "", null); + n.contentView.setInt(1 /*bogus*/, "bogus method", 666); + mNM.notify(2, n); + } + }, + + new Test("Bad resource #3") { + public void run() + { + Notification n = new Notification(NotificationTestList.this, + R.drawable.ic_statusbar_missedcall, + null, System.currentTimeMillis()-(1000*60*60*24), + "(453) 123-2328", + "", null); + n.contentView.setInt(1 /*bogus*/, "bogus method", 666); + mNM.notify(3, n); + } + }, + new Test("Times") { public void run() { @@ -405,6 +431,16 @@ public class NotificationTestList extends TestActivity } }, + new Test("Persistent #3") { + public void run() { + Notification n = new Notification(R.drawable.icon2, "tock tock tock", + System.currentTimeMillis()); + n.setLatestEventInfo(NotificationTestList.this, "Persistent #3", + "Notify me!!!", makeIntent()); + mNM.notify(3, n); + } + }, + new Test("Persistent #2 Vibrate") { public void run() { Notification n = new Notification(R.drawable.icon2, "tock tock tock", |