diff options
author | Adnan Begovic <adnan@cyngn.com> | 2016-04-06 14:52:21 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-04-06 15:19:22 -0700 |
commit | d8c2556c312e30e62872b2de62654ba703324a25 (patch) | |
tree | da2da11b38953ce6920ad643ce84f25f0376800c | |
parent | f1b172d39221511665cec745ffc57d830bcd2648 (diff) | |
download | vendor_cmsdk-d8c2556c312e30e62872b2de62654ba703324a25.zip vendor_cmsdk-d8c2556c312e30e62872b2de62654ba703324a25.tar.gz vendor_cmsdk-d8c2556c312e30e62872b2de62654ba703324a25.tar.bz2 |
cmsdk: Actually return the system property in Build.
TICKET: CYNGNOS-2379
Change-Id: I7c7f3726b34db2b26d63fb4ef95df469fdf7e989
-rw-r--r-- | api/cm_current.txt | 4 | ||||
-rw-r--r-- | sdk/src/java/cyanogenmod/os/Build.java | 8 | ||||
-rw-r--r-- | system-api/cm_system-current.txt | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/api/cm_current.txt b/api/cm_current.txt index 9d8a981..758315e 100644 --- a/api/cm_current.txt +++ b/api/cm_current.txt @@ -566,8 +566,8 @@ package cyanogenmod.os { public class Build { ctor public Build(); method public static java.lang.String getNameForSDKInt(int); - field public static final java.lang.String CYANOGENMOD_DISPLAY_VERSION = "ro.cm.display.version"; - field public static final java.lang.String CYANOGENMOD_VERSION = "ro.cm.version"; + field public static final java.lang.String CYANOGENMOD_DISPLAY_VERSION; + field public static final java.lang.String CYANOGENMOD_VERSION; field public static final java.lang.String UNKNOWN = "unknown"; } diff --git a/sdk/src/java/cyanogenmod/os/Build.java b/sdk/src/java/cyanogenmod/os/Build.java index e758413..5d53213 100644 --- a/sdk/src/java/cyanogenmod/os/Build.java +++ b/sdk/src/java/cyanogenmod/os/Build.java @@ -28,10 +28,10 @@ public class Build { public static final String UNKNOWN = "unknown"; /** A build ID utilized to distinguish cyanogenmod versions */ - public static final String CYANOGENMOD_VERSION = "ro.cm.version"; + public static final String CYANOGENMOD_VERSION = getString("ro.cm.version"); /** A build ID string meant for displaying to the user */ - public static final String CYANOGENMOD_DISPLAY_VERSION = "ro.cm.display.version"; + public static final String CYANOGENMOD_DISPLAY_VERSION = getString("ro.cm.display.version"); private static final SparseArray<String> sdkMap; static @@ -168,4 +168,8 @@ public class Build { } return name; } + + private static String getString(String property) { + return SystemProperties.get(property, UNKNOWN); + } } diff --git a/system-api/cm_system-current.txt b/system-api/cm_system-current.txt index 9d8a981..758315e 100644 --- a/system-api/cm_system-current.txt +++ b/system-api/cm_system-current.txt @@ -566,8 +566,8 @@ package cyanogenmod.os { public class Build { ctor public Build(); method public static java.lang.String getNameForSDKInt(int); - field public static final java.lang.String CYANOGENMOD_DISPLAY_VERSION = "ro.cm.display.version"; - field public static final java.lang.String CYANOGENMOD_VERSION = "ro.cm.version"; + field public static final java.lang.String CYANOGENMOD_DISPLAY_VERSION; + field public static final java.lang.String CYANOGENMOD_VERSION; field public static final java.lang.String UNKNOWN = "unknown"; } |