History log of /system/libhidl/transport/include/hidl/HidlBinderSupport.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e67a676fdf3f0c565af64e375075e5386e6ab940 16-May-2017 Steven Moreland <smoreland@google.com> Allow proxies to be compared.

Also:
- removed unnecessary template parameter to toBinder
- don't create redundant BnObjects
- added comparison function for hidl interfaces

toBinder now caches the HIDL pure interface objects
in order to recreate the behavior that the binder kernel does by
itself. This means that if you pass a HIDL object out, you will
always get the same remote reference.

Test: boot a device
Test: boot a marlin
Test: hidl_test and hidl_test_java
Bug: 38348572
Bug: 32172906

Merged-In: I6453200e45eb29e685b06aab4746d9ba18c011a9
Change-Id: I6453200e45eb29e685b06aab4746d9ba18c011a9
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
108d09d4eae07cd1d70a76187a929dc61548a229 06-May-2017 Steven Moreland <smoreland@google.com> libhidltransport: move methods to sources

Moved all methods with no templatization into sources.

Test: links
Bug: 35710429
Change-Id: I44bd6407e1bd74dd188b4033ddf176587ccdd8e7
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
9d3eb357a2a3a64baa4824d550b5563b3dc0b15a 19-Apr-2017 Martijn Coenen <maco@google.com> Validate incoming data properly.

readEmbeddedBuffer() now requires the correct length
of the buffer as an argument.

Modified the readEmbeddedFromParcel() functions to take
a const-reference to the struct the data is embedded in;
the kernel has already fixed up the pointers, we just need
to verify the buffer has the correct size, parent buffer
and offset within that parent buffer.

Bug: 30498700
Test: hidl_test, hidl_test_java, YouTube, Maps, Netflix, Camera
Change-Id: I44d6ca7ef6f252f8154b03ff9914b7db69c70604
Merged-In: I44d6ca7ef6f252f8154b03ff9914b7db69c70604
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
08607dcb2119d45381579682f1531e487c9414ad 21-Apr-2017 Yifan Hong <elsk@google.com> Fix wrapPassthrough casts to the wrong type.

wrapPassthrough should cast to IType *, not
IBase *, for the incoming pointer.

Also, use static_cast instead of reinterpret_cast
everywhere.

Bug: 37542631
Bug: 36225019
Test: hidl_test
Change-Id: Ifc3455b2313ea3cdf765e8959707b08a4a8ff101
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
953e6b0f57b5003390b3e70904bfa47f535492e4 16-Mar-2017 Yifan Hong <elsk@google.com> Hide global variables

* Move gBn/sConstructorMap into details
* Move gDefaultServiceManager[Lock] into details and delete them from Static.h

Test: pass
Test: boots
Bug: 36075507
Change-Id: Ief7938812efe4a9fdf1d7c09850512f19023185d
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
f6fa2a90c428b48729505fe7602ab47c45d2fbd4 09-Mar-2017 Hridya Valsaraju <hridya@google.com> Allow MQDescriptors with null native_handles to be passed over hwbinder

This would be useful for cases where the MQDescriptor is sent
along with a HAL specific status.

Test: FMQ unit tests

Change-Id: I24931f7524972c698b59bf11eaacf0f980c0d6ff
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
2ac326f3a86f4c6c1c087ea4a565df5b918e4d2b 23-Feb-2017 Yifan Hong <elsk@google.com> Use interfaceDescriptor instead of interfaceChain

wherever suits. Sementically, interfaceDescriptor
returns the first element of interfaceChain; use
interfaceDescriptor when the rest of the elements
aren't used.

Bug: 34136228

Test: hidl_test
Change-Id: Id7650788a00a37a6d0fcb574547371965ddf4a04
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
6cf8fa2d989bf57aed9a62fd9f54261176a9f860 21-Feb-2017 Steven Moreland <smoreland@google.com> Move definition of configureRpcThreadpool.

Functions in headers should only depend on functions that you are
exporting. Otherwise, modules must link against dependencies of this
module.

Test: binderized marlin boots and works

Merged-In: If252dc517d37af8d3621f06d04c89361c4ae8df6
Change-Id: If252dc517d37af8d3621f06d04c89361c4ae8df6
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
84888d3553c7595ee57dc73023ae94a27895de0d 07-Feb-2017 Yifan Hong <elsk@google.com> Make gBn/sConstructorMap concurrent.

Test: builds
Test: hidl_test

Bug: 35041785
Change-Id: I60099ddd56fee1faec7e54245d0fa3ccae6e777a
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
777bef976bf218a2290b86d52c45dcff84a2f698 02-Feb-2017 Yifan Hong <elsk@google.com> IBase::getReferenceInfo -> getDebugInfo

Bug: 34777099
Bug: 34861460

Test: lshal
Test: NFC / light / audio with and without persistent.hal.binderized;
run lshal to reflect this.

Change-Id: I70aebefcaf5ed92a3c31a7bf2406d610c4533258
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
6091d185242256107d6cffafaa7e9bf7880b79b4 13-Jan-2017 Martijn Coenen <maco@google.com> Allow hidl_vec to contain a null buffer.

Which is valid when its size is zero.

Bug: 34234675
Test: hidl_test
Change-Id: I9322c215a4cd5a10adc82713e23d5e6ad9b0420d
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
1f535a27054e7553e968cac664981073f0074009 07-Jan-2017 Steven Moreland <smoreland@google.com> Use new read(Embedded)Buffer/readNativeHandle APIs.

hidl_memory may have a null native_handle.
MQDescriptor may not.

Bug: 34134129
Test: hidl_test
Change-Id: I824760d59984a7c3e00309010760e33e4c289ef0
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
4e92599704db4a3e29d4ad4a539586b019c99dfb 10-Jan-2017 Yifan Hong <elsk@google.com> Bp/n/sFoo -> Bp/n/sHwFoo

Bug: 33554989
Test: hidl_test
Change-Id: If46d3333f4dcc0a97010f13684bde219f07b3142
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
7e6404dd880b1f25c932f264c0ba2e00e79c536e 27-Dec-2016 Hridya Valsaraju <hridya@google.com> Add templatization to MQDescriptor

Test: FMQ unit tests
Bug: 33948735

Merged-In: I50a97e4c1278fc9bdcb1bf4d524d33fd9761dec2
Change-Id: I50a97e4c1278fc9bdcb1bf4d524d33fd9761dec2
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
e76c7a27eeb3763a2185c1502fd4572df1513b9a 22-Nov-2016 Martijn Coenen <maco@google.com> Transport threadpool configuration.

Servers can specify the number of threads they'd like to
have for handling incoming RPC calls, as well as whether
they'd like to join the threadpool themselves, by calling:

configureRpcThreadpool(numThreads, true /* callerWillJoin */);

This method *must* be called before interacting with any
HIDL services, including the servicemanager through
IFoo::getService / IFoo.registerAsService().

If the server indicated it wanted to join, it should do so
as soon as it can with:

joinRpcThreadpool();

This allows a server full flexibility:
- Without any of these calls, a threadpool of size 1 will be
started, and the main thread won't be a part of it.
- If the server wants a single-threaded RPC pool with its own
main thread for handling incoming RPC transactions, it can call
configureRpcThreadpool(1, true) followed by joinRpcThreadpool().
- If the server wants a multi-threaded RPC pool, it can call
configureRpcThreadpool(5, join) followed by joinRpcThreadpool()
if join was set to true.

Bug: 31226656
Test: mma, hidl_test
Change-Id: I9a3c68ebbe34ea9f14cdae48ca9908d05012c3f2
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
9b8f9c38ea8ac1fe1fdf11ea219097885a5f2fa7 09-Dec-2016 Martijn Coenen <maco@google.com> Add (un)linkToDeath to IBase.

With corresponding callback interfaces. hidl_death_recipient
is a transport-independent interface, used directly by clients
and servers. hidl_binder_death_recipient wraps a hidl_death_recipient
object and implements the Binder-specific death recipient. It
holds a weak reference to the callback interface, as well as the
interface it was called on (so we can include that in the callback).

Bug: 31632518
Test: mma, hidl_test
Change-Id: I0430efff24c2bfd3993438c6ed3fe007d9f9e3ef
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
6bf733ec867a5d46ea05ae5c280a27b051f5018c 07-Dec-2016 Yifan Hong <elsk@google.com> create gBsConstructorMap; add wrapPassthrough

Similar to gBnConstructorMap, this map helps wrapping a local
interface with the smallest BsFoo possible. They are added
in Static.h/cpp.

Added HidlPassthroughSupport.h/cpp to hold wrapPassthrough.

Also fixes a few Return object isOk() checks.

Fix: 33307350

Test: hidl_test

Change-Id: I92a7283699bfe5b022df5ab5a9ead5690477ea97
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
b81c82748fcd6a34ad017c7826bd82091040c9cc 13-Dec-2016 Yifan Hong <elsk@google.com> Move macros from libhidl[transport] to auto-generated code.

Bug: 32756130

Test: hidl_test
Change-Id: Ic7af37daebc3e465a855e5b62055356e3e00c9d3
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
ea006c5ee3a2f275b4d8f5f967838f16fb64b79f 16-Dec-2016 Steven Moreland <smoreland@google.com> registerAsService fails gracefully.

Detect if defaultServiceManager is non existant and return appropriate
error.

Test: compiles
Change-Id: I044fa5f74ab278b9996ad0d03505712b84a82526
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
12f04d913dae2fb287089f6db24f144731c79d9c 07-Dec-2016 Martijn Coenen <maco@google.com> Introduce fromBinder() helper.

To safely cast binder objects back to HIDL interfaces.

Modified toBinder(), to take into account IHw
classes no longer exist.

Removed an obsolete conversion of IFoo to BnFoo
in the servicemanager add macro - BnFoo is transport
specific and does not belong there.

Test: mma, hidl_test, hidl_test_java
Bug: 33173166
Change-Id: Iae84c900584a008c9cc8e03d1914e95d0fae77ce
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
b2c9c75b74c87e651dd08a100015eab17319556e 08-Dec-2016 Yifan Hong <elsk@google.com> Cleanup Hidl*Support.* files.

* Move gBnConstructorMap to Static.cpp/h
* update obsolete comments

Test: compiles

Change-Id: If9720b8fc3b09e9b91b8fdc04bcde269208471ed
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
1cfaee704c2d20d6d8d7dedf77bd73f61ee905f7 01-Dec-2016 Steven Moreland <smoreland@google.com> Remove explicit cast from Return<*>.

- also moving failure check to implicit cast operator.

(after talking to malchev@)

Bug: 31348667
Test: pass
Change-Id: I5a136a3596c2fa7c502ce9d53ab754b796d66fed
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
2cd440cf0c589e89d0d4509d273142a35b5ef81c 23-Nov-2016 Yifan Hong <elsk@google.com> Hidlize IBase and use IBase instead of IBinder.

Note: system/libhidl/base is the libhidlbase project.
system/libhidl/transport/base is the
android.hidl.base@1.0 HAL files.

Test: hidl_test

Change-Id: Ic3464b5e50c0896de9b26f44a409496f8df37c39
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
3079100878a2595be644d866e67c12a9de620fd5 01-Dec-2016 Martijn Coenen <maco@google.com> Hidlized version of IMemory.

- Add hidl_memory type.
- Add android.hidl.memory@1.0 package
- IMapper
- IAllocator
- IMemory
- Add libhidlmemory
- Add default implementation of android.hidl.memory@1.0
- Ashmem
- Ion (TODO, probably in another CL)

Test: compiles (WIP)
Change-Id: I4632eeb6a0051551b54ce04d919aaf551dfc5f28
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
337c3ae7f5ce6e94d6ccaaa7fb4ac92c4069b2dd 22-Nov-2016 Steven Moreland <smoreland@google.com> Cleanup Return object.

- Expose isOk() instead of having to say getStatus().isOk()
- Add 'get' function which checks to make sure content is valid.
- Mark implicit cast operator as deprecated.

Bug: 32744406
Bug: 31348667
Test: hidl_test
Change-Id: I13bfe33b6c1f9b94a372161064a9e913825df959
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
00f4a391c6f9a698bbcbbd05bf3d80e213c82884 16-Nov-2016 Yifan Hong <elsk@google.com> Split libhidl into base and transport.

libhidlbase contains "pure" classes that has nothing
to do with tranport level stuff. libhwbinder can now
safely depend on libhidlbase.

IBinder inheriting from IBase will be in a follow up
CL.

Bug: 32756130

Test: mma under hardware/interfaces
Test: hidl_test
Change-Id: Ie2bd80769df3816aab83789ba0d7fca9b5a2e52f
/system/libhidl/transport/include/hidl/HidlBinderSupport.h