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
Loading
Please register or sign in to comment