Merge "API feedback: rename JobInfo methods for clarity" into nyc-dev
This commit is contained in:
@@ -6323,9 +6323,9 @@ package android.app.job {
|
||||
method public long getInitialBackoffMillis();
|
||||
method public long getIntervalMillis();
|
||||
method public long getMaxExecutionDelayMillis();
|
||||
method public static final long getMinFlexMillis();
|
||||
method public long getMinLatencyMillis();
|
||||
method public static final long getMinimumFlex();
|
||||
method public static final long getMinimumPeriod();
|
||||
method public static final long getMinPeriodMillis();
|
||||
method public int getNetworkType();
|
||||
method public android.content.ComponentName getService();
|
||||
method public long getTriggerContentMaxDelay();
|
||||
@@ -51405,7 +51405,6 @@ package java.lang {
|
||||
method public java.lang.StringBuffer insert(int, double);
|
||||
method public synchronized java.lang.StringBuffer replace(int, int, java.lang.String);
|
||||
method public synchronized java.lang.StringBuffer reverse();
|
||||
method public synchronized java.lang.String toString();
|
||||
}
|
||||
|
||||
public final class StringBuilder extends java.lang.AbstractStringBuilder implements java.lang.Appendable java.lang.CharSequence java.io.Serializable {
|
||||
@@ -51443,7 +51442,6 @@ package java.lang {
|
||||
method public java.lang.StringBuilder insert(int, double);
|
||||
method public java.lang.StringBuilder replace(int, int, java.lang.String);
|
||||
method public java.lang.StringBuilder reverse();
|
||||
method public java.lang.String toString();
|
||||
}
|
||||
|
||||
public class StringIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException {
|
||||
@@ -51807,9 +51805,7 @@ package java.lang.reflect {
|
||||
}
|
||||
|
||||
public final class Constructor extends java.lang.reflect.AccessibleObject implements java.lang.reflect.GenericDeclaration java.lang.reflect.Member {
|
||||
method public boolean equals(java.lang.Object);
|
||||
method public A getAnnotation(java.lang.Class<A>);
|
||||
method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
|
||||
method public java.lang.Class<T> getDeclaringClass();
|
||||
method public java.lang.Class<?>[] getExceptionTypes();
|
||||
method public java.lang.reflect.Type[] getGenericExceptionTypes();
|
||||
@@ -51894,7 +51890,6 @@ package java.lang.reflect {
|
||||
}
|
||||
|
||||
public final class Method extends java.lang.reflect.AccessibleObject implements java.lang.reflect.GenericDeclaration java.lang.reflect.Member {
|
||||
method public boolean equals(java.lang.Object);
|
||||
method public A getAnnotation(java.lang.Class<A>);
|
||||
method public java.lang.Class<?> getDeclaringClass();
|
||||
method public java.lang.Object getDefaultValue();
|
||||
|
||||
@@ -6604,9 +6604,9 @@ package android.app.job {
|
||||
method public long getInitialBackoffMillis();
|
||||
method public long getIntervalMillis();
|
||||
method public long getMaxExecutionDelayMillis();
|
||||
method public static final long getMinFlexMillis();
|
||||
method public long getMinLatencyMillis();
|
||||
method public static final long getMinimumFlex();
|
||||
method public static final long getMinimumPeriod();
|
||||
method public static final long getMinPeriodMillis();
|
||||
method public int getNetworkType();
|
||||
method public android.content.ComponentName getService();
|
||||
method public long getTriggerContentMaxDelay();
|
||||
@@ -54760,7 +54760,6 @@ package java.lang {
|
||||
method public java.lang.StringBuffer insert(int, double);
|
||||
method public synchronized java.lang.StringBuffer replace(int, int, java.lang.String);
|
||||
method public synchronized java.lang.StringBuffer reverse();
|
||||
method public synchronized java.lang.String toString();
|
||||
}
|
||||
|
||||
public final class StringBuilder extends java.lang.AbstractStringBuilder implements java.lang.Appendable java.lang.CharSequence java.io.Serializable {
|
||||
@@ -54798,7 +54797,6 @@ package java.lang {
|
||||
method public java.lang.StringBuilder insert(int, double);
|
||||
method public java.lang.StringBuilder replace(int, int, java.lang.String);
|
||||
method public java.lang.StringBuilder reverse();
|
||||
method public java.lang.String toString();
|
||||
}
|
||||
|
||||
public class StringIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException {
|
||||
@@ -55162,9 +55160,7 @@ package java.lang.reflect {
|
||||
}
|
||||
|
||||
public final class Constructor extends java.lang.reflect.AccessibleObject implements java.lang.reflect.GenericDeclaration java.lang.reflect.Member {
|
||||
method public boolean equals(java.lang.Object);
|
||||
method public A getAnnotation(java.lang.Class<A>);
|
||||
method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
|
||||
method public java.lang.Class<T> getDeclaringClass();
|
||||
method public java.lang.Class<?>[] getExceptionTypes();
|
||||
method public java.lang.reflect.Type[] getGenericExceptionTypes();
|
||||
@@ -55249,7 +55245,6 @@ package java.lang.reflect {
|
||||
}
|
||||
|
||||
public final class Method extends java.lang.reflect.AccessibleObject implements java.lang.reflect.GenericDeclaration java.lang.reflect.Member {
|
||||
method public boolean equals(java.lang.Object);
|
||||
method public A getAnnotation(java.lang.Class<A>);
|
||||
method public java.lang.Class<?> getDeclaringClass();
|
||||
method public java.lang.Object getDefaultValue();
|
||||
|
||||
@@ -6329,9 +6329,9 @@ package android.app.job {
|
||||
method public long getInitialBackoffMillis();
|
||||
method public long getIntervalMillis();
|
||||
method public long getMaxExecutionDelayMillis();
|
||||
method public static final long getMinFlexMillis();
|
||||
method public long getMinLatencyMillis();
|
||||
method public static final long getMinimumFlex();
|
||||
method public static final long getMinimumPeriod();
|
||||
method public static final long getMinPeriodMillis();
|
||||
method public int getNetworkType();
|
||||
method public android.content.ComponentName getService();
|
||||
method public long getTriggerContentMaxDelay();
|
||||
@@ -51485,7 +51485,6 @@ package java.lang {
|
||||
method public java.lang.StringBuffer insert(int, double);
|
||||
method public synchronized java.lang.StringBuffer replace(int, int, java.lang.String);
|
||||
method public synchronized java.lang.StringBuffer reverse();
|
||||
method public synchronized java.lang.String toString();
|
||||
}
|
||||
|
||||
public final class StringBuilder extends java.lang.AbstractStringBuilder implements java.lang.Appendable java.lang.CharSequence java.io.Serializable {
|
||||
@@ -51523,7 +51522,6 @@ package java.lang {
|
||||
method public java.lang.StringBuilder insert(int, double);
|
||||
method public java.lang.StringBuilder replace(int, int, java.lang.String);
|
||||
method public java.lang.StringBuilder reverse();
|
||||
method public java.lang.String toString();
|
||||
}
|
||||
|
||||
public class StringIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException {
|
||||
@@ -51887,9 +51885,7 @@ package java.lang.reflect {
|
||||
}
|
||||
|
||||
public final class Constructor extends java.lang.reflect.AccessibleObject implements java.lang.reflect.GenericDeclaration java.lang.reflect.Member {
|
||||
method public boolean equals(java.lang.Object);
|
||||
method public A getAnnotation(java.lang.Class<A>);
|
||||
method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
|
||||
method public java.lang.Class<T> getDeclaringClass();
|
||||
method public java.lang.Class<?>[] getExceptionTypes();
|
||||
method public java.lang.reflect.Type[] getGenericExceptionTypes();
|
||||
@@ -51974,7 +51970,6 @@ package java.lang.reflect {
|
||||
}
|
||||
|
||||
public final class Method extends java.lang.reflect.AccessibleObject implements java.lang.reflect.GenericDeclaration java.lang.reflect.Member {
|
||||
method public boolean equals(java.lang.Object);
|
||||
method public A getAnnotation(java.lang.Class<A>);
|
||||
method public java.lang.Class<?> getDeclaringClass();
|
||||
method public java.lang.Object getDefaultValue();
|
||||
|
||||
@@ -88,7 +88,7 @@ public class JobInfo implements Parcelable {
|
||||
*
|
||||
* @return The minimum available interval for scheduling periodic jobs, in milliseconds.
|
||||
*/
|
||||
public static final long getMinimumPeriod() {
|
||||
public static final long getMinPeriodMillis() {
|
||||
return MIN_PERIOD_MILLIS;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class JobInfo implements Parcelable {
|
||||
*
|
||||
* @return The minimum available flex time for scheduling periodic jobs, in milliseconds.
|
||||
*/
|
||||
public static final long getMinimumFlex() {
|
||||
public static final long getMinFlexMillis() {
|
||||
return MIN_FLEX_MILLIS;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ public class JobInfo implements Parcelable {
|
||||
* job does not recur periodically.
|
||||
*/
|
||||
public long getIntervalMillis() {
|
||||
return intervalMillis >= getMinimumPeriod() ? intervalMillis : getMinimumPeriod();
|
||||
return intervalMillis >= getMinPeriodMillis() ? intervalMillis : getMinPeriodMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -316,7 +316,7 @@ public class JobInfo implements Parcelable {
|
||||
public long getFlexMillis() {
|
||||
long interval = getIntervalMillis();
|
||||
long percentClamp = 5 * interval / 100;
|
||||
long clampedFlex = Math.max(flexMillis, Math.max(percentClamp, getMinimumFlex()));
|
||||
long clampedFlex = Math.max(flexMillis, Math.max(percentClamp, getMinFlexMillis()));
|
||||
return clampedFlex <= interval ? clampedFlex : interval;
|
||||
}
|
||||
|
||||
@@ -682,9 +682,9 @@ public class JobInfo implements Parcelable {
|
||||
* Specify that this job should recur with the provided interval and flex. The job can
|
||||
* execute at any time in a window of flex length at the end of the period.
|
||||
* @param intervalMillis Millisecond interval for which this job will repeat. A minimum
|
||||
* value of {@link #getMinimumPeriod()} is enforced.
|
||||
* value of {@link #getMinPeriodMillis()} is enforced.
|
||||
* @param flexMillis Millisecond flex for this job. Flex is clamped to be at least
|
||||
* {@link #getMinimumFlex()} or 5 percent of the period, whichever is
|
||||
* {@link #getMinFlexMillis()} or 5 percent of the period, whichever is
|
||||
* higher.
|
||||
*/
|
||||
public Builder setPeriodic(long intervalMillis, long flexMillis) {
|
||||
|
||||
Reference in New Issue
Block a user