Merge "API feedback: rename JobInfo methods for clarity" into nyc-dev
am: b100777562
* commit 'b1007775622f1814c87eef3ee5a325f606adb26c':
API feedback: rename JobInfo methods for clarity
Change-Id: I4fb08a73a64233e9d016f520f08944e22ec5ccd3
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();
|
||||
@@ -51424,7 +51424,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 {
|
||||
@@ -51462,7 +51461,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 {
|
||||
@@ -51826,9 +51824,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();
|
||||
@@ -51913,7 +51909,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();
|
||||
@@ -54779,7 +54779,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 {
|
||||
@@ -54817,7 +54816,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 {
|
||||
@@ -55181,9 +55179,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();
|
||||
@@ -55268,7 +55264,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();
|
||||
@@ -51504,7 +51504,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 {
|
||||
@@ -51542,7 +51541,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 {
|
||||
@@ -51906,9 +51904,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();
|
||||
@@ -51993,7 +51989,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