Commit graph

2 commits

Author SHA1 Message Date
Yifan Hong
2a06ae8299 Fix AnimationParser remove_prefix test
The test fails because TEST_STRING, a char[], is silently
converted to a std::string, passed to remove_prefix, then
the string is destroyed, but a pointer to the string is
returned.

Fix it by changing the signature of remove_prefix to use
std::string_view to be more robust in handling raw char*.

Test: run it
Change-Id: I553c066907f09cf330c8b7a4659db5a1fee82cac
2020-08-05 20:00:09 -07:00
Damien Bargiacchi
565ba02b89 Allow customization of charger animation
Allow the charging animation to be customized with a configuration file
and custom assets.

 - Add a parser to parse a custom configuration file.
 - Add support for showing a clock and the battery percentage.
 - Expand feature that conditionally shows animation frames using min_level
   and level_only to min_level and max_level

BUG: 29547343
Change-Id: Ia33f4bb37dc7d4c7fa6507a63481e93bf0bf9738
2016-09-12 21:07:27 -07:00