diff options
author | Makoto Onuki <omakoto@google.com> | 2021-08-11 21:17:20 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-08-11 21:17:20 +0000 |
commit | 0c1dc2fc769c678d53ad59a00653a11595f6b0fd (patch) | |
tree | 620b3b5b0a6882f15c2a73424b5b99ed2863ffa9 | |
parent | f16b3f76aafeb2bc0ca2ca9f6194ee68490d5421 (diff) | |
parent | 5031c3a4f63a4a843eefdb49fe5e06ea25a4e482 (diff) | |
download | base-0c1dc2fc769c678d53ad59a00653a11595f6b0fd.tar.gz |
Merge "Clarify how FGS restriction won't apply STICKY FGS restarts" into sc-dev
-rw-r--r-- | core/java/android/app/Service.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java index 7cb1d89aa954..336387204410 100644 --- a/core/java/android/app/Service.java +++ b/core/java/android/app/Service.java @@ -387,6 +387,13 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac * <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; |