Skip to content
Snippets Groups Projects
Commit b52bd1cb authored by Anton Hansson's avatar Anton Hansson
Browse files

Expose SdkExtension in the system SDK

Also tweak the javadoc a little bit.

Bug: 137191822
Bug: 143937447
Test: treehugger
Change-Id: Iae1b025685344c2ffe4ed1089850b447c82a6b83
Merged-In: Iae1b025685344c2ffe4ed1089850b447c82a6b83
parent 0b51af25
No related branches found
No related tags found
No related merge requests found
......@@ -563,6 +563,7 @@ filegroup {
"core/java/android/annotation/Nullable.java",
"core/java/android/annotation/IntDef.java",
"core/java/android/annotation/IntRange.java",
"core/java/android/annotation/SystemApi.java",
"core/java/android/annotation/UnsupportedAppUsage.java",
"core/java/com/android/internal/annotations/GuardedBy.java",
"core/java/com/android/internal/annotations/VisibleForTesting.java",
......
......@@ -17,13 +17,23 @@
package android.os.ext;
import android.annotation.IntDef;
import android.annotation.SystemApi;
import android.os.Build.VERSION_CODES;
import android.os.SystemProperties;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/** @hide */
/**
* Methods for interacting with the extension SDK.
*
* This class provides information about the extension SDK version present
* on this device. Use the {@link #getExtensionVersion(int) getExtension} to
* query for the extension version for the given SDK version.
* @hide
*/
@SystemApi
public class SdkExtensions {
private static final int R_EXTENSION_INT;
......@@ -31,11 +41,16 @@ public class SdkExtensions {
R_EXTENSION_INT = SystemProperties.getInt("persist.com.android.sdkext.sdk_info", 0);
}
/** Values suitable as parameters for {@link #getExtensionVersion(int)}. */
/**
* Values suitable as parameters for {@link #getExtensionVersion(int)}.
* @hide
*/
@IntDef(value = { VERSION_CODES.R })
@Retention(RetentionPolicy.SOURCE)
public @interface SdkVersion {}
private SdkExtensions() { }
/**
* Return the version of the extension to the given SDK.
*
......
......@@ -6019,6 +6019,14 @@ package android.os {
 
}
 
package android.os.ext {
public class SdkExtensions {
method public static int getExtensionVersion(int);
}
}
package android.os.image {
 
public class DynamicSystemClient {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment