diff options
author | Joe Onorato <joeo@google.com> | 2010-10-08 17:57:18 -0400 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2010-10-13 17:29:26 -0700 |
commit | 184498ce5a8d77e1d9c45693363829daaeef9611 (patch) | |
tree | b5508f851174110267189ede8cf551f771a57be1 /tests/StatusBar/src | |
parent | 5d794412e3e429e47404395badcd11b0b8639e8b (diff) | |
download | frameworks_base-184498ce5a8d77e1d9c45693363829daaeef9611.zip frameworks_base-184498ce5a8d77e1d9c45693363829daaeef9611.tar.gz frameworks_base-184498ce5a8d77e1d9c45693363829daaeef9611.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: I674234212f64b2b8802a0708b7eed0614e147ca3
Diffstat (limited to 'tests/StatusBar/src')
-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); |