mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-04-28 12:17:57 +03:00
android/os/Build: allow overriding SDK_INT
This commit is contained in:
parent
340fae107e
commit
ebbbc517a8
1 changed files with 6 additions and 1 deletions
|
@ -107,6 +107,11 @@ public class Build {
|
||||||
* Various version strings.
|
* Various version strings.
|
||||||
*/
|
*/
|
||||||
public static class VERSION {
|
public static class VERSION {
|
||||||
|
static {
|
||||||
|
String SDK_INT_str = System.getProperty("Build.VERSION.SDK_INT");
|
||||||
|
SDK_INT = (SDK_INT_str != null) ? Integer.parseInt(SDK_INT_str) : Build.VERSION_CODES.GINGERBREAD;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The internal value used by the underlying source control to
|
* The internal value used by the underlying source control to
|
||||||
* represent this build. E.g., a perforce changelist number
|
* represent this build. E.g., a perforce changelist number
|
||||||
|
@ -123,7 +128,7 @@ public class Build {
|
||||||
* The user-visible SDK version of the framework; its possible
|
* The user-visible SDK version of the framework; its possible
|
||||||
* values are defined in {@link Build.VERSION_CODES}.
|
* values are defined in {@link Build.VERSION_CODES}.
|
||||||
*/
|
*/
|
||||||
public static final int SDK_INT = Build.VERSION_CODES.GINGERBREAD;
|
public static final int SDK_INT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The user-visible SDK version of the framework in its raw String
|
* The user-visible SDK version of the framework in its raw String
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue