Remove Flags
These were reading system properties which caused security warnings in
some cases. Removing to allow us to do a more comprehensive design.
This reverts commit 0a6e9e56f7f3ac7750b38eaba83639ad47a2692f.
This reverts commit 3dba023d4fb47882fa215715c196cfa3be30c098.
Test: test.py --host
Change-Id: I04e8b7a934540b250e6fc56f5aa6ce7f18131d4d
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index b174f2a..3c187d3 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1736,7 +1736,7 @@
// Class-roots are setup, we can now finish initializing the JniIdManager.
GetJniIdManager()->Init(self);
- InitMetrics();
+ InitMetrics(runtime_options);
// Runtime initialization is largely done now.
// We load plugins first since that can modify the runtime state slightly.
@@ -1844,8 +1844,8 @@
return true;
}
-void Runtime::InitMetrics() {
- auto metrics_config = metrics::ReportingConfig::FromFlags();
+void Runtime::InitMetrics(const RuntimeArgumentMap& runtime_options) {
+ auto metrics_config = metrics::ReportingConfig::FromRuntimeArguments(runtime_options);
if (metrics_config.ReportingEnabled()) {
metrics_reporter_ = metrics::MetricsReporter::Create(metrics_config, this);
}