Add a dumpService variant that uses libbinder_ndk.

The one in this file requires libbinder and cannot be used when
libbinder is not present (e.g., when compiling against the NDK).
This allows users of this code not to link against libbinder, and
have the resulting binary not depend on it:

$ m CtsNativeNetPlatformTestCases netd_integration_test
$ objdump -p out/target/product/vsoc_x86_64/testcases/netd_integration_test/x86_64/netd_integration_test64 | grep NEEDED | grep libbinder
  NEEDED               libbinder.so
  NEEDED               libbinder_ndk.so
$ objdump -p out/target/product/vsoc_x86_64/testcases/CtsNativeNetPlatformTestCases/x86_64/CtsNativeNetPlatformTestCases64 | grep NEEDED | grep libbinder
  NEEDED               libbinder_ndk.so
$

Bug: 268440865
Test: see other CL in topic
Merged-In: Icf982675aad4777677a36e357035809fb251d6e9
Change-Id: Icf982675aad4777677a36e357035809fb251d6e9
diff --git a/staticlibs/native/nettestutils/Android.bp b/staticlibs/native/nettestutils/Android.bp
index 42df8e0..df3bb42 100644
--- a/staticlibs/native/nettestutils/Android.bp
+++ b/staticlibs/native/nettestutils/Android.bp
@@ -21,9 +21,15 @@
     export_include_dirs: ["include"],
     srcs: ["DumpService.cpp"],
 
+    // Don't depend on libbinder, because some users of this library may not want to link to it.
+    // CtsNativeNetPlatformTestCases is one such user. See r.android.com/2599405 .
+    header_libs: [
+        "libbinder_headers",
+    ],
+
     shared_libs: [
-        "libbinder",
         "libutils",
+        "libbinder_ndk",
     ],
     cflags: [
         "-Werror",