diff options
author | Joe Onorato <joeo@android.com> | 2009-11-05 17:12:18 -0500 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2009-11-05 17:12:18 -0500 |
commit | e71d9e421da070705a8f37aaf702282467a9fe7f (patch) | |
tree | e37a5058e51b56307c78116d824d11c0e9d7989d /tests/StatusBar/src | |
parent | 27c6dd7aa4ff6f57435a3c87d8b9a782cf7c9116 (diff) | |
download | frameworks_base-e71d9e421da070705a8f37aaf702282467a9fe7f.zip frameworks_base-e71d9e421da070705a8f37aaf702282467a9fe7f.tar.gz frameworks_base-e71d9e421da070705a8f37aaf702282467a9fe7f.tar.bz2 |
Another test for StatusBar test.
Diffstat (limited to 'tests/StatusBar/src')
-rw-r--r-- | tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java index a88183c..f2ddd0f 100644 --- a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java +++ b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java @@ -58,6 +58,27 @@ public class NotificationTestList extends TestActivity } private Test[] mTests = new Test[] { + new Test("Off and sound") { + public void run() { + PowerManager pm = (PowerManager)NotificationTestList.this.getSystemService("power"); + PowerManager.WakeLock wl = + pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "sound"); + wl.acquire(); + + pm.goToSleep(SystemClock.uptimeMillis()); + + Notification n = new Notification(); + n.sound = Uri.parse("file:///sdcard/virtual-void.mp3"); + Log.d(TAG, "n.sound=" + n.sound); + + mNM.notify(1, n); + + Log.d(TAG, "releasing wake lock"); + wl.release(); + Log.d(TAG, "released wake lock"); + } + }, + new Test("No view") { public void run() { Notification n = new Notification(R.drawable.icon1, "No view", |