Introduce IMPORTANCE_MIN.
Allow HUNs for >= IMPORTANCE_HIGH.
Allow full screen intents for IMPORTANCE_MAX.
Bug: 22960980
Bug: 26918284
Change-Id: Id4d2b90ea2e21563dbc716db411060d826e73699
diff --git a/api/current.txt b/api/current.txt
index 3245c0a..13b5087 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -34570,10 +34570,11 @@
method public int getSuppressedVisualEffects();
method public boolean isAmbient();
method public boolean matchesInterruptionFilter();
- field public static final int IMPORTANCE_DEFAULT = 2; // 0x2
- field public static final int IMPORTANCE_HIGH = 3; // 0x3
- field public static final int IMPORTANCE_LOW = 1; // 0x1
- field public static final int IMPORTANCE_MAX = 4; // 0x4
+ field public static final int IMPORTANCE_DEFAULT = 3; // 0x3
+ field public static final int IMPORTANCE_HIGH = 4; // 0x4
+ field public static final int IMPORTANCE_LOW = 2; // 0x2
+ field public static final int IMPORTANCE_MAX = 5; // 0x5
+ field public static final int IMPORTANCE_MIN = 1; // 0x1
field public static final int IMPORTANCE_NONE = 0; // 0x0
field public static final int IMPORTANCE_UNSPECIFIED = -1000; // 0xfffffc18
}
diff --git a/api/system-current.txt b/api/system-current.txt
index 9a22101..125071d 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -37113,10 +37113,11 @@
method public int getSuppressedVisualEffects();
method public boolean isAmbient();
method public boolean matchesInterruptionFilter();
- field public static final int IMPORTANCE_DEFAULT = 2; // 0x2
- field public static final int IMPORTANCE_HIGH = 3; // 0x3
- field public static final int IMPORTANCE_LOW = 1; // 0x1
- field public static final int IMPORTANCE_MAX = 4; // 0x4
+ field public static final int IMPORTANCE_DEFAULT = 3; // 0x3
+ field public static final int IMPORTANCE_HIGH = 4; // 0x4
+ field public static final int IMPORTANCE_LOW = 2; // 0x2
+ field public static final int IMPORTANCE_MAX = 5; // 0x5
+ field public static final int IMPORTANCE_MIN = 1; // 0x1
field public static final int IMPORTANCE_NONE = 0; // 0x0
field public static final int IMPORTANCE_UNSPECIFIED = -1000; // 0xfffffc18
}
diff --git a/api/test-current.txt b/api/test-current.txt
index 0b7914b..af4fddbc 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -34585,10 +34585,11 @@
method public int getSuppressedVisualEffects();
method public boolean isAmbient();
method public boolean matchesInterruptionFilter();
- field public static final int IMPORTANCE_DEFAULT = 2; // 0x2
- field public static final int IMPORTANCE_HIGH = 3; // 0x3
- field public static final int IMPORTANCE_LOW = 1; // 0x1
- field public static final int IMPORTANCE_MAX = 4; // 0x4
+ field public static final int IMPORTANCE_DEFAULT = 3; // 0x3
+ field public static final int IMPORTANCE_HIGH = 4; // 0x4
+ field public static final int IMPORTANCE_LOW = 2; // 0x2
+ field public static final int IMPORTANCE_MAX = 5; // 0x5
+ field public static final int IMPORTANCE_MIN = 1; // 0x1
field public static final int IMPORTANCE_NONE = 0; // 0x0
field public static final int IMPORTANCE_UNSPECIFIED = -1000; // 0xfffffc18
}
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index 7b461b1..53c92bf 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -929,26 +929,31 @@
public static final int IMPORTANCE_NONE = 0;
/**
- * Low notification importance: only shows in the shade, below the fold.
+ * Min notification importance: only shows in the shade, below the fold.
*/
- public static final int IMPORTANCE_LOW = 1;
+ public static final int IMPORTANCE_MIN = 1;
/**
- * Default notification importance: shows everywhere, but is not intrusive.
+ * Low notification importance: shows everywhere, but is not intrusive.
*/
- public static final int IMPORTANCE_DEFAULT = 2;
+ public static final int IMPORTANCE_LOW = 2;
/**
- * Higher notification importance: shows everywhere, makes noise,
+ * Default notification importance: shows everywhere, allowed to makes noise,
* but does not visually intrude.
*/
- public static final int IMPORTANCE_HIGH = 3;
+ public static final int IMPORTANCE_DEFAULT = 3;
/**
- * Highest notification importance: shows everywhere, makes noise,
- * and also visually intrudes.
+ * Higher notification importance: shows everywhere, allowed to makes noise and peek.
*/
- public static final int IMPORTANCE_MAX = 4;
+ public static final int IMPORTANCE_HIGH = 4;
+
+ /**
+ * Highest notification importance: shows everywhere, allowed to makes noise, peek, and
+ * use full screen intents.
+ */
+ public static final int IMPORTANCE_MAX = 5;
private String mKey;
private int mRank = -1;
@@ -1041,7 +1046,7 @@
CharSequence explanation) {
mKey = key;
mRank = rank;
- mIsAmbient = importance < IMPORTANCE_DEFAULT;
+ mIsAmbient = importance < IMPORTANCE_LOW;
mMatchesInterruptionFilter = matchesInterruptionFilter;
mVisibilityOverride = visibilityOverride;
mSuppressedVisualEffects = suppressedVisualEffects;
@@ -1058,6 +1063,8 @@
return "UNSPECIFIED";
case IMPORTANCE_NONE:
return "NONE";
+ case IMPORTANCE_MIN:
+ return "MIN";
case IMPORTANCE_LOW:
return "LOW";
case IMPORTANCE_DEFAULT:
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 8bfd943dc..363b717 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -1219,6 +1219,8 @@
<!-- Notification importance title, blocked status-->
<string name="blocked_importance">Blocked</string>
+ <!-- Notification importance title, min status-->
+ <string name="min_importance">Min importance</string>
<!-- Notification importance title, low status-->
<string name="low_importance">Low importance</string>
<!-- Notification importance title, normal status-->
@@ -1231,17 +1233,20 @@
<!-- [CHAR LIMIT=100] Notification Importance slider: blocked importance level description -->
<string name="notification_importance_blocked">Never show these notifications</string>
+ <!-- [CHAR LIMIT=100] Notification Importance slider: min importance level description -->
+ <string name="notification_importance_min">Silently show at the bottom of the notification list</string>
+
<!-- [CHAR LIMIT=100] Notification Importance slider: low importance level description -->
- <string name="notification_importance_low">Silently show at the bottom of the notification list</string>
+ <string name="notification_importance_low">Silently show these notifications</string>
<!-- [CHAR LIMIT=100] Notification Importance slider: normal importance level description -->
- <string name="notification_importance_default">Silently show these notifications</string>
+ <string name="notification_importance_default">Allow these notification to make sounds</string>
<!-- [CHAR LIMIT=100] Notification Importance slider: high importance level description -->
- <string name="notification_importance_high">Show at the top of the notifications list and allow sound</string>
+ <string name="notification_importance_high">Peek onto the screen and allow sound and allow sound</string>
<!-- [CHAR LIMIT=100] Notification Importance slider: max importance level description -->
- <string name="notification_importance_max">Peek onto the screen and allow sound</string>
+ <string name="notification_importance_max">Show at the top of the notifications list, peek onto the screen and allow sound</string>
<!-- Notification: Control panel: Label for button that launches notification settings. [CHAR LIMIT=NONE] -->
<string name="notification_more_settings">More settings</string>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index cd0cd4a3..9bd645d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -110,7 +110,7 @@
import java.util.List;
import java.util.Locale;
-import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_MAX;
+import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_HIGH;
import static com.android.keyguard.KeyguardHostView.OnDismissAction;
public abstract class BaseStatusBar extends SystemUI implements
@@ -2215,6 +2215,16 @@
return false;
}
+ if (isSnoozedPackage(sbn)) {
+ if (DEBUG) Log.d(TAG, "No peeking: snoozed package: " + sbn.getKey());
+ return false;
+ }
+
+ if (mNotificationData.getImportance(sbn.getKey()) < IMPORTANCE_HIGH) {
+ if (DEBUG) Log.d(TAG, "No peeking: unimportant notification: " + sbn.getKey());
+ return false;
+ }
+
if (sbn.getNotification().fullScreenIntent != null) {
if (mAccessibilityManager.isTouchExplorationEnabled()) {
if (DEBUG) Log.d(TAG, "No peeking: accessible fullscreen: " + sbn.getKey());
@@ -2224,16 +2234,6 @@
}
}
- if (isSnoozedPackage(sbn)) {
- if (DEBUG) Log.d(TAG, "No peeking: snoozed package: " + sbn.getKey());
- return false;
- }
-
- if (mNotificationData.getImportance(sbn.getKey()) < IMPORTANCE_MAX) {
- if (DEBUG) Log.d(TAG, "No peeking: unimportant notification: " + sbn.getKey());
- return false;
- }
-
return true;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
index ccd0ad8..e300614 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
@@ -203,11 +203,11 @@
String mediaNotification = mEnvironment.getCurrentMediaNotificationKey();
- // PRIORITY_MIN media streams are allowed to drift to the bottom
+ // IMPORTANCE_MIN media streams are allowed to drift to the bottom
final boolean aMedia = a.key.equals(mediaNotification)
- && aImportance > Ranking.IMPORTANCE_LOW;
+ && aImportance > Ranking.IMPORTANCE_MIN;
final boolean bMedia = b.key.equals(mediaNotification)
- && bImportance > Ranking.IMPORTANCE_LOW;
+ && bImportance > Ranking.IMPORTANCE_MIN;
boolean aSystemMax = aImportance >= Ranking.IMPORTANCE_MAX &&
isSystemNotification(na);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
index 4386c3b..1c16bdc0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
@@ -183,7 +183,7 @@
mContext.getColor(R.color.notification_guts_disabled_icon_tint));
}
final int minProgress = systemApp ?
- NotificationListenerService.Ranking.IMPORTANCE_LOW
+ NotificationListenerService.Ranking.IMPORTANCE_MIN
: NotificationListenerService.Ranking.IMPORTANCE_NONE;
mSeekBar.setMax(NotificationListenerService.Ranking.IMPORTANCE_MAX);
mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@@ -216,6 +216,11 @@
R.string.notification_importance_blocked));
importanceTitle.setText(mContext.getString(R.string.blocked_importance));
break;
+ case NotificationListenerService.Ranking.IMPORTANCE_MIN:
+ importanceSummary.setText(mContext.getString(
+ R.string.notification_importance_min));
+ importanceTitle.setText(mContext.getString(R.string.min_importance));
+ break;
case NotificationListenerService.Ranking.IMPORTANCE_LOW:
importanceSummary.setText(mContext.getString(
R.string.notification_importance_low));
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index ac714e7..9b87a8a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1319,6 +1319,12 @@
if (DEBUG) {
Log.d(TAG, "No Fullscreen intent: suppressed by DND: " + notification.getKey());
}
+ } else if (mNotificationData.getImportance(notification.getKey())
+ < NotificationListenerService.Ranking.IMPORTANCE_MAX) {
+ if (DEBUG) {
+ Log.d(TAG, "No Fullscreen intent: not important enough: "
+ + notification.getKey());
+ }
} else {
// Stop screensaver if the notification has a full-screen intent.
// (like an incoming phone call)
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index c337c573..692e610 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -36,7 +36,7 @@
import static android.service.notification.NotificationListenerService.SUPPRESSED_EFFECT_SCREEN_ON;
import static android.service.notification.NotificationListenerService.TRIM_FULL;
import static android.service.notification.NotificationListenerService.TRIM_LIGHT;
-import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_HIGH;
+import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_DEFAULT;
import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_NONE;
import static org.xmlpull.v1.XmlPullParser.END_DOCUMENT;
import static org.xmlpull.v1.XmlPullParser.END_TAG;
@@ -2524,7 +2524,7 @@
final Notification notification = record.sbn.getNotification();
// Should this notification make noise, vibe, or use the LED?
- final boolean aboveThreshold = record.getImportance() >= IMPORTANCE_HIGH;
+ final boolean aboveThreshold = record.getImportance() >= IMPORTANCE_DEFAULT;
final boolean canInterrupt = aboveThreshold && !record.isIntercepted();
if (DBG || record.isIntercepted())
Slog.v(TAG,
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index 6c5685d..fd893fa 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -15,6 +15,7 @@
*/
package com.android.server.notification;
+import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_MIN;
import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_UNSPECIFIED;
import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_DEFAULT;
import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_HIGH;
@@ -33,6 +34,8 @@
import android.os.UserHandle;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
+import android.util.Log;
+import android.util.Slog;
import com.android.internal.annotations.VisibleForTesting;
import com.android.server.EventLogTags;
@@ -55,6 +58,8 @@
* {@hide}
*/
public final class NotificationRecord {
+ static final String TAG = "NotificationRecord";
+ static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
final StatusBarNotification sbn;
final int mOriginalFlags;
private final Context mContext;
@@ -123,6 +128,8 @@
switch (n.priority) {
case Notification.PRIORITY_MIN:
+ importance = IMPORTANCE_MIN;
+ break;
case Notification.PRIORITY_LOW:
importance = IMPORTANCE_LOW;
break;
@@ -143,25 +150,15 @@
|| n.sound != null
|| n.vibrate != null;
stats.isNoisy = isNoisy;
- if (!isNoisy && importance > IMPORTANCE_DEFAULT) {
- importance = IMPORTANCE_DEFAULT;
+
+ if (!isNoisy && importance > IMPORTANCE_LOW) {
+ importance = IMPORTANCE_LOW;
}
- try {
- final ApplicationInfo applicationInfo =
- mContext.getPackageManager().getApplicationInfoAsUser(sbn.getPackageName(),
- 0, sbn.getUser().getIdentifier());
- if (applicationInfo.targetSdkVersion < Build.VERSION_CODES.N) {
- if (isNoisy) {
- if (importance >= IMPORTANCE_HIGH) {
- importance = IMPORTANCE_MAX;
- } else {
- importance = IMPORTANCE_HIGH;
- }
- }
+ if (isNoisy) {
+ if (importance < IMPORTANCE_DEFAULT) {
+ importance = IMPORTANCE_DEFAULT;
}
- } catch (NameNotFoundException e) {
- // oh well.
}
if (n.fullScreenIntent != null) {
diff --git a/services/core/java/com/android/server/notification/NotificationUsageStats.java b/services/core/java/com/android/server/notification/NotificationUsageStats.java
index 0272850..538f951 100644
--- a/services/core/java/com/android/server/notification/NotificationUsageStats.java
+++ b/services/core/java/com/android/server/notification/NotificationUsageStats.java
@@ -597,8 +597,9 @@
private static class ImportanceHistogram {
// TODO define these somewhere else
- private static final int NUM_IMPORTANCES = 5;
- private static final String[] IMPORTANCE_NAMES = {"none", "low", "default", "high", "max"};
+ private static final int NUM_IMPORTANCES = 6;
+ private static final String[] IMPORTANCE_NAMES =
+ {"none", "min", "low", "default", "high", "max"};
private final Context mContext;
private final String[] mCounterNames;
private final String mPrefix;
diff --git a/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java b/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java
index f1fe346..32501ad 100644
--- a/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java
+++ b/services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java
@@ -15,12 +15,6 @@
*/
package com.android.server.notification;
-import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_UNSPECIFIED;
-import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_HIGH;
-import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_LOW;
-import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_MAX;
-import static android.service.notification.NotificationListenerService.Ranking.IMPORTANCE_NONE;
-
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
diff --git a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
index 9ac4dbf..2a3f143 100644
--- a/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
+++ b/tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java
@@ -86,6 +86,122 @@
}
private Test[] mTests = new Test[] {
+ new Test("Min priority") {
+ public void run()
+ {
+ Notification n = new Notification.Builder(NotificationTestList.this)
+ .setSmallIcon(R.drawable.icon2)
+ .setContentTitle("Min priority")
+ .setLights(0xff0000ff, 1, 0)
+ .setDefaults(Notification.DEFAULT_LIGHTS|Notification.DEFAULT_VIBRATE)
+ .setSound(Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
+ getPackageName() + "/raw/ringer"))
+ .setPriority(Notification.PRIORITY_MIN)
+ .setFullScreenIntent(makeIntent2(), false)
+ .build();
+ mNM.notify(7000, n);
+ }
+ },
+ new Test("Min priority, high pri flag") {
+ public void run()
+ {
+ Notification n = new Notification.Builder(NotificationTestList.this)
+ .setSmallIcon(R.drawable.icon2)
+ .setContentTitle("Min priority, high pri flag")
+ .setLights(0xff0000ff, 1, 0)
+ .setDefaults(Notification.DEFAULT_LIGHTS|Notification.DEFAULT_VIBRATE)
+ .setSound(Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
+ getPackageName() + "/raw/ringer"))
+ .setPriority(Notification.PRIORITY_MIN)
+ .setFullScreenIntent(makeIntent2(), true)
+ .build();
+ mNM.notify(7001, n);
+ }
+ },
+ new Test("Low priority") {
+ public void run()
+ {
+ Notification n = new Notification.Builder(NotificationTestList.this)
+ .setSmallIcon(R.drawable.icon2)
+ .setContentTitle("Low priority")
+ .setLights(0xff0000ff, 1, 0)
+ .setDefaults(Notification.DEFAULT_LIGHTS|Notification.DEFAULT_VIBRATE)
+ .setSound(Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
+ getPackageName() + "/raw/ringer"))
+ .setPriority(Notification.PRIORITY_LOW)
+ .setFullScreenIntent(makeIntent2(), false)
+ .build();
+ mNM.notify(7002, n);
+ }
+ },
+ new Test("Default priority") {
+ public void run()
+ {
+ Notification n = new Notification.Builder(NotificationTestList.this)
+ .setSmallIcon(R.drawable.icon2)
+ .setContentTitle("Default priority")
+ .setLights(0xff0000ff, 1, 0)
+ .setDefaults(Notification.DEFAULT_LIGHTS|Notification.DEFAULT_VIBRATE)
+ .setSound(Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
+ getPackageName() + "/raw/ringer"))
+ .setPriority(Notification.PRIORITY_DEFAULT)
+ .setFullScreenIntent(makeIntent2(), false)
+ .build();
+ mNM.notify(7004, n);
+ }
+ },
+ new Test("High priority") {
+ public void run()
+ {
+ Notification n = new Notification.Builder(NotificationTestList.this)
+ .setSmallIcon(R.drawable.icon2)
+ .setContentTitle("High priority")
+ .setLights(0xff0000ff, 1, 0)
+ .setDefaults(Notification.DEFAULT_LIGHTS|Notification.DEFAULT_VIBRATE)
+ .setSound(Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
+ getPackageName() + "/raw/ringer"))
+ .setPriority(Notification.PRIORITY_HIGH)
+ .setFullScreenIntent(makeIntent2(), false)
+ .build();
+ mNM.notify(7006, n);
+ }
+ },
+ new Test("Max priority") {
+ public void run()
+ {
+ Notification n = new Notification.Builder(NotificationTestList.this)
+ .setSmallIcon(R.drawable.icon2)
+ .setContentTitle("Max priority")
+ .setLights(0xff0000ff, 1, 0)
+ .setDefaults(Notification.DEFAULT_LIGHTS|Notification.DEFAULT_VIBRATE)
+ .setSound(Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
+ getPackageName() + "/raw/ringer"))
+ .setPriority(Notification.PRIORITY_MAX)
+ .setFullScreenIntent(makeIntent2(), false)
+ .build();
+ mNM.notify(7008, n);
+ }
+ },
+ new Test("Max priority with delay") {
+ public void run()
+ {
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ }
+ Notification n = new Notification.Builder(NotificationTestList.this)
+ .setSmallIcon(R.drawable.icon2)
+ .setContentTitle("Max priority")
+ .setLights(0xff0000ff, 1, 0)
+ .setDefaults(Notification.DEFAULT_LIGHTS|Notification.DEFAULT_VIBRATE)
+ .setSound(Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
+ getPackageName() + "/raw/ringer"))
+ .setPriority(Notification.PRIORITY_MAX)
+ .setFullScreenIntent(makeIntent2(), false)
+ .build();
+ mNM.notify(7008, n);
+ }
+ },
new Test("Off") {
public void run() {
PowerManager pm = (PowerManager)NotificationTestList.this.getSystemService(Context.POWER_SERVICE);