cmsdk: Actually return the system property in Build.

TICKET: CYNGNOS-2379
Change-Id: I7c7f3726b34db2b26d63fb4ef95df469fdf7e989
This commit is contained in:
Adnan Begovic 2016-04-06 14:52:21 -07:00 committed by Gerrit Code Review
parent f1b172d392
commit d8c2556c31
3 changed files with 10 additions and 6 deletions

View File

@ -566,8 +566,8 @@ package cyanogenmod.os {
public class Build { public class Build {
ctor public Build(); ctor public Build();
method public static java.lang.String getNameForSDKInt(int); 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_DISPLAY_VERSION;
field public static final java.lang.String CYANOGENMOD_VERSION = "ro.cm.version"; field public static final java.lang.String CYANOGENMOD_VERSION;
field public static final java.lang.String UNKNOWN = "unknown"; field public static final java.lang.String UNKNOWN = "unknown";
} }

View File

@ -28,10 +28,10 @@ public class Build {
public static final String UNKNOWN = "unknown"; public static final String UNKNOWN = "unknown";
/** A build ID utilized to distinguish cyanogenmod versions */ /** 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 */ /** 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; private static final SparseArray<String> sdkMap;
static static
@ -168,4 +168,8 @@ public class Build {
} }
return name; return name;
} }
private static String getString(String property) {
return SystemProperties.get(property, UNKNOWN);
}
} }

View File

@ -566,8 +566,8 @@ package cyanogenmod.os {
public class Build { public class Build {
ctor public Build(); ctor public Build();
method public static java.lang.String getNameForSDKInt(int); 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_DISPLAY_VERSION;
field public static final java.lang.String CYANOGENMOD_VERSION = "ro.cm.version"; field public static final java.lang.String CYANOGENMOD_VERSION;
field public static final java.lang.String UNKNOWN = "unknown"; field public static final java.lang.String UNKNOWN = "unknown";
} }