Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c908e136 authored by Yeabkal Wubshit's avatar Yeabkal Wubshit
Browse files

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
parent eb0f2e31
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment