/**@class android.service.watchdog.ExplicitHealthCheckService @extends android.app.Service A service to provide packages supporting explicit health checks and route checks to these packages on behalf of the package watchdog. <p>To extend this class, you must declare the service in your manifest file with the {@link android.Manifest.permission#BIND_EXPLICIT_HEALTH_CHECK_SERVICE} permission, and include an intent filter with the {@link #SERVICE_INTERFACE} action. In adddition, your implementation must live in {@link PackageManger#SYSTEM_SHARED_LIBRARY_SERVICES}. For example:</p> <pre> <service android:name=".FooExplicitHealthCheckService" android:exported="true" android:priority="100" android:permission="android.permission.BIND_EXPLICIT_HEALTH_CHECK_SERVICE"> <intent-filter> <action android:name="android.service.watchdog.ExplicitHealthCheckService" /> </intent-filter> </service> </pre> @hide */ var ExplicitHealthCheckService = { /** {@link Bundle} key for a {@link List} of {@link android.service.watchdog.ExplicitHealthCheckService.PackageConfig} value. {@hide} */ EXTRA_SUPPORTED_PACKAGES : "android.service.watchdog.extra.supported_packages", /** {@link Bundle} key for a {@link List} of {@link String} value. {@hide} */ EXTRA_REQUESTED_PACKAGES : "android.service.watchdog.extra.requested_packages", /** {@link Bundle} key for a {@link String} value. {@hide} */ EXTRA_HEALTH_CHECK_PASSED_PACKAGE : "android.service.watchdog.extra.health_check_passed_package", /** The Intent action that a service must respond to. Add it to the intent filter of the service in its manifest. */ SERVICE_INTERFACE : "android.service.watchdog.ExplicitHealthCheckService", /** The permission that a service must require to ensure that only Android system can bind to it. If this permission is not enforced in the AndroidManifest of the service, the system will skip that service. */ BIND_PERMISSION : "android.permission.BIND_EXPLICIT_HEALTH_CHECK_SERVICE", /**Called when the system requests an explicit health check for {@code packageName}. <p> When {@code packageName} passes the check, implementors should call {@link #notifyHealthCheckPassed} to inform the system. <p> It could take many hours before a {@code packageName} passes a check and implementors should never drop requests unless {@link onCancel} is called or the service dies. <p> Requests should not be queued and additional calls while expecting a result for {@code packageName} should have no effect. */ onRequestHealthCheck : function( ) {}, /**Called when the system cancels the explicit health check request for {@code packageName}. Should do nothing if there are is no active request for {@code packageName}. */ onCancelHealthCheck : function( ) {}, /**Called when the system requests for all the packages supporting explicit health checks. The system may request an explicit health check for any of these packages with {@link #onRequestHealthCheck}. @return {Object {java.util.List}} all packages supporting explicit health checks */ onGetSupportedPackages : function( ) {}, /**Called when the system requests for all the packages that it has currently requested an explicit health check for. @return {Object {java.util.List}} all packages expecting an explicit health check result */ onGetRequestedPackages : function( ) {}, /** */ onBind : function( ) {}, /**Implementors should call this to notify the system when explicit health check passes for {@code packageName}; */ notifyHealthCheckPassed : function( ) {}, };