Loading core/java/android/app/job/JobInfo.java +15 −2 Original line number Diff line number Diff line Loading @@ -83,6 +83,9 @@ public class JobInfo implements Parcelable { /* Minimum flex for a periodic job, in milliseconds. */ private static final long MIN_FLEX_MILLIS = 5 * 60 * 1000L; // 5 minutes /* Minimum backoff interval for a job, in milliseconds */ private static final long MIN_BACKOFF_MILLIS = 10 * 1000L; // 10 seconds /** * Query the minimum interval allowed for periodic scheduled jobs. Attempting * to declare a smaller period that this when scheduling a job will result in a Loading @@ -105,6 +108,14 @@ public class JobInfo implements Parcelable { return MIN_FLEX_MILLIS; } /** * Query the minimum automatic-reschedule backoff interval permitted for jobs. * @hide */ public static final long getMinBackoffMillis() { return MIN_BACKOFF_MILLIS; } /** * Default type of backoff. * @hide Loading Loading @@ -361,7 +372,8 @@ public class JobInfo implements Parcelable { * job does not recur periodically. */ public long getIntervalMillis() { return intervalMillis >= getMinPeriodMillis() ? intervalMillis : getMinPeriodMillis(); final long minInterval = getMinPeriodMillis(); return intervalMillis >= minInterval ? intervalMillis : minInterval; } /** Loading @@ -381,7 +393,8 @@ public class JobInfo implements Parcelable { * to 5 seconds. */ public long getInitialBackoffMillis() { return initialBackoffMillis; final long minBackoff = getMinBackoffMillis(); return initialBackoffMillis >= minBackoff ? initialBackoffMillis : minBackoff; } /** Loading services/core/java/com/android/server/job/JobServiceContext.java +2 −1 Original line number Diff line number Diff line Loading @@ -597,7 +597,8 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne service.stopJob(mParams); } catch (RemoteException e) { Slog.e(TAG, "Error sending onStopJob to client.", e); closeAndCleanupJobH(false /* reschedule */); // The job's host app apparently crashed during the job, so we should reschedule. closeAndCleanupJobH(true /* reschedule */); } } Loading Loading
core/java/android/app/job/JobInfo.java +15 −2 Original line number Diff line number Diff line Loading @@ -83,6 +83,9 @@ public class JobInfo implements Parcelable { /* Minimum flex for a periodic job, in milliseconds. */ private static final long MIN_FLEX_MILLIS = 5 * 60 * 1000L; // 5 minutes /* Minimum backoff interval for a job, in milliseconds */ private static final long MIN_BACKOFF_MILLIS = 10 * 1000L; // 10 seconds /** * Query the minimum interval allowed for periodic scheduled jobs. Attempting * to declare a smaller period that this when scheduling a job will result in a Loading @@ -105,6 +108,14 @@ public class JobInfo implements Parcelable { return MIN_FLEX_MILLIS; } /** * Query the minimum automatic-reschedule backoff interval permitted for jobs. * @hide */ public static final long getMinBackoffMillis() { return MIN_BACKOFF_MILLIS; } /** * Default type of backoff. * @hide Loading Loading @@ -361,7 +372,8 @@ public class JobInfo implements Parcelable { * job does not recur periodically. */ public long getIntervalMillis() { return intervalMillis >= getMinPeriodMillis() ? intervalMillis : getMinPeriodMillis(); final long minInterval = getMinPeriodMillis(); return intervalMillis >= minInterval ? intervalMillis : minInterval; } /** Loading @@ -381,7 +393,8 @@ public class JobInfo implements Parcelable { * to 5 seconds. */ public long getInitialBackoffMillis() { return initialBackoffMillis; final long minBackoff = getMinBackoffMillis(); return initialBackoffMillis >= minBackoff ? initialBackoffMillis : minBackoff; } /** Loading
services/core/java/com/android/server/job/JobServiceContext.java +2 −1 Original line number Diff line number Diff line Loading @@ -597,7 +597,8 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne service.stopJob(mParams); } catch (RemoteException e) { Slog.e(TAG, "Error sending onStopJob to client.", e); closeAndCleanupJobH(false /* reschedule */); // The job's host app apparently crashed during the job, so we should reschedule. closeAndCleanupJobH(true /* reschedule */); } } Loading