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

Commit 3682c073 authored by Luke Huang's avatar Luke Huang
Browse files

Add doh experiment flag

Test: TH
Bug: 155855709
Change-Id: Ie2536938a4f01e24cffcbec9794990fc4d4e2d6c
parent e912c763
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ class Experiments {
            "dot_query_timeout_ms",
            "dot_validation_latency_factor",
            "dot_validation_latency_offset_ms",
            "doh",
    };
    // This value is used in updateInternal as the default value if any flags can't be found.
    static constexpr int kFlagIntDefault = INT_MIN;
+6 −0
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@

#include <android-base/properties.h>

#include "Experiments.h"

socklen_t sockaddrSize(const sockaddr* sa);
socklen_t sockaddrSize(const sockaddr_storage& ss);

@@ -56,3 +58,7 @@ inline uint64_t getApiLevel() {
inline bool isUserDebugBuild() {
    return (android::base::GetProperty("ro.build.type", "user") == "userdebug");
}

inline bool isDoHEnabled() {
    return android::net::Experiments::getInstance()->getFlag("doh", 0);
}