Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d920ce1a authored by Varun Shah's avatar Varun Shah Committed by Android (Google) Code Review
Browse files

Merge "Update wording of onTimeout javadoc." into main

parents 872ce8d2 6c4d71f2
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1198,17 +1198,18 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac
     * Callback called when a particular foreground service type has timed out.
     *
     * <p>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.
     *
     * <p>The foreground service of the offending type can be stopped within the time limit by
     * <p>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.
     *
     * <p>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.
     *
     * <p>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