Commit a56c22f4 authored by Romain Hunault's avatar Romain Hunault

Return android version

parent 8fba5604
......@@ -87,6 +87,7 @@
$this->model = $this->getBuildPropValue( 'ro.lineage.device' ) ?? $this->getBuildPropValue( 'ro.cm.device' ) ?? ( $tokens[1] == 'cm' ? $tokens[6] : $tokens[5] );
$this->version = $tokens[2];
$this->displayVersion = $this->getBuildPropValue( 'ro.cm.display.version' ) ?? $this->getBuildPropValue( 'ro.lineage.display.version' ) ?? '';
$this->androidVersion = $this->getBuildPropValue( 'ro.build.version.release' ) ?? '';
$this->uid = hash( 'sha256', $this->timestamp.$this->model.$this->apiLevel, false );
$this->size = filesize($this->filePath);
......@@ -256,6 +257,14 @@
return $this->displayVersion;
}
/**
* Get the Android version of the current build
* @return string the Android version value
*/
public function getAndroidVersion() {
return $this->androidVersion;
}
/* Utility / Internal */
/**
......
......@@ -75,6 +75,7 @@
'datetime' => $build->getTimestamp(),
'version' => $build->getVersion(),
'display_version' => $build->getDisplayVersion(),
'android_version' => $build->getAndroidVersion(),
'id' => $build->getUid(),
'size' => $build->getSize(),
));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment