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

Commit d073bc5c authored by Mike Yu's avatar Mike Yu
Browse files

DoH: Use DoH feature in T if the flag is unset

Turn the feature default on for Android T again but make it
able to be disabled by the flag.

Bug: 200763585
Bug: 155855709
Test: cd packages/modules/DnsResolver && atest
Change-Id: I3c1e52069ed2b2ba7008890227ae377f7520260f
parent 562775e4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -61,5 +61,6 @@ inline bool isUserDebugBuild() {
}

inline bool isDoHEnabled() {
    return android::net::Experiments::getInstance()->getFlag("doh", 0);
    static bool isAtLeastT = android::modules::sdklevel::IsAtLeastT();
    return android::net::Experiments::getInstance()->getFlag("doh", isAtLeastT ? 1 : 0);
}