Update documentation to make it clear what app being foreground means for bubbles
Test: it compiles
Fixes: 135518045
Change-Id: Id2455ad1b18ecd1a5a192c8c5bd3f73e28109c9c
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index ddc744e..d95d3ba 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -8535,7 +8535,10 @@
* If set and the app creating the bubble is in the foreground, the bubble will be posted
* in its expanded state, with the contents of {@link #getIntent()} in a floating window.
*
- * <p>If the app creating the bubble is not in the foreground this flag has no effect.</p>
+ * <p>This flag has no effect if the app posting the bubble is not in the foreground.
+ * The app is considered foreground if it is visible and on the screen, note that
+ * a foreground service does not qualify.
+ * </p>
*
* <p>Generally this flag should only be set if the user has performed an action to request
* or create a bubble.</p>
@@ -8548,7 +8551,10 @@
* If set and the app posting the bubble is in the foreground, the bubble will
* be posted <b>without</b> the associated notification in the notification shade.
*
- * <p>If the app posting the bubble is not in the foreground this flag has no effect.</p>
+ * <p>This flag has no effect if the app posting the bubble is not in the foreground.
+ * The app is considered foreground if it is visible and on the screen, note that
+ * a foreground service does not qualify.
+ * </p>
*
* <p>Generally this flag should only be set if the user has performed an action to request
* or create a bubble, or if the user has seen the content in the notification and the
@@ -8802,6 +8808,8 @@
* {@link #getIntent()} in a floating window).
*
* <p>This flag has no effect if the app posting the bubble is not in the foreground.
+ * The app is considered foreground if it is visible and on the screen, note that
+ * a foreground service does not qualify.
* </p>
*
* <p>Generally, this flag should only be set if the user has performed an action to
@@ -8820,6 +8828,8 @@
* the notification shade.
*
* <p>This flag has no effect if the app posting the bubble is not in the foreground.
+ * The app is considered foreground if it is visible and on the screen, note that
+ * a foreground service does not qualify.
* </p>
*
* <p>Generally, this flag should only be set if the user has performed an action to