When a foreground service reaches the six-hour limit, the service has a few seconds to call
Service.stopSelf(). When the system calls Service.onTimeout(), the service is no longer considered a foreground service. If the service does not call Service.stopSelf(), the system throws an internal exception. The exception is logged in
Logcat with the following message:
Fatal Exception: android.app.RemoteServiceException: "A foreground service of
type [service type] did not stop within its timeout: [component name]"