diff options
author | Joe Onorato <joeo@google.com> | 2010-10-08 17:57:18 -0400 |
---|---|---|
committer | Joe Onorato <joeo@google.com> | 2010-10-08 17:57:18 -0400 |
commit | 80a752c5373cfa906568302c831710b5c22a8155 (patch) | |
tree | 88f00113098aaf46a9ef43e43bf4b9c0c1b6c841 /tests/StatusBar | |
parent | 481bbb9c11e640cc6b322bdb300f69f31ea011fe (diff) | |
download | frameworks_base-80a752c5373cfa906568302c831710b5c22a8155.zip frameworks_base-80a752c5373cfa906568302c831710b5c22a8155.tar.gz frameworks_base-80a752c5373cfa906568302c831710b5c22a8155.tar.bz2 |
Allow notifications to not specify a contentIntent.
If they don't, the click events will be passed through to the individual
views in the notification view, which may have their own PendingIntents
attached.
Previously, it was against the UX spec to allow this, but now we are
changing that and will have buttons in there.
Change-Id: Ie3b2e96c6a1c4449fa86ed571f3ad0f047320d31
Diffstat (limited to 'tests/StatusBar')
-rw-r--r-- | tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java index e30cf4a..9c267d6 100644 --- a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java +++ b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java @@ -86,6 +86,18 @@ public class NotificationTestList extends TestActivity } }, + new Test("custom intent on text view") { + public void run() { + Notification n = new Notification(R.drawable.icon1, null, + mActivityCreateTime); + n.setLatestEventInfo(NotificationTestList.this, "Persistent #1", + "This is a notification!!!", null); + n.contentView.setOnClickPendingIntent(com.android.internal.R.id.text, + makeIntent2()); + mNM.notify(1, n); + } + }, + new Test("Ticker 1 line") { public void run() { Notification n = new Notification(R.drawable.icon1, "tick tick tick", @@ -776,6 +788,12 @@ public class NotificationTestList extends TestActivity return PendingIntent.getActivity(this, 0, intent, 0); } + private PendingIntent makeIntent2() { + Intent intent = new Intent(this, StatusBarTest.class); + return PendingIntent.getActivity(this, 0, intent, 0); + } + + class StateStress extends Test { StateStress(String name, int pause, int iterations, Runnable[] tasks) { super(name); |