Commit graph

200 commits

Author SHA1 Message Date
Jeongik Cha
a73d6bc97e Freeze vintf aidl interfaces
AIDL interfaces which are vintf-stable have to be frozen in release.
But these interfaces have been never frozen, so freeze them.

- android.hardware.power
- android.hardware.identity
- android.hardware.keymaster
- android.hardware.vibrator
- android.hardware.light
- android.hardware.tests.extension.vibrator

Bug: 153500421
Bug: 153500550
Bug: 153511407
Bug: 153500549
Bug: 153501107
Bug: 153501202
Test: m
Change-Id: I643c25fc695f9d1e874dcceb327d465c49e9cab6
Merged-In: I643c25fc695f9d1e874dcceb327d465c49e9cab6
2020-04-09 08:27:34 +00:00
Dan Shi
aad51fa000 Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 16:37:40 -07:00
Jiyong Park
8f023acb78 Update the current API dump
All aidl_interface modules should by default considered as stable, in
case it is used across system and vendor partitions, or across modules.
Like other API surfaces, we need to have a dump for the current
(yet-to-be-released) version and update it when there is an API change.
This is done via .

Then the owner of the interface can freeze the current version as a
numbered version via .

This change shal be rejected only when the owner is certain that the
interface is not used across the updatable boundaries.

Bug: 152655547
Test: m
Change-Id: I93fba2721695a14e0eb4a2173066ce132228b895
2020-03-30 15:00:27 +09:00
Harpreet \"Eli\" Sangha
7aec50208c vibrator: aidl: Apply Compose API Feedback
- Make Thud and Spin optional due to complexity.
- Make "scale" inclusive of zero, which represents minimum "feelable"
  intensity.
- Update VTS tests appropriately.
- Fix typo in VTS test names.

Bug: 151084263
Test: VTS on Flame, Walleye, and Cuttlefish
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
Change-Id: Ib0d046be83ee79ab38e0b9c3fb87a41f23879f8b
2020-03-12 05:49:35 +09:00
Harpreet \"Eli\" Sangha
8922e56088 vibrator: aidl: Remove Output Checks on Error
VTS tests should treat output values as uninitialized when the returns
status is not OK.

Bug: 151174217
Test: Ran on Flame and Walleye
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
Change-Id: I8a3fa77d35265b6dd371caace18ffb810e83a72f
2020-03-11 06:53:39 +09:00
Harpreet \"Eli\" Sangha
70cf2268a4 vibrator: Document the source of always-on source IDs.
Bug: 148617686
Test: N/A: Documentation change.
Change-Id: I471d394e0c0258fbdaaea27a50ed21c4c10123a7
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2020-02-29 00:07:36 +00:00
Harpreet \"Eli\" Sangha
13ef28c6a4 vibrator: Deduplicate Supported Primitives Check
Use the getSupportedPrimitives() as the single source of truth for
supported primitive checks.

Bug: 147844633
Test: atest VtsHalVibratorTargetTest
Change-Id: I8789b0ee9806c5887fca9a0b800fe2e903c76a58
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2020-01-29 02:06:16 +00:00
Harpreet \"Eli\" Sangha
fe5d3986e9 vibrator: Add "Light Tick" Primitive
Bug: 147844633
Test: adb shell idlcli vibrator compose 0 7 1.0
Change-Id: I208e56011f790c095afe734fd4326de10078525a
Merged-In: I208e56011f790c095afe734fd4326de10078525a
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2020-01-27 07:20:10 +00:00
Harpreet \"Eli\" Sangha
523e29603b vibrator: Compose API Related Improvements
- Allow querying duration of each primitive.
- Allow querying of supported primitives.
- Enforce all-of-nothing requirement for supported primitives via VTS.
- Enforce callback support requirement via VTS.

Bug: 139762802
Bug: 147852209
Test: atest VtsHalVibratorTargetTest
Change-Id: I9009e38d446ed9ea38b3a9d6eb8dd55e6be2792f
Merged-In: I9009e38d446ed9ea38b3a9d6eb8dd55e6be2792f
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2020-01-27 07:19:29 +00:00
Steven Moreland
1c26978dd1 vibrator vts: use CompositePrimitives enum_range
Bug: 143992652
Test: TH (added TEST_MAPPING now)

Change-Id: If36ba0d2fa41db1b05bb1d65e6ee062b22c1b564
2020-01-10 19:27:14 +00:00
Steven Moreland
98ba8fb7f0 vibrator: use package as name
In order to provide a more descriptive name, and to be consistent
with HIDL, the stable AIDL package names are switching from
vintf-vibrator format to the package format
(android.hardware.vibrator).

Bug: N/A
Test: all build time
Change-Id: I52959482898f329ad1b3a3a5b345a0c6dc72197d
Merged-In: I52959482898f329ad1b3a3a5b345a0c6dc72197d
2020-01-06 14:08:01 -08:00
Jooyung Han
9eca80bd16 Merge "Revert submission" 2019-12-18 01:03:48 +00:00
Jooyung Han
716648deb4 Revert submission
Reason for revert: Trying to reland the changes with fix for build errors.

Change-Id: I64a9f6091a53ffb15433b8c5ff22b6a1b9cd01e8
2019-12-17 14:17:48 +00:00
Jooyung Han
91770e0381 Merge "Revert submission" 2019-12-17 08:47:50 +00:00
Jooyung Han
61d357ebce Revert submission
Reason for revert: b/146402634

Change-Id: Ibaf2854bc5cbe63f557dcf63be9e285ef6678bd3
2019-12-17 08:36:07 +00:00
Jooyung Han
74b4460f28 Merge "vibrator: Use enum_range<Enum>" 2019-12-17 06:10:59 +00:00
Jooyung Han
9bce98b45a vibrator: Use enum_range<Enum>
to avoid accidental omission of Effect/EffectStrength in test

Bug: 143992652
Test: VtsHalVibratorTargetTest
Change-Id: I0894a7bb426d134b052d43ef9a9f55ace8146a44
2019-12-13 15:39:19 +09:00
Harpreet \"Eli\" Sangha
63624099e3 vibrator: Support Always-On Effects
Bug: 138909021
Test: Verify always-on haptics are configured on boot and settings
      change.
Change-Id: I11ce5f2b974267c6e84b1843a750847492a7de15
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2019-12-12 11:09:06 +09:00
Treehugger Robot
e995668691 Merge "vibrator: aidl: Add Descriptions for Primitives" 2019-12-11 22:19:46 +00:00
Harpreet \"Eli\" Sangha
63c06d62d7 vibrator: aidl: Add Descriptions for Primitives
Test: Build
Change-Id: I05d43cb75d6c7cf9ece95a3c7d1ee9ce9980cebb
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2019-12-10 15:44:19 +09:00
Harpreet \"Eli\" Sangha
e1723a49df vibrator: vts: Utilize New toString() Support
Use the new toString() support for AIDL enums for improved logging.

Test: atest VtsHalVibratorTargetTest
Change-Id: Ie9d98f6b9f367dec9e6f0b9b0ed18dab0a32c742
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2019-12-10 14:52:59 +09:00
Steven Moreland
cd99e3f2eb Merge "Mark VINTF AIDL w/ Java as platform_apis." 2019-12-02 16:46:17 +00:00
Steven Moreland
18576b0b27 Mark VINTF AIDL w/ Java as platform_apis.
Since this requires platform-only APIs (markVintfStability).

Bug: 139325468
Test: use vibrator callback from Java
Change-Id: Ic675c82973e04f80db67da1b9c69964ef33b35f7
2019-11-27 18:11:43 -08:00
Steven Moreland
f57ad9ba5c vibrator impl: log failed callback
As help/sanity check when debugging.

Bug: N/A
Test: N/A
Change-Id: Ia45be148f1e6aebdb880d7da68d5b8bec8485127
2019-11-27 16:04:52 -08:00
Treehugger Robot
677cdb4b0e Merge "vibrator: Add Composition APIs" 2019-11-27 06:43:42 +00:00
Steven Moreland
2fb810f495 Merge "vndk vintf vibrator" 2019-11-25 17:31:26 +00:00
Harpreet \"Eli\" Sangha
f4de5b065f vibrator: Add Composition APIs
Bug: 139762802
Test: Manual Invocation via 'idlcli'
Change-Id: Ibc938d08f186039681d523784b90f4172a52af51
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
2019-11-21 16:12:13 +09:00
Steven Moreland
716868f7fd Merge "Remove vibrator@1.4" 2019-11-20 16:46:33 +00:00
Steven Moreland
d5cff19c5e vndk vintf vibrator
Bug: 141828236
Test: TH
Change-Id: I6fd418008f4695cae8f4ffd8547b6ea28fa195fa
2019-11-19 18:20:14 -08:00
Steven Moreland
028bb37546 Merge "example AIDL HAL extension" 2019-11-19 18:15:05 +00:00
Steven Moreland
4184cfbdc7 Remove vibrator@1.4
Since this HAL was converted to AIDL.

Bug: 141828236
Test: N/A
Change-Id: I99cf08ea524b451278dfeeb3ca31f3a76e1a416e
2019-11-18 19:22:00 -08:00
Steven Moreland
c8ddf2fea6 vibrator: enable vintf java
So constants can be used from Java.

Bug: 136027762
Test: compile
Change-Id: I3381703b80ec168688a67cf9c07d598ce881be55
2019-11-18 19:22:00 -08:00
Steven Moreland
8ba8c03a49 example AIDL HAL extension
This CL shows an example of how to use and retrieve a HAL extension.

Bug: 136027762
Test: run HAL and:
- use "dumpsys --pid android.hardware.vibrator.IVibrator/default" to
make sure that the HAL I'm running is the binary being added.
- VtsHalVibratorTargetTest
- test-vintf-vibrator-ext-client

Change-Id: I8614007a727e8e05ba4667c2cd1623ce936a1609
2019-11-18 18:02:12 -08:00
Steven Moreland
5aca9f6f40 Merge changes from topic "rm-vibrator-1-4"
* changes:
  vibrator@1.4: remove from current.txt
  Remove vibrator@1.4 from VNDK.
  Restore vibrator@1.3 example service.
2019-11-12 21:39:26 +00:00
Steven Moreland
ea49733bb4 Merge "vibrator: clarify behavior for repeated commands" 2019-11-11 06:58:07 +00:00
Steven Moreland
d13b7577e1 Merge "vibrator: fix VTS for effects" 2019-11-11 05:28:38 +00:00
Steven Moreland
1784b9a3cf Remove vibrator@1.4 from VNDK.
Because this HAL was converted to AIDL.

Can't be completely removed until frameworks/base is refactored not to
use it, but doing this so no more dependencies are accidentally taken
downstream.

Bug: 141828236
Test: N/A
Change-Id: Ic920f59a1a0ad933e5c80c468700ef4514b4a9c9
2019-11-10 20:21:23 -08:00
Steven Moreland
cb5d107734 Restore vibrator@1.3 example service.
To ensure we still have a HIDL vibrator service around for testing.
This is from running command:
    git checkout 714220ef75707d826371c6c020c45663d6965f0c^ -- \
        vibrator/1.3/example

Bug: 141828236
Test: N/A
Change-Id: Iffd5c8d4b95466f1b7b277c9f69d9a6001f12db8
2019-11-10 20:20:48 -08:00
Steven Moreland
c02bc05977 vibrator: clarify behavior for repeated commands
Bug: 141828236
Test: VtsHalVibratorTargetTest
Change-Id: I4077ca34cb037198df16149f944beba3c5633175
2019-11-11 04:04:11 +00:00
Treehugger Robot
a7e5d5fd5b Merge "Fix build with new googletest" 2019-11-09 01:06:56 +00:00
Haibo Huang
83b4c1e3e1 Fix build with new googletest
The new googletest requires prefix to be non-empty.

Change-Id: I3ebd13861c4803b53dbeb4ac5f247984814bef45
2019-11-08 12:17:34 -08:00
Steven Moreland
f33538889f vibrator: fix VTS for effects
A few issues were causing effects tests to fail:
- invalid effects were not actually invalid
- test for invalid effects improved to consider invalid effects and
  strengths separately
- test sleeps for appropriate amount of time after requesting effect to
  be performed
- logging used to diagnose issues left in place for convenience

Bug: 141828236
Test: atest VtsHalVibratorTargetTest (on device which suffers from these
  issues that cf did not hit)

Change-Id: Id220d36c27d85f068dce6b8961f705eef8dc6a4f
2019-11-08 10:24:34 -08:00
Steven Moreland
c0b92d5388 vibrator: add CAP_EXTERNAL_AMPLITUDE_CONTROL
For HIDL, vibrator may change the value of supportsAmplitudeControl
based on context. Since the interface is being redone in AIDL, we're
avoiding this changing value and providing capabilities for amplitudes
we expect to be available in different states.

Bug: 141828236
Test: VtsHalVibratorTargetTest
Change-Id: Idf0b28ffe5b1175469d32e790b10b4232482dc2b
2019-11-07 03:00:25 +00:00
Steven Moreland
2932b22571 vibrator: add getSupportedEffects
It's a real gap in this interface, since we need to call perform to
understand if an effect is supported.

Bug: 141828236
Test: atest VtsHalVibratorTargetTest
Change-Id: Iffbd9c0acf5e4c368767c7718025a4aef8f44ce3
2019-11-06 16:34:37 +00:00
Steven Moreland
d91e449020 s/staidl/aidl/
staidl is a term I made up w/o precedence. aidl is clearer and more
consistent w/ practices elsewhere.

Bug: 141828236
Test: N/A
Change-Id: I3f044ddf470b63956f2aa496ae9fe9e5893f479a
2019-11-05 13:29:10 -08:00
Steven Moreland
d44007e625 Vibrator: Stable AIDL interface.
This is from running:
hidl2aidl android.hardware.vibrator@1.4

and then making several small modifications.

Bug: 141828236
Test: dumpsys on cf
Change-Id: I612e903c1e3f63f0470f8e5c827345c5b67d5645
2019-10-30 12:26:22 -07:00
Treehugger Robot
48141f00ab Merge "[vts-core] add VtsHalVibratorV1_*TargetTest to vts-core" 2019-10-23 02:02:04 +00:00
nelsonli
10976957e7 [vts-core] add VtsHalVibratorV1_*TargetTest to vts-core
Convert VtsHalVibratorV1_*TargetTest to be parameterized test
and add it to vts-core

Bug: 142397658
Test: $atest VtsHalVibratorV1_0TargetTest
      $atest VtsHalVibratorV1_1TargetTest
      $atest VtsHalVibratorV1_2TargetTest
      $atest VtsHalVibratorV1_3TargetTest
Change-Id: Ied47225bf40cce99648200b79cd7dd65e5222394
2019-10-23 02:00:22 +00:00
Treehugger Robot
aae0b8d093 Merge "vibrator: Add 1.4 Tests to 'vts-core'" 2019-10-21 23:10:15 +00:00
Treehugger Robot
3ff034b3e1 Merge changes from topic "vibrator-hal-1.4-vts"
* changes:
  vibrator: Limit Length of Async Callback Tests
  vibrator: Async Callback API VTS Tests
2019-10-18 21:19:20 +00:00