Define DNS-over-TLS port in static lib
The DNS-over-TLS port is a commonly used port number that is
typically set to 853 and is unlikely to be changed. To prevent
from code duplication in various modules, it would be beneficial
to include the port number definition in a static library.
Test: TH
Bug: 276230058
Change-Id: I7e6d0056ba15c932d9b4c3dd8760924278bde8fe
diff --git a/staticlibs/framework/com/android/net/module/util/NetworkStackConstants.java b/staticlibs/framework/com/android/net/module/util/NetworkStackConstants.java
index 96f6aac..8138b58 100644
--- a/staticlibs/framework/com/android/net/module/util/NetworkStackConstants.java
+++ b/staticlibs/framework/com/android/net/module/util/NetworkStackConstants.java
@@ -227,6 +227,14 @@
public static final int DHCP6_OPTION_IAPREFIX = 26;
/**
+ * DNS constants.
+ *
+ * See also:
+ * - https://datatracker.ietf.org/doc/html/rfc7858#section-3.1
+ */
+ public static final short DNS_OVER_TLS_PORT = 853;
+
+ /**
* IEEE802.11 standard constants.
*
* See also: