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

Commit b0c79774 authored by Myles Watson's avatar Myles Watson Committed by Automerger Merge Worker
Browse files

Merge "InitFlags: Remove redact_log" into main am: 1370b931

parents a49e5e75 1370b931
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -18,14 +18,10 @@

#include "os/logging/log_redaction.h"

#include "common/init_flags.h"

namespace bluetooth {
namespace os {

using bluetooth::common::init_flags::redact_log_is_enabled;

bool should_log_be_redacted() { return redact_log_is_enabled(); }
bool should_log_be_redacted() { return true; }

}  // namespace os
}  // namespace bluetooth
+0 −12
Original line number Diff line number Diff line
@@ -210,7 +210,6 @@ init_flags!(
        classic_discovery_only,
        dynamic_avrcp_version_enhancement = true,
        hci_adapter: i32,
        redact_log = true,
        sco_codec_timeout_clear,
        sdp_serialization = true,
        sdp_skip_rnr_if_known = true,
@@ -269,17 +268,6 @@ mod tests {
        test_load(vec!["--hci=2"]);
        assert_eq!(get_hci_adapter(), 2);
    }
    #[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
    }

    init_flags_struct!(
        name: InitFlagsForTest
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ mod ffi {
        fn classic_discovery_only_is_enabled() -> bool;
        fn dynamic_avrcp_version_enhancement_is_enabled() -> bool;
        fn get_hci_adapter() -> i32;
        fn redact_log_is_enabled() -> bool;
        fn sco_codec_timeout_clear_is_enabled() -> bool;
        fn sdp_serialization_is_enabled() -> bool;
        fn sdp_skip_rnr_if_known_is_enabled() -> bool;