Use ro.build.version.known_codenames sysprop for KNOWN_CODENAMES.
The sysprop is needed to avoid JNI when accessing KNOWN_CODENAMES from native code. Bug: 211747008 Test: atest android.os.cts.BuildTest#testBuildCodenameConstants Change-Id: I713a122655f5f8a6a2fed5cee61bbe4094acbeb8
This commit is contained in:
@@ -407,7 +407,7 @@ public class Build {
|
||||
*/
|
||||
@SystemApi
|
||||
@NonNull public static final Set<String> KNOWN_CODENAMES =
|
||||
new ArraySet<>(new String[]{"Q", "R", "S", "Sv2", "Tiramisu"});
|
||||
new ArraySet<>(getStringList("ro.build.version.known_codenames", ","));
|
||||
|
||||
private static final String[] ALL_CODENAMES
|
||||
= getStringList("ro.build.version.all_codenames", ",");
|
||||
|
||||
Reference in New Issue
Block a user