MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / get_version

Method get_version

platform/android/os_android.cpp:311–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311String OS_Android::get_version() const {
312 const Vector<const char *> roms = { "ro.havoc.version", "org.pex.version", "org.pixelexperience.version",
313 "ro.potato.version", "ro.xtended.version", "org.evolution.version", "ro.corvus.version", "ro.pa.version",
314 "ro.crdroid.version", "ro.syberia.version", "ro.arrow.version", "ro.lineage.version" };
315 for (int i = 0; i < roms.size(); i++) {
316 String rom_version = get_system_property(roms[i]);
317 if (!rom_version.is_empty()) {
318 return rom_version;
319 }
320 }
321
322 String mod_version = get_system_property("ro.modversion"); // Handles other Android custom ROMs.
323 if (!mod_version.is_empty()) {
324 return mod_version;
325 }
326
327 // Handles stock Android.
328 String sdk_version = get_system_property("ro.build.version.sdk");
329 String build = get_system_property("ro.build.version.incremental");
330 if (!sdk_version.is_empty()) {
331 if (!build.is_empty()) {
332 return vformat("%s.%s", sdk_version, build);
333 }
334 return sdk_version;
335 }
336
337 return "";
338}
339
340String OS_Android::get_version_alias() const {
341 String release = get_system_property("ro.build.version.release_or_codename");

Callers 4

has_featureMethod · 0.45
_fix_manifestMethod · 0.45
runMethod · 0.45
export_project_helperMethod · 0.45

Calls 3

vformatFunction · 0.85
sizeMethod · 0.65
is_emptyMethod · 0.45

Tested by

no test coverage detected