summaryrefslogtreecommitdiff
path: root/transport/manager
AgeCommit message (Collapse)Author
2019-04-17Update hidl makefiles for bpfmtSteven Moreland
hidl-generated makefiles are now generated such that bpfmt(file) == file. Bug: 67417008 Test: enable bpfmt hook Change-Id: I45af8c5bedb67c5942eedd14893af38560f6d4dc
2019-01-25Fix race conditions for lazy services.Steven Moreland
Add hidlFqName/hidlName to registerClientCallbacks to make it more explicit, provide better errors, and for general sanity. Add tryUnregister so that a service can unregister itself before shutting down. Bug: 123318663 Test: hidl_test, manual Change-Id: I3ee26ba96dbc9732e72aaa16281abc47ce6a02c9 Merged-In: I3ee26ba96dbc9732e72aaa16281abc47ce6a02c9
2018-10-29@1.2::IServiceManager: listManifestByInterfaceSteven Moreland
This API lists VINTF manifest HALs (those that are expected to be on the device even if they are not currently running). This API is being added for a couple of reasons: - libvintf is not in the VNDK. This new API will allow vendors to read the vintf manifest and get the HALs which are expected to be on the device. - more and more HALs are using dynamic lifecycles which means an API like this is increasingly useful. - having an easy API like this helps ensure that vintf things are easier to get correct since users of this API will automatically get the correct configuration. There are a couple of possible expected usages of this API: # running HALs R = listByInterface(IFoo::descriptor) # VINTF Manifest HALs M = listManfiestByInterface(IFoo::descriptor) # Lazy HALs that are not started ... = M - R # Getting all HALs on the device if some are lazy for i in M: ... = IFoo::getService(i) Change-Id: I279a9048f27dac9f7ee6d3ea57d5842d64cadb3b Fixes: 76108617 Bug: 66921961 Test: hidl_test
2018-10-29IServiceManager: remove onRegistration todoSteven Moreland
This would introduce a second way to retrieve a service. Since we already handle situations where a service dies in-between 'get' and the 'onRegistration' notification, it makes sense to continue doing this and not introduce additional complexity into hwservicemanager. Bug: 66921961 Test: N/A Change-Id: Ifc29b1b4e0eb45079be85c41f8d0ce012eff60b2
2018-10-25Merge "update with -Wdocumentation."Treehugger Robot
2018-10-24update with -Wdocumentation.Steven Moreland
Some clients use this, and it was breaking them if they tried to use some of our headers (specifically 1.0 service manager). Putting this up to unblock those changes. Bug: N/A Test: mma (-Wdocumentation checked at build time) Change-Id: I4453848bf91f1d20d0c5c1a28dd9f9e6f5de99fc
2018-10-22@1.2::IServiceManager:onNoClients->onClients(bool)Steven Moreland
The onClients method is now called with a boolean reflecting whether clients are present or not. This is to handle a case where multiple HALs are in the same process, and when none of them are being used, the process can be shut down. - onClients(true) (when true) must be called immediately - onClients(false) (when false) may be delayed when hwservicemanager (or something else in the future) thinks that the HAL may be used again. For instance, in the future, we may add heuristic where if a client has been used for X HAL in the last 10 minutes, we wouldn't ever notify the HAL that it has no clients. The important thing is that this ownership of the lifecycle is retained by hwservicemanager. Given this behavior, when multiple hals are in the same lazy process, they can wait until onClients(false) is true for each of them and then shutdown. Fixes: 117779690 Test: hidl_test Test: manually test and use this API Change-Id: Ic8d9fa8485855daa5a7d5639b09934305a560a0a
2018-10-15Add IServiceManager addWithChain.Steven Moreland
This prevents hwservicemanager from having to make oneway calls. The method onRegistration will be deprecated after this as well. Bug: 36424585 Test: hidl_test, boot Change-Id: I05c8f86962da5f778dcf660d0adf598522ead282
2018-09-28@1.2::IServiceManager: client callbackSteven Moreland
For lazy HALs. Bug: 66921961 Test: hidl_test Change-Id: I253180a6a88e06ba825e679302fff5f5b9eec653
2018-09-27@1.2::IServiceManager: remove 'removeService' todoSteven Moreland
Thinking about this in more detail, if a service is removed, there are two problems: - lazy HAL mechanism doesn't support adding the service back. - ownership may have already been passed to other clients. For these reasons, for the time being, we can't add this API. Bug: 66921961 Test: N/A Change-Id: I4bf5830339bfb6300516d864ad9e9a67512e5e0a
2018-09-27@1.2::IServiceManager: remove broadcast TODOSteven Moreland
It has been decided not to do this since direct calls from atrace is WAI from security perspective. Bug: 78136428 Test: N/A Change-Id: Ib64e80fb46378aad84b549748bd7e90cff5feb5f
2018-07-25Remove 'core_interface' references.Steven Moreland
These are preventing us from removing a hack around HIDL dependencies in the HIDL build tools so they are being centralized into a list in system/tools/hidl. Bug: 111366989 Test: 'm android.hidl.base@1.0' still fails Test: HIDL's run_all_host_tests.sh Change-Id: Ib7ccdedf2b9c8aa5bdf0933ec4bb73a392fe8743
2018-05-30Add definition for IServiceManager 1.2android-o-mr1-iot-release-1.0.1Steven Moreland
Adding a new version of IServiceManager to introduce the following features: - Better notifications (onRegistration will contain the interface) - Remove service (for b/64678982, lazy HALs) - Callbacks to support lazy hal shutdown when there are no clients (b/79983843) - Method to list interfaces in the manifest (for b/76108617, since if they are lazy, they will no longer show up in listByInterface) - Broadcast to all HALs for systrace w/o root (b/78136428) - Register w/o it having to call interface chain (b/36424585) This CL intentionally does not introduce a method called getPassthroughServiceManager1_2 since the passthrough manager didn't even support 1.1 IServiceManager features. This may be added in the future if we want some of the above features in passthrough mode. Test: (sanity) boot and check for fatal logs Test: check for @1.2::IServiceManager in lshal Test: hidl_test Change-Id: Ife5a439a12e0e016c31187ac0bb62f9e4111113e
2018-05-21Update comments for doc comments.Steven Moreland
Doc comments look like "/** ... */" and they can only be in certain places. Bug: 79865343 Test: m Merged-In: If7c0584dca9be6bdd9714ef972bf11251c590fd2 Change-Id: If7c0584dca9be6bdd9714ef972bf11251c590fd2
2017-11-10Update makefiles for Soong plugin.Steven Moreland
Test: manual Bug: 35570956 Change-Id: I9ff98530878d0067a2a961b17276ac97b2cd9691
2017-10-10Update makefiles for Android.bp Java.Steven Moreland
Also, moved legacy android.hidl.base-V1.0-java-static target into a more maintainable location until we can completely remove it. Bug: 33420795 Test: pass Change-Id: I3144d83ff3f691b21c96068a9605e2b3481bdea7
2017-10-03Update for hidl adapter module defaults.Steven Moreland
Test: pass Change-Id: I593bffa5ae0ef479b6ff96c2ab46e903896cf4ec
2017-09-26Fix typo in update makefiles.Steven Moreland
Bug: 37518178 Test: pass Change-Id: Ic06e75ea95af0b219ae76ac674ca7c1c430230ae
2017-09-25libhidladapter: Support for HIDL adaptersSteven Moreland
A HIDL adapter takes an x.(y+1) interface and registers it as an x.y interface for testing. This library allows someone or something to run an adapter. Note: this requires b/62303973 to properly mock a lower interface version. Note: this requires adapters to run as root to get around sepolicy. Bug: 37518178 Test: can switch out implementations ~/android/master$ lshal | grep hidl.allocator Y android.hidl.allocator@1.0::IAllocator/ashmem 0/1 652 471 ~/android/master$ lshal | grep hidl.allocator Y android.hidl.allocator@1.0::IAllocator/ashmem 0/1 7635 471 ~/android/master$ lshal | grep hidl.allocator Y android.hidl.allocator@1.0::IAllocator/ashmem 0/1 652 471 Change-Id: Ic72feb3a2fd4649e67b396c33b9a292e9c0a944a
2017-08-03Update makefiles to remove java-static libs.Steven Moreland
Note base makefile isn't updated. This ensures that changes upstream which depend on it can be safely merged down. Bug: 36376126 Test: pass Change-Id: Id04b55098081af0862144e2546d3aa9a387f1513
2017-08-01Change dependency librarySundong Ahn
hwbinder.jar will be used instead of framework.jar on build-time, but on runtime framework.jar will be used. This is to cut the circular dependency when using configstore from Android framework. Bug: 35771640 Test: no test Change-Id: I52298dac149377abf12588ce290de00ad8cda066
2017-07-25Add 1.1 version of hwservicemanager.Steven Moreland
Test: boot marlin Test: hidl_test Bug: 63940457 Change-Id: I9c86c7c99eb6cccbf2e54596414bfec34e0bdbb8
2017-05-09Update makefiles for c++-sources and c++-headers.Steven Moreland
Test: pass Bug: 38174080 Change-Id: Id4bfe19b18c3b0c08ec83288aeb7a542230b3ba5
2017-05-02Remove duplicate targets.Steven Moreland
Test: nothing depends on these Fixes: 33276472 Change-Id: I81596265202f330bb3e28fe6dd2a79ff16e474fa
2017-05-01Merge "Remove redundant dependencies"Treehugger Robot
2017-05-01Remove redundant dependenciesSteven Moreland
android.hidl.base@1.0 and android.hidlmanager@1.0 are built into libhidltransport. Test: links Bug: 33276472 Change-Id: Ic7fcc85f13be5796829aa86af58defbd388ceebc
2017-04-28Make registerPassthroughClient() synchronous.Martijn Coenen
And remove the PID argument. Bug: 37730021 Test: lshal shows passthrough clients again Merged-In: I0bee20ae5cde36dbc86662654d0ac9e9489bf0a2 Change-Id: I0bee20ae5cde36dbc86662654d0ac9e9489bf0a2
2017-04-13Changed the naming scheme for Treble java libraries (both static and dynamic)Andreas Huber
android.hardware.foo@1.0-java => android.hardware.foo-V1.0-java Bug: 37207894 Test: make Change-Id: Iad2fe667c4fb8594d513a0b3c08a4c3229d5b6a7 Merged-In: If80e117ef3a284ab2dcc67b7c6a91da22530d71f
2017-04-12Update makefiles.Steven Moreland
Test: pass Change-Id: Id4e4a60149e7c8462d541bd114d96a7fc22c1f35
2017-04-06libhidl: remove libvintf dependencySteven Moreland
Now hwservicemanager deals with libvintf and provides an IPC call for the same information. This dependency on libvintf must be moved in order to remove it from vndk-stable. Test: extensive, see Ia5d1eb41b057ab5d6800f6c3fd22658adecc4be7 Bug: 36377072 Merged-In: I05d40e2bf2a467c75e51a133b4799c0fd7fa74cb Change-Id: I05d40e2bf2a467c75e51a133b4799c0fd7fa74cb (cherry picked from commit c601c5f21808844e614015eabc03e9c71f5aae42)
2017-03-21IServiceManager.hal: add pid to debugDumpSteven Moreland
Test: internal boots, hidl_test, lshal works Bug: 36414311 Change-Id: I60a43ee52abf7f65043ad9c684ad6595cec3614d
2017-03-06Remove interfaceChain from IServiceManager::add()Martijn Coenen
Bug: 32742469 Test: hidl_test, binderized marlin boots Change-Id: I966d314652789fa67f4d33a0ebc21871ae83fff8
2017-03-02Update for providing architecture infoYifan Hong
to IBase::getDebugInfo() and IServiceManager::debugDump(). Moved PassthroughServiceManager::list to debugDump() because it need to provide 32-bit libraries as well, which doesn't meet the contract of list(). Bug: 35803184 Test: lshal -itrpc Change-Id: I18374188ae6a33ba498ece5cddd92b48526f5f44
2017-02-17split android.hidl.memorySteven Moreland
Split android.hidl.memory into android.hidl.memory and android.hidl.allocator. This must be done because IAllocator is served over hwbinder transport and IMapper/IMemory are always going to be passthrough hals. Test: hidl_test, device boots with allocator Bug: 35327976 Merged-In: Ib135b5e101fadadbbf16126a98f90181f76a253b Change-Id: Ib135b5e101fadadbbf16126a98f90181f76a253b
2017-02-13Update comments in IServiceManager.Yifan Hong
Test: not tested. Change-Id: I2fc7964751c02f0447741380d4f3e35e82784f0d
2017-02-13Merge "Allow passthrough service manager to register client PIDs."Yifan Hong
2017-02-09Updated makefilesAndreas Huber
Java intermediates are now created in the common rather than the device- specific generated sources subdirectory. Bug: 33842609 Test: make Change-Id: I8efbd3fc28be86d9b511e2f6fbe1826256b070e0
2017-02-07Allow passthrough service manager to register client PIDs.Yifan Hong
Also removed unused implementation PassthroughServiceManager::debugDump() Test: lshal Bug: 34712252 Change-Id: I564f3e6560d548f36eb4333a086444660984a261
2017-02-02IBase::getReferenceInfo -> getDebugInfoYifan Hong
Bug: 34777099 Bug: 34861460 Test: lshal Test: NFC / light / audio with and without persistent.hal.binderized; run lshal to reflect this. Change-Id: I70aebefcaf5ed92a3c31a7bf2406d610c4533258
2017-02-01Change InstanceDebugInfo.refCount to int64_t.Yifan Hong
Use negative values for N/A values. Test: compiles Change-Id: I4ed9deb2f7fbf892f398bb51713b105679f28069
2017-01-25Add debugDump() to IServiceManager.Yifan Hong
PassthroughServiceManager simply list all dynamic libraries. Test: lshal Change-Id: Icf8b5e26a7f325e735543d1cf480ee7346046e93
2017-01-20IServiceManager.hal: list must be sortedSteven Moreland
Test: None Change-Id: Ibf3af445c34353516254c555322f90e51b7fa5ea
2017-01-18Update HIDL makefiles.Steven Moreland
This was causing a failure because package paths were defined multiple times because of an error in hidl-gen code when these makefiles were originally generated (Fixed in I9ef32b3867646690363fc9f85fe691ae74796d45). Test: hidl_test Bug: 34325813 Change-Id: Ie6500e53ba66dab0773830462f1c59932d801bef
2017-01-09Bp/n/sFoo -> Bp/n/sHwFooYifan Hong
Bug: 33554989 Test: hidl_test Change-Id: If46d3333f4dcc0a97010f13684bde219f07b3142
2016-12-12Update makefiles for java package path.Yifan Hong
Bug: 33554192 Test: hidl_test_java Change-Id: Ic14e6dde7e9cd2853da76ce60857e6b87908dd07
2016-12-02Hidlize IBase and use IBase instead of IBinder.Yifan Hong
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
2016-12-02Hidlized version of IMemory.Martijn Coenen
- 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
2016-11-22Update IServiceManager makefiles for liblog.Steven Moreland
Bug: 32943424 Test: compiles Change-Id: I477b4e5d66c44897d12196e2d668a5450de32a19
2016-11-18Split libhidl into base and transport.Yifan Hong
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