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

Commit bf1fe0cf authored by Shin Kawamura's avatar Shin Kawamura Committed by Automerger Merge Worker
Browse files

Merge "Replace libstatslog_rust with libstatslog_dns_resolver_rust" into main am: b95f6d47

parents e23f5124 b95f6d47
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ doh_rust_deps = [
    "liblibc",
    "liblog_rust",
    "libring",
    "libstatslog_rust",
    "libstatslog_dns_resolver_rust",
    "libthiserror",
    "libtokio",
    "liburl",
@@ -505,7 +505,7 @@ rust_ffi_static {
        "liblog_rust",
        "libquiche_static",
        "libring",
        "libstatslog_rust",
        "libstatslog_dns_resolver_rust",
        "libthiserror",
        "libtokio",
        "liburl",
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
use crate::connection::driver::Cause;
use crate::connection::driver::HandshakeInfo;
use crate::connection::driver::HandshakeResult;
use statslog_rust::network_dns_handshake_reported::{
use statslog_dns_resolver_rust::network_dns_handshake_reported::{
    Cause as StatsdCause, NetworkDnsHandshakeReported, NetworkType as StatsdNetworkType,
    PrivateDnsMode as StatsdPrivateDnsMode, Protocol as StatsdProtocol, Result as StatsdResult,
};
+48 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2025 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Autogenerate the class (and respective headers) with logging methods and constants
package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

genrule {
    name: "statslog_dns_resolver.rs",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --module resolv --rustHeaderCrate statslog_rust_header --rust $(genDir)/statslog_dns_resolver.rs",
    out: [
        "statslog_dns_resolver.rs",
    ],
}

rust_library {
    name: "libstatslog_dns_resolver_rust",
    crate_name: "statslog_dns_resolver_rust",
    srcs: [
        "statslog_wrapper.rs",
        ":statslog_dns_resolver.rs",
    ],
    rustlibs: [
        "libstatslog_rust_header",
        "libstatspull_bindgen",
    ],
    flags: [
        "-A clippy::needless-lifetimes",
    ],
    apex_available: [
        "com.android.resolv",
    ],
    min_sdk_version: "29",
}
+20 −0
Original line number Diff line number Diff line
// Copyright 2025, The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#![allow(clippy::too_many_arguments)]
#![allow(clippy::undocumented_unsafe_blocks)]
#![allow(missing_docs)]
#![allow(unused)]

include!(concat!(env!("OUT_DIR"), "/statslog_dns_resolver.rs"));