summaryrefslogtreecommitdiff
path: root/profcollectd
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-08-03 14:20:06 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-08-03 14:20:06 +0000
commite9fb31c0c723039d07cf83aa5d25f02bda685923 (patch)
treebe4e25eff7213aad9212dd8590e2a8ad8e7f2d14 /profcollectd
parent8386fad677984c22956095d1df2e63d2adc5e0d0 (diff)
parentcd5afcfed632c199e4c01614608b0eb0ca145479 (diff)
downloadextras-e9fb31c0c723039d07cf83aa5d25f02bda685923.tar.gz
Merge "Migrate to the librustutils system property bindings."
Diffstat (limited to 'profcollectd')
-rw-r--r--profcollectd/libprofcollectd/Android.bp2
-rw-r--r--profcollectd/libprofcollectd/config.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/profcollectd/libprofcollectd/Android.bp b/profcollectd/libprofcollectd/Android.bp
index 798a3775..ed383569 100644
--- a/profcollectd/libprofcollectd/Android.bp
+++ b/profcollectd/libprofcollectd/Android.bp
@@ -49,9 +49,9 @@ rust_library {
"liblog_rust",
"libmacaddr",
"librand",
+ "librustutils",
"libserde", // Remove once b/179041241 is fixed.
"libserde_json",
- "libsystem_properties-rust",
"libuuid",
"libzip",
],
diff --git a/profcollectd/libprofcollectd/config.rs b/profcollectd/libprofcollectd/config.rs
index d5359956..4e830c96 100644
--- a/profcollectd/libprofcollectd/config.rs
+++ b/profcollectd/libprofcollectd/config.rs
@@ -121,7 +121,7 @@ where
T::Err: Error + Send + Sync + 'static,
{
let default_value = default_value.to_string();
- let value = system_properties::read(key).unwrap_or(default_value);
+ let value = rustutils::system_properties::read(key).unwrap_or(default_value);
Ok(T::from_str(&value)?)
}
@@ -130,7 +130,7 @@ where
T: ToString,
{
let value = value.to_string();
- system_properties::write(key, &value)
+ rustutils::system_properties::write(key, &value)
}
fn generate_random_node_id() -> MacAddr6 {