Loading Experiments.h +1 −0 Original line number Diff line number Diff line Loading @@ -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; Loading util.h +6 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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); } Loading
Experiments.h +1 −0 Original line number Diff line number Diff line Loading @@ -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; Loading
util.h +6 −0 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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); }