Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a884566f authored by Steven Moreland's avatar Steven Moreland
Browse files

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
parent 68561001
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment