History log of /system/libhidl/base/HidlSupport.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
40ccc88443a4c5854dcc6dbd557f3e5111f2cc49 07-Apr-2017 Scott Randolph <randolphs@google.com> Merge "Implicit const char* cast removed, operator<< added to hidl_string." into oc-dev
c601c5f21808844e614015eabc03e9c71f5aae42 06-Apr-2017 Steven Moreland <smoreland@google.com> libhidl: remove libvintf dependency

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
Change-Id: I05d40e2bf2a467c75e51a133b4799c0fd7fa74cb
/system/libhidl/base/HidlSupport.cpp
0c84ab4192f9b0b03b9840b85fc430afa17f55f1 03-Apr-2017 Scott Randolph <randolphs@google.com> Implicit const char* cast removed, operator<< added to hidl_string.

hidl_string no longer will provide an implicit cast to const char* as it
interfers with other expected behaviors of the class. It now emulated
std::string in requiring a call to .c_str() to get the same behavior.

Bug: 36532780
Test: Build the tree for marlin, bullhead, bat
Change-Id: I6ba76522ef65aa211bc156144990ad8b7495b051
/system/libhidl/base/HidlSupport.cpp
f2250c735b245b58a1513037bcb34bfbbdb1d81a 15-Mar-2017 Yifan Hong <elsk@google.com> Merge "getTransport checks both manifests." am: 1957f7a07f am: d05118a3c0
am: adec8147f1

Change-Id: I210c43e8778e807c91fcbdee446157af4cc40834
1152a2a2516ad50eaecb02f2ea177727b74babc5 13-Mar-2017 Yifan Hong <elsk@google.com> getTransport checks both manifests.

It doesn't make sense to check manifest base on the package
it is in. Right now, android.hidl.* and android.frameworks.*
are in system/manifest.xml and vendor ones are in vendor/manifest.xml,
but the prefix should not matter.

Bug: 34772739
Test: boots, and then adb logcat -e "getTransport" doesn't show
warnings and errors.

Change-Id: I76e349a2af6c0c77ab91ea6dde3d00ea1f103279
/system/libhidl/base/HidlSupport.cpp
c2c91e63d7ca4c7db0365a9ee69afb1d214ba22b 09-Mar-2017 Yifan Hong <elsk@google.com> Disable getDebugInfo address leak for production builds. am: 24332ef104 am: 3dfc848cc7
am: 7701229076

Change-Id: I8a07783d18242f91e386b9bcbd54361bce6aa831
24332ef104a44b4bfb28c56ac2aa44584190e337 08-Mar-2017 Yifan Hong <elsk@google.com> Disable getDebugInfo address leak for production builds.

On production builds debugfs won't be available, so lshal cannot
infer binder relationships anyway. The address leak on production
builds also expose a security hole for address space attacks.
Added a build-time flag to disable the address leak on user builds.
The address will still be exposed for eng and userdebug builds so
that lshal can work properly.

Bug: 34899586
Test: lshal still works
Change-Id: Id1c381fbccad7584c2932deb9212d6996eeefd75
/system/libhidl/base/HidlSupport.cpp
59bd078a6268842ec7d32c053084c10e3cccd772 02-Mar-2017 Yifan Hong <elsk@google.com> getTransport checks interface and instance names. am: 37b3620ce1 am: 40256807d6
am: a83084fb93

Change-Id: I9ef49283f2c4af2da55bcaa508219dbd675c5e94
37b3620ce11288ad970bc7052b8bb76b17419474 01-Mar-2017 Yifan Hong <elsk@google.com> getTransport checks interface and instance names.

If <interface> is missing from the manifest, it returns
<transport> only if instanceName == "default", and EMPTY
otherwise.

Bug: 35219444
Test: hidl_test
Test: camera, soundtrigger works on marlin
Test: video playback works on marlin
Change-Id: Iaae6ae9bbf5f8c97fae63f2ac41595d822f781ca
/system/libhidl/base/HidlSupport.cpp
1fad64f440585a84f8d9fc5af318e60132a7746f 01-Mar-2017 Hridya Valsaraju <hridya@google.com> Add move constructor/assignment operator to hidl_memory am: 0126889103 am: eef47bd374
am: 39ac871fbb

Change-Id: I414b9e9221a710b59f3868ba45e9cb002fab4cb9
0126889103d84c2078896688017d61d612a12c4f 27-Feb-2017 Hridya Valsaraju <hridya@google.com> Add move constructor/assignment operator to hidl_memory

Bug: 34093434
Test: hidl_test passes

Change-Id: I6bb7e2e3c914040daa8d72d9a86a5a3d3f8338e5
/system/libhidl/base/HidlSupport.cpp
4367031f037aaae61d2a908a66ca827a4d778b73 01-Mar-2017 Yifan Hong <elsk@google.com> getTransport respects system/manifest.xml am: 64a41d5877 am: dfdf0a76b8
am: a4547bdb4b

Change-Id: I3660f9ec960d776033c7ee7abd2e349691984b90
64a41d5877f245b8f1ad4a6957a139a9c1588c21 28-Feb-2017 Yifan Hong <elsk@google.com> getTransport respects system/manifest.xml

Use VintfObject::GetDeviceHalManifest()
instead of HalManifest::Get(), because we have two HAL manifests
on the device now: one under system/ and one under vendor/. Removed the
hard-coded list of transport modes for framework HALs and consult
system/manifest.xml instead.

Test: marlin boots, NFC and Wi-Fi works
Test: hidl_test (IServiceManager->getService("manager") successful)

Bug: 34772739

Change-Id: Ie402d51f0942f7891b3f4bd3bbae92b8fd0808f1
/system/libhidl/base/HidlSupport.cpp
20eb9dd1c220ceb5763dc5322c69921a2671cb37 28-Feb-2017 Steven Moreland <smoreland@google.com> Merge "Make operator= and constructor behavior consistent." am: ecfdacd86c am: 7e7e4a3860
am: b419030975

Change-Id: I7944ded56032b4e65aabb407349a54fe1450fdc1
153f87a2fd2972f862a88976bb884a90a1f9fd7d 28-Feb-2017 Steven Moreland <smoreland@google.com> Make operator= and constructor behavior consistent.

hidl_string(nullptr) == "". Now so does operator=(nullptr).

Bug: 35421240
Test: libhidl_test
Change-Id: Ib62fa71ab47a407b7017c809783dd5f421b98e39
/system/libhidl/base/HidlSupport.cpp
359b7777143af5cc101cb18bfd39ffdab03d3845 24-Feb-2017 Steven Moreland <smoreland@google.com> Merge "Updating warning messages for getTransport." am: b7b89dbc02 am: 1d83fed7e3
am: 395c142e0e

Change-Id: I51bbd749530b1030f9fde0c11c07174c1fe7d071
6d8960dd6da751d0c445a1cb1b680d3a3500593d 23-Feb-2017 Steven Moreland <smoreland@google.com> Updating warning messages for getTransport.

- Make unsevere warnings seem less severe. Adding "using default" now so
that people stop considering these errors and searching in the wrong
places when debugging.
- Print fqName when getTransport is called but no VINTF is on the
device. This is useful for debugging why processes are querying
transport on devices which don't have a VINTF defined.

Fixes: 35695258
Test: hidl_test
Change-Id: I95396b542c367832cbcfb7cad044354ec363caae
/system/libhidl/base/HidlSupport.cpp
9904749647728189ea3c9245e23c0d79a12cf0ab 17-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "split android.hidl.memory"
346cf518ea29fd63e0ca0e366254d84e34f9286b 17-Feb-2017 Steven Moreland <smoreland@google.com> split android.hidl.memory

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
/system/libhidl/base/HidlSupport.cpp
23d041b328a4e79b9584a9bf47711d284e502dbc 17-Feb-2017 Yifan Hong <elsk@google.com> vintf: VendorManifest -> HalManifest am: 8e0cfc6a0c am: 8d24ebb475
am: 144a9ee67a

Change-Id: I3f1c8af9fa453bf11560bc311f264fceffd6f942
23bb9993014e064f9c720d889269764f4d4ec7a5 17-Feb-2017 Steven Moreland <smoreland@google.com> split android.hidl.memory

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
Change-Id: Ib135b5e101fadadbbf16126a98f90181f76a253b
/system/libhidl/base/HidlSupport.cpp
8e0cfc6a0cfff5168e7744f839f511e7d65c9829 17-Feb-2017 Yifan Hong <elsk@google.com> vintf: VendorManifest -> HalManifest

Test: mma
Change-Id: I70984779a80d5f0a8955a36a355d224fa0b8e12e
/system/libhidl/base/HidlSupport.cpp
b54e30bdf0979e26720099671bc61c5025375738 17-Feb-2017 Steven Moreland <smoreland@google.com> hidl_string: allow null cstr am: a21d84f11f am: 55107b3754 am: f78b5afd0a
am: 072984bb72

Change-Id: I6fc221a0c03665370434caad683613a9223f8d6d
b2c5b69d1d12f0c1b7381ebaa6d57adea5ee8e12 17-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add missing freeHandle to setTo"
a21d84f11f066315bd1476368d511286d129cb8a 16-Feb-2017 Steven Moreland <smoreland@google.com> hidl_string: allow null cstr

Automatically converting nullptr to empty string rather than erroring.
This gets rid of null values at the hal layer (rather than passing them
to the server) and simplifies code that would have to check for nulls.

Test: libhidl_test
Fixes: 35421240
Change-Id: Iada25da5407c3eccdd28704d993ffdee8b15c5fe
/system/libhidl/base/HidlSupport.cpp
ca37c0effc558ffe93a3c66f0b6b2480ec7410d4 16-Feb-2017 Scott Randolph <randolphs@google.com> Add missing freeHandle to setTo

On inspection, it looks like without this added call, the possibility
exists to leak a handle if a populated handle is "set".

Test: local build
Change-Id: I9a262fbc1af72ae498dd0e2172216414a263c7fd
/system/libhidl/base/HidlSupport.cpp
7a57de61a2017790b61ac211729a3b275f29c9ba 15-Feb-2017 Zhuoyao Zhang <zhuoyao@google.com> Revert "Revert "Move HidlInstrumentor to HidlInternal and namespace details.""

This reverts commit f9fd88291caa3a2bab89c1b8ff128b1659da81b4.
Test: make libhidlbase
Change-Id: I85eb85bd9e89c28026e9865f799dce2b0df584fc
/system/libhidl/base/HidlSupport.cpp
f9fd88291caa3a2bab89c1b8ff128b1659da81b4 15-Feb-2017 Zhuoyao Zhang <zhuoyao@google.com> Revert "Move HidlInstrumentor to HidlInternal and namespace details."

This reverts commit f509befb751b01701f6157b32c3a332abc237b2b.

Change-Id: I0770e5a7d5cea3d42a97d664fcc3ad2f1f7414f7
/system/libhidl/base/HidlSupport.cpp
f509befb751b01701f6157b32c3a332abc237b2b 14-Feb-2017 Zhuoyao Zhang <zhuoyao@google.com> Move HidlInstrumentor to HidlInternal and namespace details.

Bug:34644498
Test: run vts -m VibratorHidlTargetProfilingTest
Change-Id: Ifd20e60cf7148c0b4e060802dc7b7653add2b5a4
/system/libhidl/base/HidlSupport.cpp
551396afe50bb40b046e9f16b4501e6df055c88a 14-Feb-2017 Steven Moreland <smoreland@google.com> hidl_string: relational operators

Fixes: 34524287
Test: libhidl_test
Change-Id: Id0731e6df1fc1831d8c1bdf35b3aa17abd5273d2
/system/libhidl/base/HidlSupport.cpp
e682a5a8f0ea3d9221fac214232c8a6f18cfb035 13-Feb-2017 Yifan Hong <elsk@google.com> Revert "Revert "Update for using integers for major/minor versions in FQName.""

This reverts commit f9c9f59bf70345bc13df54c4e1f27feb9bc70c64.

Change-Id: Ife0c840dd9e967771b3c500bd7f4ffc7725df816
/system/libhidl/base/HidlSupport.cpp
f9c9f59bf70345bc13df54c4e1f27feb9bc70c64 11-Feb-2017 Steven Moreland <smoreland@google.com> Revert "Update for using integers for major/minor versions in FQName."

This reverts commit abde972c1df678519233d7deeb6f5e8d138c022d.

Change-Id: I045fe427b2517e85a38d402f2dd8682609d691ca
/system/libhidl/base/HidlSupport.cpp
abde972c1df678519233d7deeb6f5e8d138c022d 02-Feb-2017 Yifan Hong <elsk@google.com> Update for using integers for major/minor versions in FQName.

Test: hidl_test
Change-Id: I86a8ac0f381f2a544d8ebc149c2601e7a673e8f6
/system/libhidl/base/HidlSupport.cpp
2236bd143d4cddc8d485a5a007530ccee4628c11 10-Feb-2017 Zhuoyao Zhang <zhuoyao@google.com> Load profiling functions with package and version info.

Test: vts -m VibratorHidlTargetProfilingTest
Change-Id: Icf8c703170ee3b5595fba9629a44a01fd88fb322
/system/libhidl/base/HidlSupport.cpp
0173273dd445a355c5e19e7f75a34c297f424324 03-Feb-2017 Steven Moreland <smoreland@google.com> Cannot open manifest: error -> warning

This is confusing devs as this is not an error yet and is expected
behavior.

Test: none
Change-Id: I67f04e88d19cb0f319915e4e9df97114e80caf75
/system/libhidl/base/HidlSupport.cpp
20273f9b308ec7df36dff6aa9f27d02a8d01cf79 30-Jan-2017 Yifan Hong <elsk@google.com> Change getTransportFromManifest to getTransport.

Test: NFC / light / audio works with and without
persistent.hal.binderization.

Bug: 34810039: VINTF: specify version in getTransport
Bug: 34772739: getTransport checks a static map for android.hidl.*
packages
Bug: 34772726: VINTF needs to be able to specify things at
interface-level granularity

Change-Id: I0c7b31f177f243c85c0c99dc46f32cbbb0586180
/system/libhidl/base/HidlSupport.cpp
93c1e3aa4277de38cf40399980f9876a1f9c9ce4 24-Jan-2017 Zhuoyao Zhang <zhuoyao@google.com> Update HidlInstrumentor.

* Instead of dlsym method HIDL_INSTRUMENTATION_FUNCTION, dlsym
HIDL_INSTRUMENTATION_FUNCTION + insterface_name.
* This enables a single profiler library that contains the profiling
method for all the interfaces defined within the same hidl package.

Test: mma for hardware/interface.
local test with vts.
Change-Id: I076841ea8a565c489b45303e5ca496806d5d10be
/system/libhidl/base/HidlSupport.cpp
04b91c0fa5d2ccfe92816791064c30a25cbef0be 19-Jan-2017 Martijn Coenen <maco@google.com> Fix hidl_handle/hidl_memory ownership semantics.

hidl_handles that are constructed from a native_handle_t
object never own a handle, unless explicitly requested by
a call to setTo().

Copying a hidl_handle does clone the enclosed native_handle_t
and consequently takes ownership of it.

As a consequence, hidl_memory no longer needs to keep
track of handle ownership; the default constructors
don't take ownership of the passed in native_handle_t,
requiring callers to clean the handles up when it is
done with them. This makes sense because in most cases,
hidl_memory is a very transient object just used for
IPC.

Test: hidl_test, libhidl_test
Bug: 33812533
Change-Id: Idf26434c6a1dc541d4b909ac1523dbf92f214e1a
/system/libhidl/base/HidlSupport.cpp
44c0e577e148d3e1b8ce561165b3af661960d5d8 21-Jan-2017 Yifan Hong <elsk@google.com> Add getTransportFromManifest

which consult the vendor interface object to see
what transport method is expected for each HAL.

Test: hidl_test

Bug: 32718841
Change-Id: Ic93bea634852554a331824f3f1f003442ffe4841
/system/libhidl/base/HidlSupport.cpp
ec0e39dffecdab974aa0488097dd08ce6020d29f 24-Jan-2017 Yifan Hong <elsk@google.com> Revert "Add getTransportFromManifest"

This reverts commit fba2495bc608f7c488fb74f0c8b6c252b3fe6669.

Change-Id: Idefe5d80e86af072c41c635cb24754f2ec352196
/system/libhidl/base/HidlSupport.cpp
fba2495bc608f7c488fb74f0c8b6c252b3fe6669 21-Jan-2017 Yifan Hong <elsk@google.com> Add getTransportFromManifest

which consult the vendor interface object to see
what transport method is expected for each HAL.

Test: hidl_test

Bug: 32718841

Change-Id: I4529b7dcb5a892d968b50f2a2301035b9f0aa466
/system/libhidl/base/HidlSupport.cpp
a2a8184180557e980387f769ac3915eb9e072f8b 20-Jan-2017 Steven Moreland <smoreland@google.com> hidl_string: add operator<

This allows us to std::sort vecs of hidl_strings, etc..

Test: libhidl_test
Change-Id: I6e9a7669bceb09d62791fe8c88cfd1977ea07194
/system/libhidl/base/HidlSupport.cpp
337e6b61c4fc3a7ba76862662117c17496a1f8a2 19-Jan-2017 Steven Moreland <smoreland@google.com> Add passthrough service manager.

Right now we have logic related to getting passthrough services
generated inside of getService. We should abstract this logic out
into an instance of IServiceManager.

This will:
- abstract passthrough transport implementation from hidl-gen
- decrease code complexity in hidl-gen

Bug: 34394392
Test: hidl_test
Change-Id: Ia6160047c63c6788728d4e17a7cdf67bf6cd06e7
/system/libhidl/base/HidlSupport.cpp
53120f70b7d429c81fe47718182e829660ed5ef9 12-Jan-2017 Steven Moreland <smoreland@google.com> hidl_string: Add cstr + length constructor

This will allow non-terminated strings to be turned into a hidl_string
with only one copy among other things.

Test: libhidl_test
Fixes: 34221748
Change-Id: I443f7920a65d23b7bcb583db55c3cec7266ec2d4
/system/libhidl/base/HidlSupport.cpp
5a643b9fbd9f08bd04a38804d647c847c1c93b8f 04-Jan-2017 Zhuoyao Zhang <zhuoyao@google.com> Support dynamically enable profiling.

* Create method configureInstrumentation to enable/disable instrumentation based
on the corresponding system property. This method will be called every
time setHALInstrumention is invoked for any hal.
* Add setHALInstrumention to IBase.hal

Bug: 33923655
Test: make libhidlbase.
Change-Id: I130fb903f65783568a97308e291965960abab41d
/system/libhidl/base/HidlSupport.cpp
09cd6bd8f311b18e72186a5013bd10492f0b7e3c 15-Dec-2016 Yifan Hong <elsk@google.com> Do not register instrumentation callbacks if property is false.

Bug: 33645959

Test: hidl_test --gtest_filter="HidlTest.WrapTest"
Change-Id: Iebbfc67bfc6badf0f16f2378b6b58755194d60db
/system/libhidl/base/HidlSupport.cpp
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/base/HidlSupport.cpp
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/base/HidlSupport.cpp
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/base/HidlSupport.cpp
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/base/HidlSupport.cpp