Another test for StatusBar test.
diff --git a/tests/StatusBar/AndroidManifest.xml b/tests/StatusBar/AndroidManifest.xml
index 9bba79c..21fb951 100644
--- a/tests/StatusBar/AndroidManifest.xml
+++ b/tests/StatusBar/AndroidManifest.xml
@@ -1,6 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.statusbartest">
<uses-permission android:name="android.permission.DEVICE_POWER" />
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.STATUS_BAR" />
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
<uses-permission android:name="android.permission.VIBRATE" />
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 @@
}
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",