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

Commit 94dd99c9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Set the OS name in the metrics protobuf file"

parents a047f012 add7ea9c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ package metrics
import (
	"io/ioutil"
	"os"
	"runtime"
	"time"

	"github.com/golang/protobuf/proto"
@@ -98,8 +99,6 @@ func (m *Metrics) SetMetadataMetrics(metadata map[string]string) {
			m.metrics.HostArch = m.getArch(v)
		case "HOST_2ND_ARCH":
			m.metrics.Host_2NdArch = m.getArch(v)
		case "HOST_OS":
			m.metrics.HostOs = proto.String(v)
		case "HOST_OS_EXTRA":
			m.metrics.HostOsExtra = proto.String(v)
		case "HOST_CROSS_OS":
@@ -137,6 +136,7 @@ func (m *Metrics) SetBuildDateTime(buildTimestamp time.Time) {

// exports the output to the file at outputPath
func (m *Metrics) Dump(outputPath string) (err error) {
	m.metrics.HostOs = proto.String(runtime.GOOS)
	return writeMessageToFile(&m.metrics, outputPath)
}