Merge "Document version codes in CompatChanges API" am: d4691f8a31
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1688067 Change-Id: I1a641684ee6010137daa7680216fd9c516bf6412
This commit is contained in:
@@ -19,6 +19,7 @@ package android.app.compat;
|
|||||||
import android.annotation.IntDef;
|
import android.annotation.IntDef;
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
|
import android.content.pm.PackageInfo;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
@@ -101,12 +102,20 @@ public final class PackageOverride {
|
|||||||
return VALUE_UNDEFINED;
|
return VALUE_UNDEFINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the minimum version code the override applies to. */
|
/**
|
||||||
|
* Returns the minimum APK version code the override applies to.
|
||||||
|
*
|
||||||
|
* @see PackageInfo#getLongVersionCode()
|
||||||
|
*/
|
||||||
public long getMinVersionCode() {
|
public long getMinVersionCode() {
|
||||||
return mMinVersionCode;
|
return mMinVersionCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the minimum version code the override applies from. */
|
/**
|
||||||
|
* Returns the maximum APK version code the override applies from.
|
||||||
|
*
|
||||||
|
* @see PackageInfo#getLongVersionCode()
|
||||||
|
*/
|
||||||
public long getMaxVersionCode() {
|
public long getMaxVersionCode() {
|
||||||
return mMaxVersionCode;
|
return mMaxVersionCode;
|
||||||
}
|
}
|
||||||
@@ -146,9 +155,11 @@ public final class PackageOverride {
|
|||||||
private boolean mEnabled;
|
private boolean mEnabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the minimum version code the override should apply from.
|
* Sets the minimum APK version code the override should apply from.
|
||||||
*
|
*
|
||||||
* default value: {@code Long.MIN_VALUE}.
|
* default value: {@code Long.MIN_VALUE}.
|
||||||
|
*
|
||||||
|
* @see PackageInfo#getLongVersionCode()
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public Builder setMinVersionCode(long minVersionCode) {
|
public Builder setMinVersionCode(long minVersionCode) {
|
||||||
@@ -157,9 +168,11 @@ public final class PackageOverride {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the maximum version code the override should apply to.
|
* Sets the maximum APK version code the override should apply to.
|
||||||
*
|
*
|
||||||
* default value: {@code Long.MAX_VALUE}.
|
* default value: {@code Long.MAX_VALUE}.
|
||||||
|
*
|
||||||
|
* @see PackageInfo#getLongVersionCode()
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public Builder setMaxVersionCode(long maxVersionCode) {
|
public Builder setMaxVersionCode(long maxVersionCode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user