summaryrefslogtreecommitdiff
path: root/core/java/android/os/NativeHandle.java
Commit message (Collapse)AuthorAgeFilesLines
* Remove @TestApi from @SystemApi symbolsAnton Hansson2020-10-201-2/+0
| | | | | | | | | | | | | I ran these commands: cd frameworks/base grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \ 's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs' grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \ 's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs' Bug: 171179806 Test: m checkapi Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
* NativeHandle.java: set Nullable/NonNullSteven Moreland2019-03-061-15/+32
| | | | | | | Fixes: 126700972 Test: hidl_test_java Test: atest android.os.cts.HwBinderTest Change-Id: Id45c6d0757913014028f7629db78b64f27cad084
* HIDL stuff to TestApi.Steven Moreland2019-01-141-0/+2
| | | | | | | | | Since the CTS test for android.os is build with test_current. Bug: 78650449 Test: android.os.cts Change-Id: If784f4949af931c6c4efc284f1d16414705fe2d4 Merged-In: If784f4949af931c6c4efc284f1d16414705fe2d4
* NativeHandle.java: dup() with O_CLOEXECNick Kralevich2018-12-171-1/+6
| | | | | | | | | | | | | | | | Don't use Os.dup(), as it creates file handles which leak across exec() boundaries. Instead, use fcntl(F_DUPFD_CLOEXEC); O_CLOEXEC is essential for ensuring that file descriptors do not leak across an exec() boundary. Setting O_CLOEXEC ensures that file descriptors can't linger around unnecessarily in an exec()ed process which doesn't use them, making more efficient use of resources. Additionally, O_CLOEXEC is important in ensuring that untrusted exec()ed code cannot take advantage of leaked file descriptors. Test: Android compiles and boots Bug: 120983106 Change-Id: I99a66834cc6b9bb25e1b4daf75384ec6a91ae9e2
* Clarify NativeHandle.java dup documentation.Steven Moreland2018-08-131-0/+3
| | | | | | | | close must also be called. Bug: 35098567 Test: N/A Change-Id: I4d03effc82d7f6de7ca785ae4d12868ccc4ceddd
* Implementing support for HIDL native handles in JavaNirav Atre2018-08-131-0/+191
This change implements the equivalent of the C++ native_handle_t type in Java. Similar to the C++ type, the NativeHandle class wraps an arraylist of FileDescriptor objects, along with a raw data stream (integer array). Bug: 35098567 Test: Ran m, hidl_test (C++ and Java). Functionality tests are included in a separate CL. Change-Id: Ic53f9a49ae17ce5708577a586230126ab0e222c7