diff --git a/core/java/android/content/pm/ServiceInfo.java b/core/java/android/content/pm/ServiceInfo.java index 02b930860a844..1a3c3d97634c4 100644 --- a/core/java/android/content/pm/ServiceInfo.java +++ b/core/java/android/content/pm/ServiceInfo.java @@ -376,8 +376,8 @@ public class ServiceInfo extends ComponentInfo *
Unlike other foreground service types, this type is not associated with a specific use * case, and it will not require any special permissions - * (besides {@link Manifest.permission#FOREGROUND_SERVICE}). + * (besides {@link android.Manifest.permission#FOREGROUND_SERVICE}). * * However, this type has the following restrictions. * @@ -401,19 +401,21 @@ public class ServiceInfo extends ComponentInfo *
The system will not automatically stop it. - * *
If the service isn't stopped within the timeout, - * {@link android.app.Service#onTimeout(int)} will be called. + * {@link android.app.Service#onTimeout(int)} will be called. Note, even when the + * system calls this callback, it will not stop the service automatically. + * You still need to stop the service using one of the aforementioned + * ways even when you get this callback. * *
If the service is still not stopped after the callback, - * the app will be declared an ANR after a short grace period of several seconds. - * + * the app will be declared an ANR, after a short grace period of several seconds. *