diff options
author | Andrew Walbran <qwandor@google.com> | 2022-02-07 12:36:22 +0000 |
---|---|---|
committer | Andrew Walbran <qwandor@google.com> | 2022-02-07 12:36:22 +0000 |
commit | 0aaa3a28d5733369b5d649f8cb1f1337f06ed5aa (patch) | |
tree | 31f113bad0fb2ff0734f70dfe6f80e8340f508f4 /profcollectd | |
parent | b3ca35e01abb8e6b91f3908e79b8ef57321d507d (diff) | |
download | extras-0aaa3a28d5733369b5d649f8cb1f1337f06ed5aa.tar.gz |
Update to improved system_properties API.
Bug: 217728265
Test: mm
Change-Id: I795877d506d79c42d31c308a823058ac305e4a79
Diffstat (limited to 'profcollectd')
-rw-r--r-- | profcollectd/libprofcollectd/config.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/profcollectd/libprofcollectd/config.rs b/profcollectd/libprofcollectd/config.rs index 3134e308..d68f02e7 100644 --- a/profcollectd/libprofcollectd/config.rs +++ b/profcollectd/libprofcollectd/config.rs @@ -128,7 +128,7 @@ where T::Err: Error + Send + Sync + 'static, { let default_value = default_value.to_string(); - let value = rustutils::system_properties::read(key).unwrap_or(default_value); + let value = rustutils::system_properties::read(key).unwrap_or(None).unwrap_or(default_value); Ok(T::from_str(&value)?) } @@ -137,7 +137,7 @@ where T: ToString, { let value = value.to_string(); - rustutils::system_properties::write(key, &value) + Ok(rustutils::system_properties::write(key, &value)?) } fn generate_random_node_id() -> MacAddr6 { |