Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2311f55b authored by Hui Peng's avatar Hui Peng Committed by Automerger Merge Worker
Browse files

Merge "Add support for address hiding [2/3]" am: c17f8f6d

parents d82433c5 c17f8f6d
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -186,6 +186,7 @@ init_flags!(
        irk_rotation,
        logging_debug_enabled_for_all,
        pass_phy_update_callback = true,
        redact_log = true,
        sdp_serialization = true,
    }
    // extra_fields are not a 1 to 1 match with "INIT_*" flags
@@ -283,4 +284,15 @@ mod tests {
        assert!(!is_debug_logging_enabled_for_tag("unknown_flag"));
        assert!(!logging_debug_enabled_for_all_is_enabled());
    }
    #[test]
    fn test_redact_logging() {
        let _guard = ASYNC_LOCK.lock().unwrap();
        assert!(redact_log_is_enabled()); // default is true
        test_load(vec!["INIT_redact_log=false"]);
        assert!(!redact_log_is_enabled()); // turned off
        test_load(vec!["INIT_redact_log=foo"]);
        assert!(redact_log_is_enabled()); // invalid value, interpreted as default, true
        test_load(vec!["INIT_redact_log=true"]);
        assert!(redact_log_is_enabled()); // turned on
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ mod ffi {
        fn is_debug_logging_enabled_for_tag(tag: &str) -> bool;
        fn logging_debug_enabled_for_all_is_enabled() -> bool;
        fn pass_phy_update_callback_is_enabled() -> bool;
        fn redact_log_is_enabled() -> bool;
        fn sdp_serialization_is_enabled() -> bool;
    }
}