Commit graph

201 commits

Author SHA1 Message Date
Yunlian Jiang
ce3cd0cf4a libhardware: fix a use after free warning.
This fixes the warning that mModule is used
after being freed.

BUG: None
Test: The warning is gone.
Change-Id: I8d081b544f0bcd69559a10dd3e925ce5cf065c28
2016-11-08 15:20:20 -08:00
Dan Albert
a26bcd5424 Stop hard coding gmock things.
The headers are exported.

Change-Id: I72f8dda3f441bc72accce3c9e94a7160fcefc54c
Test: mma
2016-08-16 12:01:43 -07:00
Chih-hung Hsieh
e7ade1f3b9 Merge "Fix clang-tidy performance warnings in libhardware." am: 1c1e311e06 am: 5f366ef448 am: 90383959ac
am: 31a6b95815

Change-Id: I6dcc98594a1f0861fa4af489eeb824562ad16bb4
2016-08-04 22:17:47 +00:00
Chih-Hung Hsieh
5f366ef448 Merge "Fix clang-tidy performance warnings in libhardware."
am: 1c1e311e06

Change-Id: I00ee76484a102dc1577566fe370af16f9283fc3e
2016-08-04 22:03:49 +00:00
Chih-Hung Hsieh
8d78f0b7b5 Fix clang-tidy performance warnings in libhardware.
* Use const reference parameter type to avoid unnecessary copy.

Bug: 30407689
Change-Id: Ibf19e5529e548bba21fcc8403eb356cb49548172
Test: build with WITH_TIDY=1
2016-07-27 15:45:46 -07:00
Dan Willemsen
74bb150529 Partially revert "Begin converting Android.mk to Android.bp"
Continue using Android.mk for hardware/libhardware/tests/hardware, until
some partial branches without system/media are fixed to define
SOONG_ALLOW_MISSING_DEPENDENCIES=true.

Change-Id: I82ec7b104ea610ea02a473ba6f5a067faba78052
2016-07-13 15:13:03 -07:00
Dan Willemsen
d269bf4328 resolve merge conflicts of 69ed5d9 to stage-aosp-master
Change-Id: I1e86670dcf4e3187efca4beff673bbc057cbd509
2016-07-13 11:28:47 -07:00
Dan Willemsen
f51bf92061 Begin converting Android.mk to Android.bp
These modules have their dependencies satisfied.

Change-Id: I67986efd7478e477770bedac72ab35a407e3d06a
2016-07-12 23:34:37 -07:00
Chih-Hung Hsieh
5aeef066b1 Merge \"Fix google-explicit-constructor warnings in libhardware\"
am: 99d2543a12

Change-Id: I28fe5fb49377f03bc962730ad8b51202e16f5854
2016-06-30 23:14:35 +00:00
Chih-Hung Hsieh
928e679cf3 Fix google-explicit-constructor warnings in libhardware
Bug: 28341362
Change-Id: I29a56734e54740e4b15fe2f6cacbbd867163ae79
Test: build with clang-tidy
2016-06-30 14:21:20 -07:00
Chih-hung Hsieh
78df3759f6 Merge "Fix misc-macro-parentheses warnings." am: 2d0b1fa2e9
am: 10e811f13e

* commit '10e811f13ed5f1da863e93939719ea1f16e6649b':
  Fix misc-macro-parentheses warnings.

Change-Id: Ic1c3277e78b153663305e63b5ec5c5421279f67d
2016-05-16 18:57:42 +00:00
Chih-Hung Hsieh
4d52b43cb6 Fix misc-macro-parentheses warnings.
Bug: 28705665
Change-Id: Ie514abfe12bea065658da3706aad8b4c9c0a93c7
2016-05-12 10:07:30 -07:00
Chih-Hung Hsieh
c27d17f659 Merge "Fix google-explicit-constructor warnings." am: 0cf9f2b714
am: ee091a8068

* commit 'ee091a80685dec195cce21c93a9b499f39fbc9c9':
  Fix google-explicit-constructor warnings.

Change-Id: I082952bf2e6d2884d45535c9c08dc9fa9aed2a08
2016-05-04 17:45:13 +00:00
Chih-Hung Hsieh
bcfe2933ca Fix google-explicit-constructor warnings.
Bug: 28341362
Change-Id: Ica5b2c67b008a03aeaeb35d44b8d19632f8f30a4
2016-05-02 15:51:12 -07:00
Jamie Howarth
b35ec7162d Moved init and release.
Moved the init release calls in the vehicle-hal-tool.

I assume the correct sequence for a set is :-

VehicleNetworkService -> VehicleHAL vehicle_device_open
VehicleNetworkService -> VehicleHAL vehicle_device_init
VehicleNetworkService -> VehicleHAL vehicle_device_set
VehicleNetworkService -> VehicleHAL vehicle_device_release

bug: 27816048

Change-Id: I3ac37eaf69027824bc6247f25a99f27527c1a2b9
2016-03-23 13:43:18 -07:00
Jamie Howarth
8b61aac596 Add support for all data types to vehicle-hal-tool.
Added support for all data types to set, get, subscribe.

Change-Id: Ided5baa036eefc21d381607b19bd31522cfe95cb
2016-03-15 18:28:41 -07:00
Keun-young Park
ab68e37c35 vehicle hal update
- add release_memory_from_get to allow hal to release
  memory it has allocated in get call
- clear get call's behavior: If data is not available, should
  return immediately with VEHICLE_ERROR_NOT_READY error
- make zone separate in vehicle_prop_config_t and
  vehicle_prop_value_t: Handing of zoned property becomes
  simpler
- cleanup some data type definitions for zoned properties

bug: 27597338, 27596281
Change-Id: I7a8454b86555270fb2211e5d36b3ee06d350f8ed
2016-03-14 17:00:36 -07:00
Steve Paik
6934b3bf04 Merge "Added event handling for INT_VEC2, INT_VEC3" into nyc-dev 2016-03-10 03:04:57 +00:00
Jamie Howarth
a320c56514 Added event handling for INT_VEC2, INT_VEC3
Added support for event handling of VEHICLE_VALUE_TYPE_INT32_VEC2, and
VEHICLE_VALUE_TYPE_INT32_VEC3.

Bug: 27578597
Change-Id: Ic20da00f9adf634c77c4067a5243cbd2aae681e4
2016-03-09 18:53:08 -08:00
Keun-young Park
77761e24f9 GEAR_* rename
- change to GEAR_PARK and GEAR_LOW
- also remove some build warnings

bug: 27549456
Change-Id: I9062c4570afe5cacd6a17f1cb196273a719b0a97
2016-03-08 15:02:44 -08:00
Keun-young Park
bf877a7e66 vehicle hal update
- add zones to subscribe to allow selected subscription for
  zoned properties
- extend config to uint32[4] to allow passing more informaiton
  from configs
- change audio volume to be per context, not physical stream.
  This maps better to android side's logical streams.
- renamed APP_CONTEXT to AUDIO_CONTEXT: It is useful only for
  audio.
- add more audio contexts: safety alert, CD, aux audio

bug: 25183740, 26233321

Change-Id: I29de7b6c9d9a770cf87e7f50991c875d7ce9fdbe
2016-01-06 15:15:02 -08:00
Andreas Gampe
a72296a223 Merge "Libhardware: Fix tests" am: de5662d7fa
am: 7edadd7197

* commit '7edadd7197e2bc4665b49f07cb3561120cd4ed1f':
  Libhardware: Fix tests
2015-12-17 16:16:16 -08:00
Andreas Gampe
1aa58f9ef9 Libhardware: Fix tests
Fix some warnings. Silence another. Less build noise.

Change-Id: Ibdbba093c2aca45343bfbe72c551b15d0f94e1b5
2015-12-16 15:53:35 -08:00
Eino-Ville Talvala
d4392024d2 Camera: Mark camera HAL device v2.x as unsupported
Device HAL v2.x is obsolete, and no devices using it are still
supported. Mark it unsupported, and clean up native tests.

Bug: 25866588
Change-Id: I8e0f1448b8ae0eaaf3714f2351746af46c7657a7
2015-11-30 10:20:57 -08:00
Sanket Agarwal
fb63668a8a Add vehicle hal.
- vehicle hal is used for supporting car specific features.
- Each property can be written (=set), read (=get), or subscribed.
- Each property has configuration informaiton to tell what that property
  is and how it can be accessed.
- also adding dummy hal implementation.

bug: 25183740

Change-Id: Ib1cc1c11540f156db73552f2a18a8efb361002af
2015-11-13 11:50:54 -08:00
Tim Kilbourn
864984c3b1 MouseInputMapper
Maps relative movements of a mouse or scroll wheel and mouse button
presses. All other logic from CursorInputMapper will be handled in the
host.

Change-Id: I00a966a6194d4810b7b6ac5cc815287ecf7dfb84
2015-07-28 13:21:10 -07:00
Eino-Ville Talvala
505981c721 am 79797687: am d95a340b: Merge "Camera2 tests: Fix incorrect error code check" into mnc-dev
* commit '797976876f6afde0a3a114c1b8a12f26b4ebd666':
  Camera2 tests: Fix incorrect error code check
2015-07-14 15:17:10 +00:00
Ruben Brunk
f29796c2fe am fa843087: am 49f58811: Remove out-of-date camera2 native tests.
* commit 'fa8430875ced1b31396cdea392b85cd33c1fee6c':
  Remove out-of-date camera2 native tests.
2015-07-14 15:17:09 +00:00
Eino-Ville Talvala
797976876f am d95a340b: Merge "Camera2 tests: Fix incorrect error code check" into mnc-dev
* commit 'd95a340b9f74b38703e78b3e2e8bc43f49c3ebf8':
  Camera2 tests: Fix incorrect error code check
2015-07-14 15:06:53 +00:00
Ruben Brunk
fa8430875c am 49f58811: Remove out-of-date camera2 native tests.
* commit '49f58811ea29ff8bed5e307d8018ead075731881':
  Remove out-of-date camera2 native tests.
2015-07-14 15:06:52 +00:00
Eino-Ville Talvala
d95a340b9f Merge "Camera2 tests: Fix incorrect error code check" into mnc-dev 2015-07-11 00:32:27 +00:00
Eino-Ville Talvala
5ad8086ad7 Camera2 tests: Fix incorrect error code check
Bug:  22410279
Change-Id: Iad74e90d148908aafd39878608c10fe03c689b8a
2015-07-10 15:06:02 -07:00
Ruben Brunk
49f58811ea Remove out-of-date camera2 native tests.
Bug: 22410279
Change-Id: Ib4a39306115e05b8e430bdc8456ad940b3426a8e
2015-07-10 14:45:56 -07:00
Dan Albert
12468e63be am b1988842: am 5e901ed4: Merge "Use abort() instead of a null dereference."
* commit 'b1988842df47187031718ccffa458ccafa9c2d6e':
  Use abort() instead of a null dereference.
2015-06-11 20:25:48 +00:00
Dan Albert
b1988842df am 5e901ed4: Merge "Use abort() instead of a null dereference."
* commit '5e901ed49faed3465c9df8e6cf6c684249bb3c8c':
  Use abort() instead of a null dereference.
2015-06-11 20:05:53 +00:00
Dan Albert
5b57857c7f Use abort() instead of a null dereference.
Clang deletes these because they're invalid. It's pretty awful of
clang to do this, but this should be abort() anyway.

Change-Id: I89423ff2c4d08db82077e56b726549e3783d38e1
2015-06-11 11:04:52 -07:00
Tim Kilbourn
2154c9d659 Merge "Code layout cleanup" 2015-06-10 16:40:34 +00:00
Tim Kilbourn
e8ee0c3ee0 Merge "Initial InputMappers for evdev input HAL." 2015-06-10 16:38:44 +00:00
Eino-Ville Talvala
736a0173f1 am 966fbc67: am 17b8cee9: Merge "Camera2 tests: Update for framework changes" into mnc-dev
* commit '966fbc673a60f0ecdcf9f535d01b549f7ef04b31':
  Camera2 tests: Update for framework changes
2015-06-09 23:23:30 +00:00
Eino-Ville Talvala
cd6984e762 Camera2 tests: Update for framework changes
Change-Id: I9ac788cfe9a001ef33bdc52a9e8ba0bdcf3ded2c
2015-06-09 15:23:34 -07:00
Tim Kilbourn
dbc8c16841 Code layout cleanup
- Fwd declare where possible
- List .h first in the .cpp to verify proper includes
- Remove hacky -internal.h file and move testBitInRange to a new component

Change-Id: I442248c4b32738c6c2af250f45d4c8822c862e08
2015-06-09 11:16:04 -07:00
Tim Kilbourn
4f3145d75f Initial InputMappers for evdev input HAL.
The previous design of the InputHost wrapper classes made it very
painful to do testing, so this change also reverts to a more classical
C++ pattern for non-copyable objects. The InputHost classes still simply
call through to the input_host_t and callbacks as before.

Updated unittests to use gmock for mocking the InputHost interactions.

Change-Id: I4b70df2c89ed48af77446b8f5b87a4bde94510bf
2015-06-09 11:16:04 -07:00
Tim Kilbourn
3186e7bf48 Configure device classes for evdev devices.
Change-Id: Ia75b71253771d9d558c59411e27f8a51e352fb8b
2015-06-01 14:33:47 -07:00
Tim Kilbourn
c929d25095 Clarify usage of smart pointers
- Members should be smart (shared or unique)
- Prefer function args to be bare, unless the arg is intended to be
  stored by the callee
- Function args that are smart should be const refs to avoid an extra
  copy

Change-Id: I8052fa432bcffbabff9d67a8d568640cac64d4ad
2015-04-29 15:33:25 -07:00
Sasha Levitskiy
468b567316 Fingerprint: Add an API to get authenticator id
Change-Id: If45ebc228425eaa43bf9abde934f8bb4e7d97e6c
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2015-04-16 21:52:28 +00:00
Eino-Ville Talvala
aee4782839 Camera: Add HAL module init method.
For use by Camera HAL libraries to perform one-time initialization
steps after the library is loaded.

Bug: 20016050
Change-Id: Ia01ae0eafcadece9124ac2cfcc3b1c3939352843
2015-04-15 17:26:13 -07:00
Ashutosh Joshi
a679e3fcf0 Merge "Change struct offsets tests" 2015-04-14 23:26:20 +00:00
Ashutosh Joshi
5f0ebe67c5 Change struct offsets tests
Change the structure offset tests to account for the addition
of a new member in a sensors device structure.

Change-Id: I2ef7b82446b09b32f903346bbc9b857a99d80043
2015-04-14 16:24:10 -07:00
Jim Miller
1e1f7ba5c9 Clean up FingerprintManager API and make it public.
Change-Id: I416dcc42fd70926875cc77e0c2cc958fdfcd9f9d
2015-04-11 09:21:56 -07:00
Tim Kilbourn
73475a4eb2 Input event hub for evdev input HAL module.
InputHub monitors paths for device changes and input events.
InputDeviceManager creates InputDevices and routes input events to
them. InputDevices currently just log these events during development.
InputHost represents a wrapper around the HAL interface.

Change-Id: Ic47d574498eb07bcdcd17812a648539fdf1c69d6
2015-03-30 17:21:29 -07:00