diff options
| author | 2023-08-10 09:01:37 -0700 | |
|---|---|---|
| committer | 2023-08-23 20:10:42 -0700 | |
| commit | c908e136318b67538c4c1c9a1f7e2cca67b5d9e0 (patch) | |
| tree | b48a7bfffefd19f5a5329d384933ac30f7cf401c /api/api_test.go | |
| parent | eb0f2e31ef46b77c9b89977f45c0325dd0fa1bbf (diff) | |
Support vibration-select parsing
The VibrationXmlParser supported parsing a full XML document for a
single vibration, or an open parser for a single vibration. Given that a
lot of the use cases for VibrationXmlParser involve using fall-back
vibrations in case the first vibration is not supported by the target
Vibrator, we are introducing APIs to support a "vibration-select" XML
tag in a vibration serialization.
"vibration-select" allows serializing multiple vibrations in a single
XML document, or as part of a bigger XML. We are adding APIs to allow
parsing this tag as an entire document, or as part of a larger XML.
API changes:
- The existing TestApi to parse public-API-based vibration serializations
is kept with only a renaming: parse() -> parseVibrationEffect().
- New API added, parseDocument() -> this parses an entire XML with a
root tag of "vibration" or "vibration-select". It's a TestApi.
- New API added, parseElement() -> this parses a single element from an
open parser, for the "vibration" or "vibration-select" tag.
Bug: 295335663
Test: atest VibrationEffectXmlSerializationTest
Test: atest ParsedVibrationTest
Test: atest HapticFeedbackCustomizationTest
Test: atest ShutdownThreadTest
Change-Id: I28f67440b09e751ea8b34cad3eaa800909eb4bc7
Diffstat (limited to 'api/api_test.go')
0 files changed, 0 insertions, 0 deletions