summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2017-08-03 00:29:25 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-08-03 00:29:25 +0000
commit530cfc1db33a8c937141d39752c6564aeae60b5c (patch)
tree2b90ca574312d3b0d912625cce41d6cf83f8b3f2
parent7606d4798bc0fcc227b6f08779f5435908fd9021 (diff)
parent6e5bd3f9f805cc074248a86160b9ea340e10be14 (diff)
Merge "Add documentation for MIN notification interaction with fg services." into oc-mr1-dev
-rw-r--r--core/java/android/app/NotificationManager.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/java/android/app/NotificationManager.java b/core/java/android/app/NotificationManager.java
index 885817231175..34343e9e106a 100644
--- a/core/java/android/app/NotificationManager.java
+++ b/core/java/android/app/NotificationManager.java
@@ -204,7 +204,12 @@ public class NotificationManager {
public static final int IMPORTANCE_NONE = 0;
/**
- * Min notification importance: only shows in the shade, below the fold.
+ * Min notification importance: only shows in the shade, below the fold. This should
+ * not be used with {@link Service#startForeground(int, Notification) Service.startForeground}
+ * since a foreground service is supposed to be something the user cares about so it does
+ * not make semantic sense to mark its notification as minimum importance. If you do this
+ * as of Android version {@link android.os.Build.VERSION_CODES#O}, the system will show
+ * a higher-priority notification about your app running in the background.
*/
public static final int IMPORTANCE_MIN = 1;