Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a56c22f4 authored by Romain Hunault's avatar Romain Hunault 🚴🏻
Browse files

Return android version

parent 8fba5604
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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 */

        /**
+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@
                    'datetime' => $build->getTimestamp(),
                    'version' => $build->getVersion(),
                    'display_version' => $build->getDisplayVersion(),
                    'android_version' => $build->getAndroidVersion(),
                    'id' => $build->getUid(),
                    'size' => $build->getSize(),
                ));