summaryrefslogtreecommitdiffstats
path: root/jni
Commit message (Collapse)AuthorAgeFilesLines
* Refine getNativeFileDescriptorRemi NGUYEN VAN2020-09-021-17/+28
| | | | | | | | | | | | Factor out the isAtLeastR method, allow the "T" codename in addition to "S", and add some comments. Also remove usage of __ANDROID_API_S__ as it is not yet available in all branches. Bug: 166414751 Test: built, installed, wifi and tethering working Change-Id: I473e6b224b670c18a85fa33d6ec3b4cc2873ce94
* Remove dependency on legacy jniGetFDFromFileDescriptorOrion Hodson2020-09-011-5/+65
| | | | | | | | | On S, use the NDK API to get the native file descriptor from a FileDescriptor. Pre-S, fallback to implementation knowledge. Bug: 158749603 Test: manual Change-Id: I02b261ee2747df2637bd55b0c1ade3c62c73b17e
* Sync with libnativehelper refactoringOrion Hodson2020-06-241-0/+2
| | | | | | | | | | | | | jniGetFDFromFileDescriptor() is now a legacy method and moved to a separate header. Bug: 151443957 Bug: 158749603 Test: m Change-Id: Ifb5221f3d5a0dee61599ae65800c2cf2218e98ab Merged-In: Ifb5221f3d5a0dee61599ae65800c2cf2218e98ab Exempt-From-Owner-Approval: cherry pick (cherry picked from commit 17706453d40aecde89e3d36582c2be4920ac630f)
* Make NetworkStack actually build in an unbundled setup.oreo-mr1-iot-releaseLorenzo Colitti2019-05-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The Java code was already using sdk_version: "current", but the JNI library did not have an sdk_version attribute, and had forbidden dependencies on internal libraries such as libcutils, liblog and libnativehelper. This CL fixes things as follows: - Use the NDK log functions, and switch to the NDK liblog. - Switch to the NDK libnativehelper. - Drop the dependencies on libcutils and libpcap, which were unused. - Use the libc++ STL, and set the sdk_version of the library to current. Bug: 131703417 Test: m Test: installed NetworkStack APK via "adb install --staged" results in working networking Test: builds, boots, wifi works Test: atest FrameworksNetTests NetworkStackTests (cherry picked from commit 3d680e887ba40cde436a5745578e67d4a6a6fce9) Change-Id: I8a0a8d4b4e8872cb88ee526772ae519a8e6df615
* Move attach*Filter() and addArpEntry() methods to NetworkStackpaulhu2019-04-031-0/+264
The SocketUtils.attach*Filter and SocketUtils.addArpEntry methods were added there because they could not be added as JNI inside the NetworkStack. This was not possible because on Go devices, the NetworkStack was a jar library. But now, Go also uses an APK. Hence, move these methods to the NetworkStack. Change-Id: I1d88a0f0be23f2b15d5103fa092b9bf982329d7c Fix: 129433183 Test: atest NetworkStackTests FrameworksNetTests