MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / parse_android_display_rotation

Function parse_android_display_rotation

packages/server/src/android.rs:2151–2165  ·  view source on GitHub ↗
(output: &str)

Source from the content-addressed store, hash-verified

2149}
2150
2151fn parse_android_display_rotation(output: &str) -> Option<u16> {
2152 output
2153 .lines()
2154 .find(|line| line.contains("mOverrideDisplayInfo=DisplayInfo"))
2155 .and_then(parse_display_info_rotation)
2156 .or_else(|| {
2157 output
2158 .lines()
2159 .find_map(|line| {
2160 line.split_once("mCurrentOrientation=")
2161 .map(|(_, value)| value)
2162 })
2163 .and_then(parse_rotation_token)
2164 })
2165}
2166
2167fn parse_display_info_app_size(line: &str) -> Option<(f64, f64)> {
2168 let (_, value) = line.rsplit_once(", app ")?;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected