Rework platform version to hide codenames.

The public platform version no longer can be a codename, it is
always the most recently released platform.  A new build property
and API provides either the offical version or the current codename
as appropriate.  This will avoid breaking apps that look at the
platform version while development is under a codename.

Bug:  143175463
Test: manual
Change-Id: I9cc55fa3d5cee2606ea634d3926d957990694908
This commit is contained in:
Dianne Hackborn
2019-10-28 16:33:10 -07:00
parent 0fcb4e5c6d
commit ebf46ecf0f

View File

@@ -77,7 +77,7 @@ public class MonkeySourceNetworkVars {
VAR_MAP.put("build.cpu_abi", new StaticVarGetter(Build.CPU_ABI));
VAR_MAP.put("build.manufacturer", new StaticVarGetter(Build.MANUFACTURER));
VAR_MAP.put("build.version.incremental", new StaticVarGetter(Build.VERSION.INCREMENTAL));
VAR_MAP.put("build.version.release", new StaticVarGetter(Build.VERSION.RELEASE));
VAR_MAP.put("build.version.release", new StaticVarGetter(Build.VERSION.RELEASE_OR_CODENAME));
VAR_MAP.put("build.version.sdk", new StaticVarGetter(Integer.toString(Build.VERSION.SDK_INT)));
VAR_MAP.put("build.version.codename", new StaticVarGetter(Build.VERSION.CODENAME));