Fix resolv tests symbol missing problem for R MTS on Q devices.

resolv tests got symbol missing problem for R MTS on Q devices.
because libbase needs the new R symbols of liblog,
which means liblog can't be shared linking.

Bug: 151122313
Test: atest
Test: manual test in Q device with the same setting as what we ran for
      R MTS + Q device.
Merged-In: I33af58f697050c2f63517bddde0194c0b0268db3
Change-Id: I8231d1ea44c42734161b77feea90f2bfadb807f2
(cherry picked from commit 9108beaafd61b5dd0cce1d7f04e79bde35e0c4d3)
diff --git a/Android.bp b/Android.bp
index a35082a..45b1071 100644
--- a/Android.bp
+++ b/Android.bp
@@ -40,6 +40,18 @@
     ],
 }
 
+cc_defaults {
+    name: "resolv_test_defaults",
+    // Note that, static link liblog and libbase is a hard requirement for resolv related tests
+    // because libbase is not compatible between Q and R for general platform build due
+    // to its log revelant functions changing. And most of resolv related tests must be able to run
+    // in Q.
+    static_libs: [
+        "libbase",
+        "liblog",
+    ],
+}
+
 cc_library {
     name: "libnetd_resolv",
     version_script: "libnetd_resolv.map.txt",
@@ -182,7 +194,7 @@
     test_suites: ["device-tests", "mts"],
     require_root: true,
     //TODO:  drop root privileges and make it be an real unit test.
-    defaults: ["netd_defaults"],
+    defaults: ["netd_defaults", "resolv_test_defaults"],
     srcs: [
         "resolv_cache_unit_test.cpp",
         "resolv_callback_unit_test.cpp",
@@ -194,14 +206,12 @@
     shared_libs: [
         "libcrypto",
         "libbinder_ndk",
-        "liblog",
         "libssl",
     ],
     static_libs: [
         "dnsresolver_aidl_interface-unstable-ndk_platform",
         "netd_event_listener_interface-ndk_platform",
         "libcutils",
-        "libbase",
         "libgmock",
         "libnetd_resolv",
         "libnetd_test_dnsresponder",