Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 370add0c authored by Anton Hansson's avatar Anton Hansson Committed by Gerrit Code Review
Browse files

Merge "Expose SdkExtension in the system SDK"

parents 9be4d11a b52bd1cb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 −2
Original line number Diff line number Diff line
@@ -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.
     *
+8 −0
Original line number Diff line number Diff line
@@ -6079,6 +6079,14 @@ package android.os {
}
package android.os.ext {
  public class SdkExtensions {
    method public static int getExtensionVersion(int);
  }
}
package android.os.image {
  public class DynamicSystemClient {