libbinder_ndk: read/write array for primitive types.
type | contiguous in NDK API | contiguous on the wire -------------------------------------------------------- bool | no* | no char | yes | no** other | yes | yes * std::vector<bool> as an implementation detail stores a packed byte array. This packed byte array is not exposed as an implementation detail, so even if we made bool contiguous on the wire, we couldn't ever make it contiguous in the NDK API. ** read/write Int32/Int is called repeatedly which writes each char16_t into a 32-bit wide section on the wire. Arrays in Java AIDL are also very annoying. Whereas in C++, their size can be changed, in Java, because of the way out-parameters work, the array size cannot be changed. We might consider adding a better error when this happens. Bug: 111445392 Test: atest android.binder.cts Change-Id: I3934f7d5cd749810c4a512ac3fb57b63f9ae4ea5
Loading
Please register or sign in to comment