History log of /system/libhidl/transport/include/hidl/HidlBinderSupport.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2da958e782c7cf664f0e119c417470b4d5f8d4df 22-Mar-2018 Yifan Hong <elsk@google.com> Revert "Remove gBn/sConstructorMap from headers."

This reverts commit 0288c9a89f9c06414a3ccee926bb075dd303e52a.

Reason for revert: crashing when device have old prebuilts
that doesn't even have the static map within
getBn/sConstructorMap

Bug: 69122224
Bug: 73486242
Test: boots
Change-Id: Ic7bac4f54eca5d96e9564f22a78ac0e3de9c864f
Merged-In: Ic7bac4f54eca5d96e9564f22a78ac0e3de9c864f
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
0288c9a89f9c06414a3ccee926bb075dd303e52a 08-Feb-2018 Yifan Hong <elsk@google.com> Remove gBn/sConstructorMap from headers.

Prebuilts that include toBinder() should no longer
link to gBnConstructorMap after rebuild.

After prebuilts are updated, symbols (in Static.cpp and
HidlPassthroughSupport.cpp) can be removed as well.

Test: walleye boots
Test: HAL def libs that link to libhidltransport no longer
links to gBnConstructorMap / gBsConstructorMap.

Bug: 69122224
Change-Id: I6554a98a3068f9595666b7131df310e200551e45
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
6538e7515b00694574b222da2898716e3cb1431a 08-Feb-2018 Steven Moreland <smoreland@google.com> Revert "Reland "Remove gBn/sConstructorMap.""

This reverts commit d7687b2a89d374d8403b4c6c7f94a21c747aa66f.

Reason for revert: b/73103210

Change-Id: Ibd956944c49f4b1a2e51992a4d199a60cd64d7b5
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
d7687b2a89d374d8403b4c6c7f94a21c747aa66f 18-Dec-2017 Yifan Hong <elsk@google.com> Reland "Remove gBn/sConstructorMap."

Use getBn/sConstructorMap() instead to avoid initialization
order problem.

This reverts commit c6ce6e50a77c08a17a28013599469b83d11049b0.

Reason for revert: internal devices are fixed.

Test: boots

Change-Id: Ia6f2bb09a6333abd87affb9c7c089d2ba512c7c9
Fixes: 69122224
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
c6ce6e50a77c08a17a28013599469b83d11049b0 15-Dec-2017 Yifan Hong <elsk@google.com> Revert "Remove gBn/sConstructorMap."

This reverts commit c67f65df9a9832094df79c4f02dffa25ca2bb2b1.

Reason for revert: Break internal targets
Bug: 69122224
Bug: 70720496

Change-Id: I6373330871b504999653b4c0bad6bdd7111c25be
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
c67f65df9a9832094df79c4f02dffa25ca2bb2b1 10-Nov-2017 Yifan Hong <elsk@google.com> Remove gBn/sConstructorMap.

Test: boot fugu, 2016/2017 Pixel
Bug: 69122224
Change-Id: I525574228bc5f3720901d884fe041597a00ddc77
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
3f5ac4ca824f178bc60d2ae867c7453a74a122f9 28-Nov-2017 Martijn Coenen <maco@google.com> Add support for polling transport.

To remove remaining direct calls/linkage into libhwbinder.

Bug: 34388964
Test: wifi works
Change-Id: Idd3928e9a0879434cb71ab63eaca905f174e645e
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
97f88f31b63c5f4cb12be40cbd9cc8d725a4ef80 10-Nov-2017 Yifan Hong <elsk@google.com> Double gBn/sConstructorMap

The new getBn/sConstructorMap() functions ensure that the
map is initialized before usage. For ABI compatibility (to prebuilt
HAL definition libs), the old global map is kept and checked as well.

Test: boots
Bug: 69122224
Change-Id: I32b1a612f8e841d1e7dca5335230a3dc7d589da5
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
5f82d3eb62d0c101d4f7f256d812e5010162ecab 27-Jul-2017 Steven Moreland <smoreland@google.com> Add tags for hidl interfaces.

IFoo -> i_tag
BsFoo -> bs_tag
BnFoo -> bnhw_tag
BpFoo -> bphw_tag

Also added enable_if. This will allow us to give better error
messages and add static_asserts in certain places.

Note, the tags are in HidlSupport instead of split between
HidlSupport/HidlPassthroughSupport/HidlBinderSupport because
of this loop in that case:
HidlBinderSupport.h --> HwBnBase.h --> HidlBinderSupport.h

Bug: 62807182
Test: compiles (these are all static checks)
Change-Id: I49a5ec824959484d237c8fa3c81eaa530be8e073
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
2932c134c47318489d96e3e4de9ab8e5ff956952 21-Jul-2017 Steven Moreland <smoreland@google.com> Revert "Revert "Allow proxies to be compared.""

This reverts commit 7c238ef97977204a5a5ff65a39f602ceb44ed307.

(originally reverted due to merge conflicts)

Bug: 32172906
Test: hidl_test

Change-Id: I590c60ed529847742dede590e1e9a152a7650da0
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
7c238ef97977204a5a5ff65a39f602ceb44ed307 21-Jul-2017 Steven Moreland <smoreland@google.com> Revert "Allow proxies to be compared."

This reverts commit 8264ad53b64162950b9d7d2cde93b5a961ab806b.

Change-Id: Ibbb66617c751dab7e93834892fb97936e5083e97
/system/libhidl/transport/include/hidl/HidlBinderSupport.h
8264ad53b64162950b9d7d2cde93b5a961ab806b 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

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