From 6c4d71f23ae471db573a71ea0b6575d182cb205e Mon Sep 17 00:00:00 2001 From: Varun Shah Date: Wed, 1 May 2024 00:32:18 +0000 Subject: Update wording of onTimeout javadoc. Bug: 330399444 Test: n/a (doc change) Change-Id: I220d15abbed8c5e166beac10bfcc12d390e9a887 --- core/java/android/app/Service.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java index 9b3fb5c73415..726064e39778 100644 --- a/core/java/android/app/Service.java +++ b/core/java/android/app/Service.java @@ -1198,17 +1198,18 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac * Callback called when a particular foreground service type has timed out. * *

This callback is meant to give the app a small grace period of a few seconds to finish - * the foreground service of the offending type - if it fails to do so, the app will be + * the foreground service of the associated type - if it fails to do so, the app will be * declared an ANR. * - *

The foreground service of the offending type can be stopped within the time limit by + *

The foreground service of the associated type can be stopped within the time limit by * {@link android.app.Service#stopSelf()}, * {@link android.content.Context#stopService(android.content.Intent)} or their overloads. * {@link android.app.Service#stopForeground(int)} can be used as well, which demotes the * service to a "background" service, which will soon be stopped by the system. * *

The specific time limit for each type (if one exists) is mentioned in the documentation - * for that foreground service type. + * for that foreground service type. See + * {@link ServiceInfo#FOREGROUND_SERVICE_TYPE_DATA_SYNC dataSync} for example. * *

Note: time limits are restricted to a rolling 24-hour window - for example, if a * foreground service type has a time limit of 6 hours, that time counter begins as soon as the -- cgit v1.2.3-59-g8ed1b