diff options
author | Joel Galenson <jgalenson@google.com> | 2021-07-29 15:43:02 -0700 |
---|---|---|
committer | Joel Galenson <jgalenson@google.com> | 2021-07-29 15:43:02 -0700 |
commit | cd5afcfed632c199e4c01614608b0eb0ca145479 (patch) | |
tree | 73339101a6bfda6a61302b4284ffb2811e33ddf3 /profcollectd | |
parent | 00d22924b6eba229d48fd503b077d447750dd1ed (diff) | |
download | extras-cd5afcfed632c199e4c01614608b0eb0ca145479.tar.gz |
Migrate to the librustutils system property bindings.
Bug: 182498247
Test: Build
Change-Id: I2097a765f7ca8fceae50ed9a877272296694f622
Diffstat (limited to 'profcollectd')
-rw-r--r-- | profcollectd/libprofcollectd/Android.bp | 2 | ||||
-rw-r--r-- | profcollectd/libprofcollectd/config.rs | 4 |
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 bc41e99e..5ebb7dd0 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 { |