From 57df4fd69e96c901ac0a027aa913f3f9086fbbf6 Mon Sep 17 00:00:00 2001 From: Matthew Williams Date: Thu, 1 May 2014 10:55:28 -0700 Subject: [PATCH] Address comments/fix javadoc in TaskManager API Change-Id: I0cdff12971b88acb40571a5e63b7d644ef629911 --- core/java/android/app/task/ITaskCallback.aidl | 3 ++- core/java/android/app/task/ITaskService.aidl | 6 +++--- core/java/android/app/task/TaskService.java | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/java/android/app/task/ITaskCallback.aidl b/core/java/android/app/task/ITaskCallback.aidl index 63fcdd876ed42..ffa57d1e8fefd 100644 --- a/core/java/android/app/task/ITaskCallback.aidl +++ b/core/java/android/app/task/ITaskCallback.aidl @@ -47,6 +47,7 @@ interface ITaskCallback { * the next one and stop attributing wakelock time to us etc. * * @param taskId Unique integer used to identify this task. + * @param reschedule Whether or not to reschedule this task. */ - void taskFinished(int taskId, boolean taskFailed); + void taskFinished(int taskId, boolean reschedule); } diff --git a/core/java/android/app/task/ITaskService.aidl b/core/java/android/app/task/ITaskService.aidl index c25abc59b22d8..87b019198650f 100644 --- a/core/java/android/app/task/ITaskService.aidl +++ b/core/java/android/app/task/ITaskService.aidl @@ -22,9 +22,9 @@ import android.app.task.TaskParams; import android.os.Bundle; /** - * Interface that the framework uses to communicate with application code - * that implements a TaskService. End user code does not implement this interface directly; - * instead, the app's idle service implementation will extend android.app.maintenance.IdleService. + * Interface that the framework uses to communicate with application code that implements a + * TaskService. End user code does not implement this interface directly; instead, the app's + * service implementation will extend android.app.task.TaskService. * {@hide} */ oneway interface ITaskService { diff --git a/core/java/android/app/task/TaskService.java b/core/java/android/app/task/TaskService.java index d22f7f11bc8e9..81333be2b548a 100644 --- a/core/java/android/app/task/TaskService.java +++ b/core/java/android/app/task/TaskService.java @@ -31,7 +31,7 @@ import com.android.internal.annotations.GuardedBy; /** *

Entry point for the callback from the {@link android.content.TaskManager}.

*

This is the base class that handles asynchronous requests that were previously scheduled. You - * are responsible for overriding {@Link AbstracTaskService#onPerformTask(Bundle)}, which is where + * are responsible for overriding {@link TaskService#onStartTask(TaskParams)}, which is where * you will implement your task logic.

*

This service executes each incoming task on a {@link android.os.Handler} running on your * application's main thread. This means that you must offload your execution logic to @@ -61,7 +61,7 @@ public abstract class TaskService extends Service { /** * Identifier for a message that will result in a call to - * {@link #onStartTask(android.app.task.TaskParams, android.os.Bundle)}. + * {@link #onStartTask(android.app.task.TaskParams)}. */ private final int MSG_EXECUTE_TASK = 0; /**