Merge "Clarify how FGS restriction won't apply STICKY FGS restarts" into sc-dev am: 0c1dc2fc76 am: a33d48c48e am: b2d01a74d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15484572
Change-Id: I838f64e7670fc8f91c02a139ae224e118c8dad3b
diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java
index 7cb1d89..3363872 100644
--- a/core/java/android/app/Service.java
+++ b/core/java/android/app/Service.java
@@ -387,6 +387,13 @@
* <p>This mode makes sense for things that will be explicitly started
* and stopped to run for arbitrary periods of time, such as a service
* performing background music playback.
+ *
+ * <p>Since Android version {@link Build.VERSION_CODES#S}, apps
+ * targeting {@link Build.VERSION_CODES#S} or above are disallowed
+ * to start a foreground service from the background, but the restriction
+ * doesn't impact <em>restarts</em> of a sticky foreground service. However,
+ * when apps start a sticky foreground service from the background,
+ * the same restriction still applies.
*/
public static final int START_STICKY = 1;