Add doh experiment flag
Test: TH
Bug: 155855709
Change-Id: Ie2536938a4f01e24cffcbec9794990fc4d4e2d6c
diff --git a/util.h b/util.h
index bb4a598..0c37851 100644
--- a/util.h
+++ b/util.h
@@ -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 bool isUserDebugBuild() {
return (android::base::GetProperty("ro.build.type", "user") == "userdebug");
}
+
+inline bool isDoHEnabled() {
+ return android::net::Experiments::getInstance()->getFlag("doh", 0);
+}