OSDN Git Service

android-x86/hardware-interfaces.git
7 years agoMerge "Remove test for overloaded function."
Treehugger Robot [Tue, 18 Oct 2016 17:45:27 +0000 (17:45 +0000)]
Merge "Remove test for overloaded function."

7 years agoRemove test for overloaded function.
Steven Moreland [Tue, 18 Oct 2016 00:53:09 +0000 (17:53 -0700)]
Remove test for overloaded function.

Bug: 31758541
Test: hidl_test
Change-Id: Ib02d9e8531ea2b7ec36bf8785e6827cfa45b53ba

7 years agoAdd test for single letter IDs.
Yifan Hong [Mon, 17 Oct 2016 23:57:51 +0000 (16:57 -0700)]
Add test for single letter IDs.

Test: mma

Bug: 32068694
Change-Id: I56659715beaadd8ebb3b9f36558e7ebcdb3e4d27

7 years agoMerge changes from topic 'nfc-style'
Treehugger Robot [Mon, 17 Oct 2016 15:57:16 +0000 (15:57 +0000)]
Merge changes from topic 'nfc-style'

* changes:
  nfc: update default implementation to match style.
  nfc: reflect style guide.

7 years agoModify return values of read/write/config methods to bool
Hridya Valsaraju [Tue, 27 Sep 2016 20:43:57 +0000 (13:43 -0700)]
Modify return values of read/write/config methods to bool

Modify return values of read/write/config methods to bool
for the FMQ unit tests and benchmarks.

Bug: 31780470
Test: Built and ran existing FMQ unit tests and benchmarks

Change-Id: I2b7c9cf073f0c1a2908d48552e258ce21240ae64

7 years agonfc: update default implementation to match style.
Steven Moreland [Mon, 26 Sep 2016 19:41:23 +0000 (12:41 -0700)]
nfc: update default implementation to match style.

Test: make android.hardware.nfc@1.0-impl
Change-Id: I00357d40df1a6b2289f86b33d7a5833e358884d6

7 years agonfc: reflect style guide.
Steven Moreland [Mon, 26 Sep 2016 19:40:29 +0000 (12:40 -0700)]
nfc: reflect style guide.

Test: make android.hardware.nfc@1.0
Change-Id: I19b5c5a8b7e6345152441be149349933774b3de0

7 years agoMerge "Cleanup nfc service code."
Treehugger Robot [Fri, 14 Oct 2016 07:42:18 +0000 (07:42 +0000)]
Merge "Cleanup nfc service code."

7 years agoAdd Bluetooth HAL definition
Myles Watson [Mon, 12 Sep 2016 17:58:42 +0000 (10:58 -0700)]
Add Bluetooth HAL definition

Test: compiles
Bug: 31972505
Change-Id: I7608b0814c9ca697b21c9e115cfcd81ab1364892

7 years agoCleanup nfc service code.
Steven Moreland [Thu, 13 Oct 2016 16:33:18 +0000 (09:33 -0700)]
Cleanup nfc service code.

Test: mma
Change-Id: Ie65c5bfde292107bec567a297e86eebf5cd7fa41

7 years agoMerge "Added test for overloading."
Treehugger Robot [Tue, 11 Oct 2016 23:24:46 +0000 (23:24 +0000)]
Merge "Added test for overloading."

7 years agoAdded test for overloading.
Steven Moreland [Thu, 6 Oct 2016 22:05:35 +0000 (15:05 -0700)]
Added test for overloading.

Test: make, hidl_test
Bug: 31758541
Change-Id: Ia0fdad2f0b0155065a7dec5526ab5d14a9ec1f52

7 years agowifi: Invoke failure callbacks
Roshan Pius [Fri, 7 Oct 2016 16:21:42 +0000 (09:21 -0700)]
wifi: Invoke failure callbacks

Invoke the failure callbacks for |requestChipDebugInfo|,
|requestDriverDebugDump| and |requestFirmwareDebugDump| methods.

Bug: 32014425
Test: Compiles
Change-Id: I49b8ae93fe846df6d9663b10d2a70eb89bd00931

7 years agowifi: Add WifiRttController object
Roshan Pius [Fri, 7 Oct 2016 03:23:47 +0000 (20:23 -0700)]
wifi: Add WifiRttController object

Create the WifiRttController object and add the createRttController
method in WifiChip.

Bug: 31991232
Test: Compiles
Change-Id: I34649097c96488c660bef5acceac1a6478f80dca

7 years agowifi: Add Iface related method implementations in WifiChip
Roshan Pius [Thu, 6 Oct 2016 23:47:38 +0000 (16:47 -0700)]
wifi: Add Iface related method implementations in WifiChip

Add the iface creation/retrieval/list method implementations in WifiChip.
WifiChip does not yet support the chip mode configuration. So, all
|createIface| method calls succeed today. Once the mode configuration
changes are in place, we will deny iface creation requests depending on
the iface combination supported in the current mode.

The iface objects are all invalidated and deleted on mode switches and
when HAL is stopped.

While there,
Change the |callbacks_| member to std::vector instead of std::set. We
don't really need a set to store the list of callbacks.

Bug: 31943042
Test: Compiles
Change-Id: Ic94864c8b11aabbe569b5157d68d6056364a3c4c

7 years agowifi: Add the various iface object implementation
Roshan Pius [Thu, 6 Oct 2016 20:16:23 +0000 (13:16 -0700)]
wifi: Add the various iface object implementation

This CL adds the implementation classes for the various iface HIDL
interfaces defined. These classes implement the
|getName| & |getType| methods in the Iface HIDL interface.

Integration of these objects with WifiChip class is implemented in the
next CL.

Bug: 31943042
Test: Compiles
Change-Id: I219afd6441e15c76cf7c61f7bcd2b3568dba2b98

7 years agowifi: Remove "Wlan" prefix from wifi_legacy_hal public methods
Roshan Pius [Thu, 6 Oct 2016 21:37:15 +0000 (14:37 -0700)]
wifi: Remove "Wlan" prefix from wifi_legacy_hal public methods

All the legacy HAL API's in the function table uses the "wlan0"
interface handle for the various operations. But, this is an internal
detail that should be abstracted inside WifiLegacyHal class. So, rename
the public methods to remove the "Wlan" prefix from them.

Also, add methods to fetch the iface names to use for the various types
of HAL.

Bug: 31943042
Test: Compiles
Change-Id: I35a6cdea0ad7cff295d33c0245953258129fba43

7 years agowifi: Add support for multiple chips in IWifi
Roshan Pius [Mon, 10 Oct 2016 15:03:42 +0000 (08:03 -0700)]
wifi: Add support for multiple chips in IWifi

The modified HIDL interface supports multiple chip instances on the
device. Modify the |IWifi| interface implementation to support the new
methods.

NOTE: The legacy HAL implementation will continue to only expose 1 chip.

While there,
Change the |callbacks_| member to std::vector instead of std::set. We
don't really need a set to store the list of callbacks.

Bug: 32003988
Test: Compiles
Change-Id: I31e704100f716e223095890279bdf93d2a04377e

7 years agowifi(interface): Add RTT Controller object
Roshan Pius [Thu, 6 Oct 2016 18:08:17 +0000 (11:08 -0700)]
wifi(interface): Add RTT Controller object

Create a RTT controller object to use for initiating all the RTT related
HAL opertations.
Since we don't want to fix the iface on which to initiate RTT operations,
these methods will be rooted in a new standalone object |RttController|.
Framework can decide to intiate an instance of |RttController| on a
specified iface or let the implementation pick one.

Bug: 31991232
Test: Interface compiles.
Change-Id: I65f7a7babd72db26ce6549f572abd9ef73700c82

7 years agowifi(interface): Add Iface objects
Roshan Pius [Wed, 5 Oct 2016 17:19:06 +0000 (10:19 -0700)]
wifi(interface): Add Iface objects

Create a child object under IWifiChip to represent each interface
within the chip. Each iface object has a |type| & |ifname| which should
help us uniquely identify them. This should help us expose methods that
are applicable only to a specific interface type.

While there,
Assign a unique id to every chip on the device.
Add IWifi.listChipIds() to retrieve the list of chip Id's avaiable on the
device. IWifi.getChip() will now use the provided Id to retrieve the
corresponding IWifiChip object(because HIDL language doesn't support
vec<HIDL objects>).

Bug: 31943042
Bug: 32003988
Test: Interface compiles (not implementation)
Change-Id: I723007566ca4220362c02d0f452753fee4e31fce

7 years agoMerge "Initial version of radio hal"
Treehugger Robot [Mon, 10 Oct 2016 23:53:10 +0000 (23:53 +0000)]
Merge "Initial version of radio hal"

7 years agoInitial version of radio hal
Amit Mahajan [Fri, 12 Aug 2016 22:25:10 +0000 (15:25 -0700)]
Initial version of radio hal

Test: No build issues. Unused interface; nothing to test yet.

Bug: 32020264
Change-Id: Ie57eb43b777dadbc0b0350f2e33227be3f1d65f1

7 years agoMerge "Add test for importing a single type."
Yifan Hong [Mon, 10 Oct 2016 19:49:45 +0000 (19:49 +0000)]
Merge "Add test for importing a single type."

7 years agoAdd test for importing a single type.
Yifan Hong [Wed, 5 Oct 2016 19:15:51 +0000 (12:15 -0700)]
Add test for importing a single type.

Test: `cd system/tools/hidl && mma`

Bug: 31821285

Change-Id: I0be97b16b84f76b64c09f9dc52709416601cbbdf

7 years agoAdd test for fixing 0XFF (upper X)
Yifan Hong [Fri, 7 Oct 2016 23:32:57 +0000 (16:32 -0700)]
Add test for fixing 0XFF (upper X)

Bug: 31983995

Test: make android.hardware.tests.expression@1.0
Change-Id: I05bed0164c5cc988843a60d1efc8f5aeb4986b9b

7 years agoMerge "Revert "Revert "Revert "nfc: reflect style guide.""""
Steven Moreland [Thu, 6 Oct 2016 02:51:18 +0000 (02:51 +0000)]
Merge "Revert "Revert "Revert "nfc: reflect style guide.""""

7 years agoRevert "Revert "Revert "nfc: update default implementation to match style."""
Steven Moreland [Thu, 6 Oct 2016 02:49:36 +0000 (02:49 +0000)]
Revert "Revert "Revert "nfc: update default implementation to match style."""

This reverts commit 22be21e8647a587ee8f2effb57f38c793d90c2c5.

Change-Id: I0534b0eb87623091685fa0e2d94d744d2aeaa4ca

7 years agoRevert "Revert "Revert "nfc: reflect style guide."""
Steven Moreland [Thu, 6 Oct 2016 02:49:38 +0000 (02:49 +0000)]
Revert "Revert "Revert "nfc: reflect style guide."""

This reverts commit 106bc9d27a271b316ce3b4237d59a908c23a4ec0.

Change-Id: Ie2e0ad4aeaa58c45bab05234615bd7fa02b84c1a

7 years agoMerge "Add test for missing package name for FQName lookup."
Treehugger Robot [Thu, 6 Oct 2016 00:19:36 +0000 (00:19 +0000)]
Merge "Add test for missing package name for FQName lookup."

7 years agoMerge changes from topic 'rename_wifi_hal'
Treehugger Robot [Wed, 5 Oct 2016 23:35:12 +0000 (23:35 +0000)]
Merge changes from topic 'rename_wifi_hal'

* changes:
  wifi(interface): Rename interface to iface
  wifi(interface): Add/Correct docstring params
  wifi: Add implementation of driver/firmware memory dumps
  wifi: Add Implementation of IWifiChip.requestChipDebugInfo
  wifi: Use hal_tool & if_tool
  wifi: Restructure wifi legacy HAL implementation
  wifi: Change namespace
  wifi: Move legacy HAL implementation

7 years agoAdd test for missing package name for FQName lookup.
Yifan Hong [Wed, 5 Oct 2016 22:19:46 +0000 (15:19 -0700)]
Add test for missing package name for FQName lookup.

Bug: 31705664

Test: `cd system/tools/hidl && mma`
Change-Id: If3568f1d1e77ad97ccfce5eac5938048f3852560

7 years agoAdd test for vec<vec<T>> as a return value.
Yifan Hong [Wed, 5 Oct 2016 20:43:53 +0000 (13:43 -0700)]
Add test for vec<vec<T>> as a return value.

Bug: 31955917

Test: hidl_test
Change-Id: I9ae7f9b04126261210cb4621266676727877d92f

7 years agowifi(interface): Rename interface to iface
Roshan Pius [Wed, 5 Oct 2016 00:01:01 +0000 (17:01 -0700)]
wifi(interface): Rename interface to iface

The HIDL objects are called "interface", so rename the wifi interface to
iface to distinguish between them better.

This is especially needed in the follow up CL.

Bug: 31943042
Test: mmm -j32 hardware/interfaces/wifi/1.0/
Change-Id: I3bc34930f75159d26321c0e071af9084d0585508

7 years agowifi(interface): Add/Correct docstring params
Roshan Pius [Tue, 4 Oct 2016 22:08:05 +0000 (15:08 -0700)]
wifi(interface): Add/Correct docstring params

Changes in the CL:
1. Add missing docstring params in the HIDL interface.
2. Reword some method docs. Occurences of "will" is replaced
by "must" (based on comments received on supplicant HIDL interface:
go/aog/275115).
3. Add onFailure callbacks for all the methods and added docstrings for
them.

Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0
Change-Id: Ib7152625851023d6244f742bb77a8fdc0829e00d

7 years agoMerge "Revert "Revert "nfc: update default implementation to match style."""
Treehugger Robot [Wed, 5 Oct 2016 17:22:28 +0000 (17:22 +0000)]
Merge "Revert "Revert "nfc: update default implementation to match style."""

7 years agowifi: Add implementation of driver/firmware memory dumps
Roshan Pius [Mon, 3 Oct 2016 21:09:57 +0000 (14:09 -0700)]
wifi: Add implementation of driver/firmware memory dumps

Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I25d42cfd4c2b1ea7e63bdc036f37f81aed93c565

7 years agowifi: Add Implementation of IWifiChip.requestChipDebugInfo
Roshan Pius [Mon, 3 Oct 2016 19:49:58 +0000 (12:49 -0700)]
wifi: Add Implementation of IWifiChip.requestChipDebugInfo

Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: Id0c02e37dac66de6f830785881cb67f113c0fb19

7 years agoRevert "Revert "nfc: update default implementation to match style.""
Steven Moreland [Tue, 4 Oct 2016 17:10:18 +0000 (17:10 +0000)]
Revert "Revert "nfc: update default implementation to match style.""

This reverts commit 3768be324bc81b04f4a3a9dfbbe3324dc13cc5f0.

Change-Id: Ifecd3ac227af14b49eba83c1126d51996ce3b8f5

7 years agoRevert "Revert "nfc: reflect style guide.""
Steven Moreland [Tue, 4 Oct 2016 17:10:17 +0000 (17:10 +0000)]
Revert "Revert "nfc: reflect style guide.""

This reverts commit 69bb15e06eea6a0e437d388273c4810682393162.

Change-Id: Icd6ac819606c83e1518c4b6252f6416f55e618fd

7 years agowifi: Use hal_tool & if_tool
Roshan Pius [Mon, 3 Oct 2016 20:33:23 +0000 (13:33 -0700)]
wifi: Use hal_tool & if_tool

Changes in the CL:
1. Currently |WifiNative.cpp|, uses |hal_tool| to initialize the
function table and |if_tool| to set the interface up when |startHAL|
method is invoked. Use the same sequence in the HIDL'ized HAL.
2. Remove the assertion if the function table initialization fails. This
will result in a failure indication on starting the HAL now.

Bug: 31352200
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I268845ed62158b6a2ff36659f0bb15c4100a7222

7 years agowifi: Restructure wifi legacy HAL implementation
Roshan Pius [Thu, 29 Sep 2016 16:03:59 +0000 (09:03 -0700)]
wifi: Restructure wifi legacy HAL implementation

Restructured the existing code to create a new class called
|WifiLegacyHal|. This class will be used as a wrapper to invoke
all the legacy HAL functions and handle the "C" style callbacks.

Bug: 31936700
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I63e8543f49886f8446101320a97d1e96e30d1035

7 years agowifi: Change namespace
Roshan Pius [Tue, 4 Oct 2016 20:03:58 +0000 (13:03 -0700)]
wifi: Change namespace

Move the implementation to "android::hardware::wifi:V1_0::implementation"
namespace.
This is following the style guidelines in NFC HIDL
implementation(go/aog/279421).

While there,
Run checkstyle to correct formatting issues.

Bug:31936700
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I5600a60a0041b3318ed9289823ec335a8ed8a83d

7 years agowifi: Move legacy HAL implementation
Roshan Pius [Mon, 3 Oct 2016 21:53:58 +0000 (14:53 -0700)]
wifi: Move legacy HAL implementation

Changes in the CL:
1. Move the legacy HAL implementation from
"frameworks/opt/net/wifi/wifi_hal_legacy" to
"hardware/interfaces/wifi/1.0/default".
2. Renamed the .rc file and the module name in makefile to
conform to the HIDL style guide.

Files renamed from:
wifi_hal_service.cpp/h -> wifi.cpp/h
wifi_chip_service.cpp/h -> wifi_chip.cpp/h
main.cpp -> service

Bug: 31821133
Test: mmma -j32 hardware/interfaces/wifi/1.0/default
Change-Id: I5e65e2fdb5596346bde6963588031dcea42d633a

7 years agoAdd test for referring to nested types.
Yifan Hong [Mon, 3 Oct 2016 17:30:55 +0000 (10:30 -0700)]
Add test for referring to nested types.

Bug: 31821285

Test: `make hidl_test && adb sync && adb shell hidl_test`
Change-Id: Iae030baa5bbe6e890512b494a0b657163c6a99a6

7 years agoMerge "Revert "nfc: reflect style guide.""
Martijn Coenen [Tue, 4 Oct 2016 16:44:14 +0000 (16:44 +0000)]
Merge "Revert "nfc: reflect style guide.""

7 years agoRevert "nfc: update default implementation to match style."
Steven Moreland [Tue, 4 Oct 2016 16:25:35 +0000 (16:25 +0000)]
Revert "nfc: update default implementation to match style."

This reverts commit 6b6381cb58aba593951f0718f9beecef0b49e284.

Change-Id: I2891a4ea774ad0047d9f99074fe773808dae0f7c

7 years agoRevert "nfc: reflect style guide."
Steven Moreland [Tue, 4 Oct 2016 16:25:40 +0000 (16:25 +0000)]
Revert "nfc: reflect style guide."

This reverts commit e0c416a6f247992089663095f29a9e50cef2ef99.

Change-Id: I3fec772343d88a29225aef61bb549fef8ac9b797

7 years agoMerge changes from topic 'nfc-style'
Steven Moreland [Tue, 4 Oct 2016 14:33:40 +0000 (14:33 +0000)]
Merge changes from topic 'nfc-style'

* changes:
  nfc: update default implementation to match style.
  nfc: reflect style guide.

7 years agoAuto hardware/interfaces/Android.bp
Steven Moreland [Mon, 3 Oct 2016 20:53:07 +0000 (13:53 -0700)]
Auto hardware/interfaces/Android.bp

Bug: 31909444
Test: make various interfaces, mma -j
Change-Id: Ie2de39572e482415b5279110586a0cb7e5220c8e

7 years agonfc: update default implementation to match style.
Steven Moreland [Mon, 26 Sep 2016 19:41:23 +0000 (12:41 -0700)]
nfc: update default implementation to match style.

Test: make android.hardware.nfc@1.0-impl
Change-Id: Ib76d663fcf28816bd2ba57f5fbd5ae0033b620f5

7 years agonfc: reflect style guide.
Steven Moreland [Mon, 26 Sep 2016 19:40:29 +0000 (12:40 -0700)]
nfc: reflect style guide.

Test: make android.hardware.nfc@1.0
Change-Id: I60c1589492752753c362dc9766ebc7776b5e6e6e

7 years agoConvert to Android.bp
Dan Willemsen [Wed, 28 Sep 2016 23:12:24 +0000 (16:12 -0700)]
Convert to Android.bp

See build/soong/README.md for more information.

Bug: 31742855
Test: mma -j
Change-Id: Icb93f3b1b2caeb5e9c00f88ca35841b927ad075d

7 years agoTests for Reference Support.
Yifan Hong [Tue, 23 Aug 2016 23:50:55 +0000 (16:50 -0700)]
Tests for Reference Support.

Bug: 31300815 pointer support
Bug: 31349114 nested types
Bug: 31757611 Parcel ref# cap

Test: `make hidl_test && adb sync && adb shell hidl_test`
      Only works with a kernel patch.

Change-Id: I48351b1bf861a4d2d77f823f7242524156cde1e7

7 years agoMerge "Use MQDescriptorSync instead of MQdescriptor in interface"
Treehugger Robot [Thu, 29 Sep 2016 16:48:53 +0000 (16:48 +0000)]
Merge "Use MQDescriptorSync instead of MQdescriptor in interface"

7 years agoMerge "Default binderized implementation of android.hardware.nfc@1.0"
Martijn Coenen [Thu, 29 Sep 2016 07:41:33 +0000 (07:41 +0000)]
Merge "Default binderized implementation of android.hardware.nfc@1.0"

7 years agoMerge "wifi: Move supplicant HIDL interfaces to subfolder"
Treehugger Robot [Wed, 28 Sep 2016 22:38:53 +0000 (22:38 +0000)]
Merge "wifi: Move supplicant HIDL interfaces to subfolder"

7 years agoDefault binderized implementation of android.hardware.nfc@1.0
Iliyan Malchev [Mon, 26 Sep 2016 16:57:20 +0000 (09:57 -0700)]
Default binderized implementation of android.hardware.nfc@1.0

Provide a default binderized HAL implementation.  The implementation
uses android.hardware.nfc@1.0-impl.so, which in turn loads the
conventional HAL (nfc_nci.default.so).  If a device includes package
android.hardware.nfc@1.0-service, the device will automatically use the
binderized implementation of the NFC HAL.  If a device includes package
android.hardware.nfc@1.0-impl instead, it will use the default
implementation in hardware/interfaces/nfc/1.0/default.

b/31688271
Test: pass

Change-Id: I31cd93d28705d287975b485092cffd7661599d7c
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoVerify that method arguments and results can share the same name.
Andreas Huber [Tue, 27 Sep 2016 21:54:20 +0000 (14:54 -0700)]
Verify that method arguments and results can share the same name.

Bug: 30778622
Test: hidl_test, hidl_test_java
Change-Id: Idb35a03337010c1fb63c2896f216392398e03e0c

7 years agowifi: Move supplicant HIDL interfaces to subfolder
Roshan Pius [Wed, 28 Sep 2016 20:35:42 +0000 (13:35 -0700)]
wifi: Move supplicant HIDL interfaces to subfolder

Move all the supplicant HIDL interfaces to a separate subfolder.

Bug: 31800508
Test: Compiles
Change-Id: I09bfb17b626312e8be819238ab2edbb83ca04322

7 years agowifi(hidl): Add supplicant HIDL interface
Roshan Pius [Thu, 15 Sep 2016 20:02:25 +0000 (13:02 -0700)]
wifi(hidl): Add supplicant HIDL interface

Convert the existing AIDL binder interface of wpa_supplicant to HIDL.

Summary of changes:
1. Every HIDL method returns an instance of |SupplicantStatus|
along with any others params (for getters). This is needed to return the
equivalent of |Binder::Status| to indicate errors in the args passed,
stale proxy, etc.
2. All constants are changed to enums. There were some constants which
should have been enums in the first place, but wasn't because AIDL did
not support enums. But, there are others which should be standalone
constants, but are enums now because constants are not supported in HIDL.
3. Conform to HIDL style guide.

Bug: 31365276
Test: `mmm -j32 hardware/interfaces/wifi/1.0/`
Change-Id: Iba753e279fd260788d8628ea2f5c2281b5844095

7 years agoMerge "Verify that vectors of arrays within structures are properly marshaled"
Treehugger Robot [Wed, 28 Sep 2016 17:16:52 +0000 (17:16 +0000)]
Merge "Verify that vectors of arrays within structures are properly marshaled"

7 years agoUse MQDescriptorSync instead of MQdescriptor in interface
Hridya Valsaraju [Thu, 22 Sep 2016 00:47:06 +0000 (17:47 -0700)]
Use MQDescriptorSync instead of MQdescriptor in interface

Add comments and cleanup code as per HIDL style guidelines.

Bug: 31550963
Test: Built and ran existing FMQ unit tests and benchmarks.

Change-Id: I0a09ba1fcb520b46e5e6299b473c962c93d815eb

7 years agoVerify that vectors of arrays within structures are properly marshaled
Andreas Huber [Fri, 23 Sep 2016 19:16:36 +0000 (12:16 -0700)]
Verify that vectors of arrays within structures are properly marshaled

in the Java backend.

Change-Id: I70baa4ac55d8b0e06b31b2e50662be14b8528ff3
Bug: 31682327
Test: hidl_test_java

7 years agoUpdated indentation to 4 spaces for Android.mk.
Yifan Hong [Mon, 26 Sep 2016 22:38:09 +0000 (15:38 -0700)]
Updated indentation to 4 spaces for Android.mk.

Test: `cd system/tools/hidl && mma`
Change-Id: I088893c3c8b080239f0f32e3434faf3da3fefc7a

7 years agoUpdated tests for constant expressions.
Yifan Hong [Tue, 20 Sep 2016 20:41:30 +0000 (13:41 -0700)]
Updated tests for constant expressions.

Test: `make android.hardware.tests.expression@1.0` compiles
      and generates enum class Color with autofilled values.
Test: `make hidl_test_java` succeeded.
Test: `make hidl_test` succeeded.

Bug: 31628863 Add test for autofilling enum values.
Bug: 31592132 allow constant expressions be array sizes.

Change-Id: I79f35365f1d37843922725ad5a405848f3e8ec08

7 years agoUpdated makefiles that also add static java library targets.
Andreas Huber [Fri, 23 Sep 2016 16:15:24 +0000 (09:15 -0700)]
Updated makefiles that also add static java library targets.

Bug: 31684178
Test: hidl_test and hidl_test_java
Change-Id: Ib53d1be2b1535837ca97cb61796e335141fc7611

7 years agoandroid.hardware.nfc@1.0: provide a default implementation
Iliyan Malchev [Thu, 22 Sep 2016 22:53:53 +0000 (15:53 -0700)]
android.hardware.nfc@1.0: provide a default implementation

b/31524912
Test: pass

Change-Id: Id9d34f62f4a2b92bdc3beb3e62c89c82743c0ca0
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoupdate auto-generated makefiles
Iliyan Malchev [Thu, 22 Sep 2016 23:23:07 +0000 (16:23 -0700)]
update auto-generated makefiles

b/31524912
Test: pass

Change-Id: Iafea8f87e93181041f42820df39ec43b3c785410
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years ago[Java] Add a test to verify that typedefs in types.hal does not mistakenly
Andreas Huber [Thu, 22 Sep 2016 17:54:27 +0000 (10:54 -0700)]
[Java] Add a test to verify that typedefs in types.hal does not mistakenly

generate a makefile rule.

Bug: 31678014
Test: regenerate makefiles using hidl-gen.
Change-Id: I72ceaedd33288269b74e2aa233043c741994cd1a

7 years agoMerge "Verify that structs with multiple array fields now successfully compile for...
Treehugger Robot [Thu, 22 Sep 2016 19:53:14 +0000 (19:53 +0000)]
Merge "Verify that structs with multiple array fields now successfully compile for Java"

7 years agoVerify that structs with multiple array fields now successfully compile for Java
Andreas Huber [Thu, 22 Sep 2016 16:47:48 +0000 (09:47 -0700)]
Verify that structs with multiple array fields now successfully compile for Java

Previously "_hidl_array_offset_*" was redeclared multiple times in the same
scope.

Bug: 31675085
Test: run hidl_test, hidl_test_java
Change-Id: I370956ae3008c05bda66dc5cdc44d33c9883376f

7 years agoInitial pieces of WiFi HAL interface definition
Mitchell Wills [Thu, 18 Aug 2016 18:44:58 +0000 (11:44 -0700)]
Initial pieces of WiFi HAL interface definition

Test: make -j48 android.hardware.wifi@1.0 android.hardware.wifi@1.0-java
Bug: 31350762
Change-Id: I1b598be397e08165fc9fd607888e064b139e8007

7 years agoMerge "Additional test cases to verify multi-dimensional arrays work properly."
Treehugger Robot [Tue, 20 Sep 2016 20:28:11 +0000 (20:28 +0000)]
Merge "Additional test cases to verify multi-dimensional arrays work properly."

7 years agoAdditional test cases to verify multi-dimensional arrays work properly.
Andreas Huber [Mon, 19 Sep 2016 20:59:52 +0000 (13:59 -0700)]
Additional test cases to verify multi-dimensional arrays work properly.

Bug: 31438033
Change-Id: I1fc58cbbe6f161f7f71a43fa43d743843ba22f76
Test: run updated "hidl_test" and "hidl_test_java"

7 years agoAdd dependency on libcutils.
Zhuoyao Zhang [Tue, 13 Sep 2016 00:54:52 +0000 (17:54 -0700)]
Add dependency on libcutils.

* Used for get system properies.

Test: pass test hidl_test.
Change-Id: I3b6d2deb442cd627a6f30312f0c204177d410ecb

7 years agoMerge "Remove @hal_type from .hal files."
Yifan Hong [Mon, 19 Sep 2016 19:25:19 +0000 (19:25 +0000)]
Merge "Remove @hal_type from .hal files."

7 years agoRemove @hal_type from .hal files.
Yifan Hong [Mon, 19 Sep 2016 17:19:24 +0000 (10:19 -0700)]
Remove @hal_type from .hal files.

Test: ran make android.hardware.nfc@1.0 successfully
      compiles.

Bug: 31527823

Change-Id: Ib2c2f40ef6a8939a8344ade6138a7b0f32f14ba9

7 years agofix update-makefiles.sh to not need Android.mk
Iliyan Malchev [Sun, 18 Sep 2016 01:42:46 +0000 (18:42 -0700)]
fix update-makefiles.sh to not need Android.mk

When auto-generating Android.mk for HIDL packages, update-makefiles.sh
now just looks for all directories hosting .hal files, converts them to
HIDL package names, and invokes hidl-gen on these package names to
generate the appropriate Android.mk files.

Change-Id: I8a824672f33be58508ae7c07de463f4f589a9a73
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoAdd tests to verify that multi-dimensional arrays in Java work (inside structs)
Andreas Huber [Wed, 14 Sep 2016 22:27:21 +0000 (15:27 -0700)]
Add tests to verify that multi-dimensional arrays in Java work (inside structs)

Bug: 31438033
Change-Id: Ic27868fb0f603ca4acb2a42f144493d6ec26044f

7 years agoAdds tests to verify proper C++ code generation for multi-dimensional arrays
Andreas Huber [Mon, 12 Sep 2016 22:01:02 +0000 (15:01 -0700)]
Adds tests to verify proper C++ code generation for multi-dimensional arrays

and vectors of arrays.

Bug: 31438033
Change-Id: Ia7c2198de31bdb4705687726abe3d0371625e56a

7 years agoMerge "interfaces: regenerate makefiles"
Treehugger Robot [Tue, 13 Sep 2016 04:52:48 +0000 (04:52 +0000)]
Merge "interfaces: regenerate makefiles"

7 years agoMerge "Java test interface extended to verify vec<STRUCT-TYPE> and STRUCT-TYPE[]"
Treehugger Robot [Mon, 12 Sep 2016 17:50:11 +0000 (17:50 +0000)]
Merge "Java test interface extended to verify vec<STRUCT-TYPE> and STRUCT-TYPE[]"

7 years agointerfaces: regenerate makefiles
Iliyan Malchev [Fri, 9 Sep 2016 23:24:19 +0000 (16:24 -0700)]
interfaces: regenerate makefiles

b/31372383

Change-Id: I4fd9d3f174a22f29bc3beb9aeb7c30fc6bd4acd8
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoJava test interface extended to verify vec<STRUCT-TYPE> and STRUCT-TYPE[]
Andreas Huber [Fri, 9 Sep 2016 21:56:15 +0000 (14:56 -0700)]
Java test interface extended to verify vec<STRUCT-TYPE> and STRUCT-TYPE[]

argument/result passing.

Bug: 31380705
Change-Id: I17fd03a10f9740f68a6fb318a5c2ef9847f4c050

7 years agoWireMQDescriptor => MQDescriptor
Andreas Huber [Tue, 30 Aug 2016 19:23:59 +0000 (12:23 -0700)]
WireMQDescriptor => MQDescriptor

b/31091383 Adding WireMQDescriptor as a hidl type

Change-Id: Iff23c833e8ab232ad37fd9bfbfe4d49fbc06b369

7 years agoandroid.hardware.tests.msgq@1.0: modify ITestMsgQ
Iliyan Malchev [Thu, 8 Sep 2016 22:12:36 +0000 (15:12 -0700)]
android.hardware.tests.msgq@1.0: modify ITestMsgQ

Modify the configure() method so that the implementation does not have
to rely on status_t to return service errors.

b/31367910
b/31348667

Change-Id: I0bc88c396ce4e55ed38b534b7e3ae2c0a4faad62
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agointerfaces: update makefiles
Iliyan Malchev [Wed, 7 Sep 2016 19:45:02 +0000 (12:45 -0700)]
interfaces: update makefiles

b/31015466
b/31045569

Change-Id: I07d54fd956fedc4b94622ace1c8f2be3f2f93b2b
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoMerge "Updated makefiles (includes java-library rules for applicable packages)."
TreeHugger Robot [Thu, 1 Sep 2016 00:08:22 +0000 (00:08 +0000)]
Merge "Updated makefiles (includes java-library rules for applicable packages)."

7 years agoUpdated makefiles (includes java-library rules for applicable packages).
Andreas Huber [Wed, 31 Aug 2016 16:10:55 +0000 (09:10 -0700)]
Updated makefiles (includes java-library rules for applicable packages).

Change-Id: I178faf37dddb5149c1bdc217fa1395b2566194d7
Bug: 31221188

7 years agoRevert "package android.hardware.tests.* as part of VTS (auto-generated)"
Keun Soo Yim [Wed, 31 Aug 2016 07:38:54 +0000 (07:38 +0000)]
Revert "package android.hardware.tests.* as part of VTS (auto-generated)"

This reverts commit afba0364c6fbf7e2fb5018b35b904c968f90ebd0.

Change-Id: I9d143d97ef7857502d88fef92b9ae336ee824bcd

7 years agoadd test for constant expression evaluation output
Yifan Hong [Thu, 18 Aug 2016 22:09:28 +0000 (15:09 -0700)]
add test for constant expression evaluation output

Simply run:

    # hidl_gen converts .hal to .h correctly
    make hidl_gen_test
    # converted .h can compile
    make android.hardware.tests.expression@1.0

to run the tests.

b/30951879: int8_t is same as char, and when emitting output the
    character corresponding to that number is emitted instead of
    the number itself.

Change-Id: Icacba6b6262cc0026a94f64527b80e2c0e35e72e

7 years agoMerge "Apache2 module license."
Iliyan Malchev [Wed, 31 Aug 2016 05:24:19 +0000 (05:24 +0000)]
Merge "Apache2 module license."

7 years agoApache2 module license.
Martijn Coenen [Tue, 30 Aug 2016 18:27:56 +0000 (11:27 -0700)]
Apache2 module license.

Bug: 31110244
Change-Id: I7ce63f940199e8cd7d193bdde39fc6cd448db802

7 years agoInterface 'IBaz' and friends used by "hidl_test_java".
Andreas Huber [Mon, 29 Aug 2016 17:23:17 +0000 (10:23 -0700)]
Interface 'IBaz' and friends used by "hidl_test_java".

Change-Id: If49d996e34ba5aa48488e92e71234208001bfddb

7 years agobuild 32- and 64-bit libs (auto-generated)
Keun Soo Yim [Sat, 27 Aug 2016 01:55:21 +0000 (18:55 -0700)]
build 32- and 64-bit libs (auto-generated)

Change-Id: Iccb63cafc5db17abd423d589416d50ff21c89efa

7 years agoandroid.hardware.tests.foo@1.0::IFooCallback: add instrumentation
Iliyan Malchev [Sat, 20 Aug 2016 23:44:50 +0000 (16:44 -0700)]
android.hardware.tests.foo@1.0::IFooCallback: add instrumentation

Add two instrumentation methods to IFooCallback, to help with timing
measurements in gTest.

The first one, reportResults(), blocks the caller for a given length of
time while waiting for all the other methods to execute, then reports
whether these methods were executed within this length of time, for how
long their caller was blocked, and also how long the execution of the
bodies of each of them took.  Note that the execution time for a
method's body is independent of whether it is a oneway or a blocking
method.  For example, heyItsTheMeaningOfLife() is a oneway method, so it
returns immediately to the caller (so the caller-blocked time should be
very small).  However, if its body takes several seconds to run, then
this is the information that will be returned for
heyItsTheMeaningOfLife() as well.

The second instrumentation method, youBlockedMeFor(), is used by the
caller of IFooCallback to report how long the caller was blocked for.
This information is saved and passed by reportResults() as described
above.

b/30855757 Convert hidl test to gTest

Change-Id: I35ac708e424bcb143fce959609fcc747f1ec37fb
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoAdd test aidl file for benchmark binder performance.
Zhuoyao Zhang [Wed, 24 Aug 2016 22:05:11 +0000 (15:05 -0700)]
Add test aidl file for benchmark binder performance.

Bug: 31068579
Change-Id: Idf7d5da902eb17f166ac07dc966c009bc1d9c7ae

7 years agopackage android.hardware.tests.* as part of VTS (auto-generated)
Keun Soo Yim [Fri, 19 Aug 2016 01:20:09 +0000 (18:20 -0700)]
package android.hardware.tests.* as part of VTS (auto-generated)

this is to run the benchmarks continuously in the lab

Change-Id: Ia45c440a77ccc16db2cb1066ecde3b6521991ec9

7 years agoregenerate Android.mk files
Keun Soo Yim [Tue, 23 Aug 2016 00:25:48 +0000 (17:25 -0700)]
regenerate Android.mk files

Change-Id: I6a8b48943df469c9f345c05fb00c671f6f8dd393

7 years agoUpdated makefiles linking against libhidl.
Martijn Coenen [Fri, 19 Aug 2016 12:06:56 +0000 (14:06 +0200)]
Updated makefiles linking against libhidl.

Bug: 30839546
Change-Id: I8c68d0b8db0816f9bfe58fc3898114fb9e151ddc