OSDN Git Service

Allow vendor code to link to libandroid_net.
authorLorenzo Colitti <lorenzo@google.com>
Wed, 17 May 2017 07:50:17 +0000 (16:50 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Thu, 25 May 2017 07:42:12 +0000 (16:42 +0900)
This library contains only the multinetwork API, which is part
of the NDK and has long-term support. It is needed by any native
that wants to use network communications on a different network
than the default network, and thus is necessary for vendor code
such as IMS clients or carrier applications.

Bug: 37527489
Test: marlin builds and boots
Test: MultinetworkApiTest CTS tests passes
Change-Id: I2aa592d1d082aae410173adf2a09f6d1dd8092dc

native/android/Android.bp
native/android/include/multinetwork.h [new symlink]
native/android/libandroid_net.map.txt [new file with mode: 0644]

index 452adc0..00fe638 100644 (file)
@@ -87,3 +87,10 @@ cc_library_shared {
 
     include_dirs: ["bionic/libc/dns/include"],
 }
+
+llndk_library {
+    name: "libandroid_net",
+    export_include_dirs: ["include"],
+    symbol_file: "libandroid_net.map.txt",
+    unversioned: true,
+}
diff --git a/native/android/include/multinetwork.h b/native/android/include/multinetwork.h
new file mode 120000 (symlink)
index 0000000..f9d051a
--- /dev/null
@@ -0,0 +1 @@
+../../../../native/include/android/multinetwork.h
\ No newline at end of file
diff --git a/native/android/libandroid_net.map.txt b/native/android/libandroid_net.map.txt
new file mode 100644 (file)
index 0000000..9b5a5a1
--- /dev/null
@@ -0,0 +1,10 @@
+# These functions have been part of the NDK since API 24.
+# They are also all available to vendor code.
+LIBANDROID_NET {
+  global:
+    android_setsocknetwork; # vndk
+    android_setprocnetwork; # vndk
+    android_getaddrinfofornetwork; # vndk
+  local:
+    *;
+};