Loading api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -6313,6 +6313,8 @@ package android.app.job { method public static final long getMinimumPeriod(); method public int getNetworkType(); method public android.content.ComponentName getService(); method public long getTriggerContentMaxDelay(); method public long getTriggerContentUpdateDelay(); method public android.app.job.JobInfo.TriggerContentUri[] getTriggerContentUris(); method public boolean isPeriodic(); method public boolean isPersisted(); Loading Loading @@ -6343,6 +6345,8 @@ package android.app.job { method public android.app.job.JobInfo.Builder setRequiredNetworkType(int); method public android.app.job.JobInfo.Builder setRequiresCharging(boolean); method public android.app.job.JobInfo.Builder setRequiresDeviceIdle(boolean); method public android.app.job.JobInfo.Builder setTriggerContentMaxDelay(long); method public android.app.job.JobInfo.Builder setTriggerContentUpdateDelay(long); } public static final class JobInfo.TriggerContentUri implements android.os.Parcelable { api/system-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -6581,6 +6581,8 @@ package android.app.job { method public static final long getMinimumPeriod(); method public int getNetworkType(); method public android.content.ComponentName getService(); method public long getTriggerContentMaxDelay(); method public long getTriggerContentUpdateDelay(); method public android.app.job.JobInfo.TriggerContentUri[] getTriggerContentUris(); method public boolean isPeriodic(); method public boolean isPersisted(); Loading Loading @@ -6611,6 +6613,8 @@ package android.app.job { method public android.app.job.JobInfo.Builder setRequiredNetworkType(int); method public android.app.job.JobInfo.Builder setRequiresCharging(boolean); method public android.app.job.JobInfo.Builder setRequiresDeviceIdle(boolean); method public android.app.job.JobInfo.Builder setTriggerContentMaxDelay(long); method public android.app.job.JobInfo.Builder setTriggerContentUpdateDelay(long); } public static final class JobInfo.TriggerContentUri implements android.os.Parcelable { api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -6317,6 +6317,8 @@ package android.app.job { method public static final long getMinimumPeriod(); method public int getNetworkType(); method public android.content.ComponentName getService(); method public long getTriggerContentMaxDelay(); method public long getTriggerContentUpdateDelay(); method public android.app.job.JobInfo.TriggerContentUri[] getTriggerContentUris(); method public boolean isPeriodic(); method public boolean isPersisted(); Loading Loading @@ -6347,6 +6349,8 @@ package android.app.job { method public android.app.job.JobInfo.Builder setRequiredNetworkType(int); method public android.app.job.JobInfo.Builder setRequiresCharging(boolean); method public android.app.job.JobInfo.Builder setRequiresDeviceIdle(boolean); method public android.app.job.JobInfo.Builder setTriggerContentMaxDelay(long); method public android.app.job.JobInfo.Builder setTriggerContentUpdateDelay(long); } public static final class JobInfo.TriggerContentUri implements android.os.Parcelable { core/java/android/app/job/JobInfo.java +47 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,8 @@ public class JobInfo implements Parcelable { private final boolean requireCharging; private final boolean requireDeviceIdle; private final TriggerContentUri[] triggerContentUris; private final long triggerContentUpdateDelay; private final long triggerContentMaxDelay; private final boolean hasEarlyConstraint; private final boolean hasLateConstraint; private final int networkType; Loading Loading @@ -220,6 +222,22 @@ public class JobInfo implements Parcelable { return triggerContentUris; } /** * When triggering on content URI changes, this is the delay from when a change * is detected until the job is scheduled. */ public long getTriggerContentUpdateDelay() { return triggerContentUpdateDelay; } /** * When triggering on content URI changes, this is the maximum delay we will * use before scheduling the job. */ public long getTriggerContentMaxDelay() { return triggerContentMaxDelay; } /** * One of {@link android.app.job.JobInfo#NETWORK_TYPE_ANY}, * {@link android.app.job.JobInfo#NETWORK_TYPE_NONE}, or Loading Loading @@ -321,6 +339,8 @@ public class JobInfo implements Parcelable { requireCharging = in.readInt() == 1; requireDeviceIdle = in.readInt() == 1; triggerContentUris = in.createTypedArray(TriggerContentUri.CREATOR); triggerContentUpdateDelay = in.readLong(); triggerContentMaxDelay = in.readLong(); networkType = in.readInt(); minLatencyMillis = in.readLong(); maxExecutionDelayMillis = in.readLong(); Loading @@ -344,6 +364,8 @@ public class JobInfo implements Parcelable { triggerContentUris = b.mTriggerContentUris != null ? b.mTriggerContentUris.toArray(new TriggerContentUri[b.mTriggerContentUris.size()]) : null; triggerContentUpdateDelay = b.mTriggerContentUpdateDelay; triggerContentMaxDelay = b.mTriggerContentMaxDelay; networkType = b.mNetworkType; minLatencyMillis = b.mMinLatencyMillis; maxExecutionDelayMillis = b.mMaxExecutionDelayMillis; Loading Loading @@ -371,6 +393,8 @@ public class JobInfo implements Parcelable { out.writeInt(requireCharging ? 1 : 0); out.writeInt(requireDeviceIdle ? 1 : 0); out.writeTypedArray(triggerContentUris, flags); out.writeLong(triggerContentUpdateDelay); out.writeLong(triggerContentMaxDelay); out.writeInt(networkType); out.writeLong(minLatencyMillis); out.writeLong(maxExecutionDelayMillis); Loading Loading @@ -482,6 +506,8 @@ public class JobInfo implements Parcelable { private boolean mRequiresDeviceIdle; private int mNetworkType; private ArrayList<TriggerContentUri> mTriggerContentUris; private long mTriggerContentUpdateDelay = -1; private long mTriggerContentMaxDelay = -1; private boolean mIsPersisted; // One-off parameters. private long mMinLatencyMillis; Loading Loading @@ -587,6 +613,27 @@ public class JobInfo implements Parcelable { return this; } /** * Set the delay (in milliseconds) from when a content change is detected until * the job is scheduled. If there are more changes during that time, the delay * will be reset to start at the time of the most recent change. * @param durationMs Delay after most recent content change, in milliseconds. */ public Builder setTriggerContentUpdateDelay(long durationMs) { mTriggerContentUpdateDelay = durationMs; return this; } /** * Set the maximum total delay (in milliseconds) that is allowed from the first * time a content change is detected until the job is scheduled. * @param durationMs Delay after initial content change, in milliseconds. */ public Builder setTriggerContentMaxDelay(long durationMs) { mTriggerContentMaxDelay = durationMs; return this; } /** * Specify that this job should recur with the provided interval, not more than once per * period. You have no control over when within this interval this job will be executed, Loading services/core/java/com/android/server/job/JobSchedulerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,10 @@ public final class JobSchedulerService extends com.android.server.SystemService return mLock; } public JobStore getJobStore() { return mJobs; } @Override public void onStartUser(int userHandle) { mStartedUsers = ArrayUtils.appendInt(mStartedUsers, userHandle); Loading Loading
api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -6313,6 +6313,8 @@ package android.app.job { method public static final long getMinimumPeriod(); method public int getNetworkType(); method public android.content.ComponentName getService(); method public long getTriggerContentMaxDelay(); method public long getTriggerContentUpdateDelay(); method public android.app.job.JobInfo.TriggerContentUri[] getTriggerContentUris(); method public boolean isPeriodic(); method public boolean isPersisted(); Loading Loading @@ -6343,6 +6345,8 @@ package android.app.job { method public android.app.job.JobInfo.Builder setRequiredNetworkType(int); method public android.app.job.JobInfo.Builder setRequiresCharging(boolean); method public android.app.job.JobInfo.Builder setRequiresDeviceIdle(boolean); method public android.app.job.JobInfo.Builder setTriggerContentMaxDelay(long); method public android.app.job.JobInfo.Builder setTriggerContentUpdateDelay(long); } public static final class JobInfo.TriggerContentUri implements android.os.Parcelable {
api/system-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -6581,6 +6581,8 @@ package android.app.job { method public static final long getMinimumPeriod(); method public int getNetworkType(); method public android.content.ComponentName getService(); method public long getTriggerContentMaxDelay(); method public long getTriggerContentUpdateDelay(); method public android.app.job.JobInfo.TriggerContentUri[] getTriggerContentUris(); method public boolean isPeriodic(); method public boolean isPersisted(); Loading Loading @@ -6611,6 +6613,8 @@ package android.app.job { method public android.app.job.JobInfo.Builder setRequiredNetworkType(int); method public android.app.job.JobInfo.Builder setRequiresCharging(boolean); method public android.app.job.JobInfo.Builder setRequiresDeviceIdle(boolean); method public android.app.job.JobInfo.Builder setTriggerContentMaxDelay(long); method public android.app.job.JobInfo.Builder setTriggerContentUpdateDelay(long); } public static final class JobInfo.TriggerContentUri implements android.os.Parcelable {
api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -6317,6 +6317,8 @@ package android.app.job { method public static final long getMinimumPeriod(); method public int getNetworkType(); method public android.content.ComponentName getService(); method public long getTriggerContentMaxDelay(); method public long getTriggerContentUpdateDelay(); method public android.app.job.JobInfo.TriggerContentUri[] getTriggerContentUris(); method public boolean isPeriodic(); method public boolean isPersisted(); Loading Loading @@ -6347,6 +6349,8 @@ package android.app.job { method public android.app.job.JobInfo.Builder setRequiredNetworkType(int); method public android.app.job.JobInfo.Builder setRequiresCharging(boolean); method public android.app.job.JobInfo.Builder setRequiresDeviceIdle(boolean); method public android.app.job.JobInfo.Builder setTriggerContentMaxDelay(long); method public android.app.job.JobInfo.Builder setTriggerContentUpdateDelay(long); } public static final class JobInfo.TriggerContentUri implements android.os.Parcelable {
core/java/android/app/job/JobInfo.java +47 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,8 @@ public class JobInfo implements Parcelable { private final boolean requireCharging; private final boolean requireDeviceIdle; private final TriggerContentUri[] triggerContentUris; private final long triggerContentUpdateDelay; private final long triggerContentMaxDelay; private final boolean hasEarlyConstraint; private final boolean hasLateConstraint; private final int networkType; Loading Loading @@ -220,6 +222,22 @@ public class JobInfo implements Parcelable { return triggerContentUris; } /** * When triggering on content URI changes, this is the delay from when a change * is detected until the job is scheduled. */ public long getTriggerContentUpdateDelay() { return triggerContentUpdateDelay; } /** * When triggering on content URI changes, this is the maximum delay we will * use before scheduling the job. */ public long getTriggerContentMaxDelay() { return triggerContentMaxDelay; } /** * One of {@link android.app.job.JobInfo#NETWORK_TYPE_ANY}, * {@link android.app.job.JobInfo#NETWORK_TYPE_NONE}, or Loading Loading @@ -321,6 +339,8 @@ public class JobInfo implements Parcelable { requireCharging = in.readInt() == 1; requireDeviceIdle = in.readInt() == 1; triggerContentUris = in.createTypedArray(TriggerContentUri.CREATOR); triggerContentUpdateDelay = in.readLong(); triggerContentMaxDelay = in.readLong(); networkType = in.readInt(); minLatencyMillis = in.readLong(); maxExecutionDelayMillis = in.readLong(); Loading @@ -344,6 +364,8 @@ public class JobInfo implements Parcelable { triggerContentUris = b.mTriggerContentUris != null ? b.mTriggerContentUris.toArray(new TriggerContentUri[b.mTriggerContentUris.size()]) : null; triggerContentUpdateDelay = b.mTriggerContentUpdateDelay; triggerContentMaxDelay = b.mTriggerContentMaxDelay; networkType = b.mNetworkType; minLatencyMillis = b.mMinLatencyMillis; maxExecutionDelayMillis = b.mMaxExecutionDelayMillis; Loading Loading @@ -371,6 +393,8 @@ public class JobInfo implements Parcelable { out.writeInt(requireCharging ? 1 : 0); out.writeInt(requireDeviceIdle ? 1 : 0); out.writeTypedArray(triggerContentUris, flags); out.writeLong(triggerContentUpdateDelay); out.writeLong(triggerContentMaxDelay); out.writeInt(networkType); out.writeLong(minLatencyMillis); out.writeLong(maxExecutionDelayMillis); Loading Loading @@ -482,6 +506,8 @@ public class JobInfo implements Parcelable { private boolean mRequiresDeviceIdle; private int mNetworkType; private ArrayList<TriggerContentUri> mTriggerContentUris; private long mTriggerContentUpdateDelay = -1; private long mTriggerContentMaxDelay = -1; private boolean mIsPersisted; // One-off parameters. private long mMinLatencyMillis; Loading Loading @@ -587,6 +613,27 @@ public class JobInfo implements Parcelable { return this; } /** * Set the delay (in milliseconds) from when a content change is detected until * the job is scheduled. If there are more changes during that time, the delay * will be reset to start at the time of the most recent change. * @param durationMs Delay after most recent content change, in milliseconds. */ public Builder setTriggerContentUpdateDelay(long durationMs) { mTriggerContentUpdateDelay = durationMs; return this; } /** * Set the maximum total delay (in milliseconds) that is allowed from the first * time a content change is detected until the job is scheduled. * @param durationMs Delay after initial content change, in milliseconds. */ public Builder setTriggerContentMaxDelay(long durationMs) { mTriggerContentMaxDelay = durationMs; return this; } /** * Specify that this job should recur with the provided interval, not more than once per * period. You have no control over when within this interval this job will be executed, Loading
services/core/java/com/android/server/job/JobSchedulerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,10 @@ public final class JobSchedulerService extends com.android.server.SystemService return mLock; } public JobStore getJobStore() { return mJobs; } @Override public void onStartUser(int userHandle) { mStartedUsers = ArrayUtils.appendInt(mStartedUsers, userHandle); Loading