diff options
author | Matthew Williams <mjwilliams@google.com> | 2014-05-14 11:06:04 -0700 |
---|---|---|
committer | Matthew Williams <mjwilliams@google.com> | 2014-05-29 00:45:02 +0000 |
commit | 9b9244b6941110ea2d940d9fc8eed0cdff96a016 (patch) | |
tree | 264c2df2c71b23437e66bf829e61b9ff46b2aa72 /api | |
parent | 3326a8782f7aae58b76b96d52d7756787ab401d0 (diff) | |
download | frameworks_base-9b9244b6941110ea2d940d9fc8eed0cdff96a016.zip frameworks_base-9b9244b6941110ea2d940d9fc8eed0cdff96a016.tar.gz frameworks_base-9b9244b6941110ea2d940d9fc8eed0cdff96a016.tar.bz2 |
DO NOT MERGE Implementation of TaskManager reschedule/cancel
Issues here:
"Reschedule" of an idle-mode task is not well-defined. In the
API I throw an error if you try to set a back-off policy on
an idle mode task.
Implementation-wise, i add a delay for a reschedule request of an
idle mode task. This means that if the phone's still in idle mode
after the delay they app will get a call back, but otherwise it'll
have to wait til the next one.
Implemented all API functions
Diffstat (limited to 'api')
-rw-r--r-- | api/current.txt | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/api/current.txt b/api/current.txt index 2b6189a..8741d6d 100644 --- a/api/current.txt +++ b/api/current.txt @@ -5355,13 +5355,13 @@ package android.app.task { method public int describeContents(); method public int getBackoffPolicy(); method public android.os.Bundle getExtras(); + method public int getId(); method public long getInitialBackoffMillis(); method public long getIntervalMillis(); method public long getMaxExecutionDelayMillis(); method public long getMinLatencyMillis(); method public int getNetworkCapabilities(); method public android.content.ComponentName getService(); - method public int getTaskId(); method public boolean isPeriodic(); method public boolean isRequireCharging(); method public boolean isRequireDeviceIdle(); @@ -5374,7 +5374,7 @@ package android.app.task { field public static final int LINEAR = 0; // 0x0 } - public final class Task.Builder { + public static final class Task.Builder { ctor public Task.Builder(int, android.content.ComponentName); method public android.app.task.Task build(); method public android.app.task.Task.Builder setBackoffCriteria(long, int); @@ -5388,8 +5388,9 @@ package android.app.task { } public static abstract interface Task.NetworkType { - field public static final int ANY = 0; // 0x0 - field public static final int UNMETERED = 1; // 0x1 + field public static final int ANY = 1; // 0x1 + field public static final int NONE = 0; // 0x0 + field public static final int UNMETERED = 2; // 0x2 } public abstract class TaskManager { @@ -5398,8 +5399,8 @@ package android.app.task { method public abstract void cancelAll(); method public abstract java.util.List<android.app.task.Task> getAllPendingTasks(); method public abstract int schedule(android.app.task.Task); - field public static final int RESULT_INVALID_PARAMETERS = -1; // 0xffffffff - field public static final int RESULT_OVER_QUOTA = -2; // 0xfffffffe + field public static final int RESULT_FAILURE = 0; // 0x0 + field public static final int RESULT_SUCCESS = 1; // 0x1 } public class TaskParams implements android.os.Parcelable { |