Merge changes from topic 'multinetwork_vndk' into oc-dev
* changes: Allow vendor code to link to libandroid_net. Move libandroid_net from Android.mk to Android.bp.
This commit is contained in:
committed by
Android (Google) Code Review
commit
cffee96a16
@@ -19,3 +19,31 @@ ndk_library {
|
||||
first_version: "9",
|
||||
unversioned_until: "current",
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "libandroid_defaults",
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-Wunused",
|
||||
"-Wunreachable-code",
|
||||
],
|
||||
}
|
||||
|
||||
// Network library.
|
||||
cc_library_shared {
|
||||
name: "libandroid_net",
|
||||
defaults: ["libandroid_defaults"],
|
||||
srcs: ["net.c"],
|
||||
|
||||
shared_libs: ["libnetd_client"],
|
||||
|
||||
include_dirs: ["bionic/libc/dns/include"],
|
||||
}
|
||||
|
||||
llndk_library {
|
||||
name: "libandroid_net",
|
||||
export_include_dirs: ["include"],
|
||||
symbol_file: "libandroid_net.map.txt",
|
||||
unversioned: true,
|
||||
}
|
||||
|
||||
@@ -58,20 +58,3 @@ LOCAL_MODULE := libandroid
|
||||
LOCAL_CFLAGS += $(common_cflags)
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
# Network library.
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libandroid_net
|
||||
LOCAL_CFLAGS := $(common_cflags)
|
||||
LOCAL_SRC_FILES:= \
|
||||
net.c \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libnetd_client \
|
||||
|
||||
LOCAL_C_INCLUDES += \
|
||||
frameworks/base/native/include \
|
||||
bionic/libc/dns/include \
|
||||
system/netd/include \
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
1
native/android/include/multinetwork.h
Symbolic link
1
native/android/include/multinetwork.h
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../native/include/android/multinetwork.h
|
||||
10
native/android/libandroid_net.map.txt
Normal file
10
native/android/libandroid_net.map.txt
Normal file
@@ -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:
|
||||
*;
|
||||
};
|
||||
Reference in New Issue
Block a user