android_properties/mock/
mod.rs

1use crate::AndroidProperty;
2use std::os::raw::c_void;
3
4/// Mock implementation for getprop
5///
6/// Always returns None
7pub fn plat_getprop(_: &str, _: *const c_void) -> Option<String> {
8    None
9}
10
11/// Mock implementation for setprop
12///
13/// Always returns Err
14pub fn plat_setprop(_name: &str, _value: &str) -> Result<(), String> {
15    Err("Failed to set android property (OS not supported)".to_string())
16}
17
18/// Mock implementation for prop_values
19///
20/// Always returns iterator to empty vector
21pub fn plat_prop_values() -> impl Iterator<Item = AndroidProperty> {
22    let properties: Box<Vec<AndroidProperty>> = Box::new(Vec::new());
23    properties.into_iter()
24}
25
26/// Mock implementation to find property_info pointer
27///
28/// Always returns nullptr
29pub fn plat_get_property_info(_name: &str) -> *const c_void {
30    std::ptr::null()
31}