Add newApi linter check for mDNS library

The mDNS library need to be backported to some internal library which
support minSdk 21. Therefore, updated the build rules to add the linter
check.

Bug: 296175311
Test: TH
Change-Id: Iae0bffa315dc6de2339a05f595b13480fa7385ae
diff --git a/service-t/Android.bp b/service-t/Android.bp
index 08527a3..7e2d2f4 100644
--- a/service-t/Android.bp
+++ b/service-t/Android.bp
@@ -91,6 +91,10 @@
 java_library {
     name: "service-connectivity-mdns-standalone-build-test",
     sdk_version: "core_platform",
+    min_sdk_version: "21",
+    lint: {
+        error_checks: ["NewApi"],
+    },
     srcs: [
         "src/com/android/server/connectivity/mdns/**/*.java",
         ":framework-connectivity-t-mdns-standalone-build-sources",