Make HardwareState strings nicer to read

Previously, HardwareState string representations were something of a
number salad, something like this:

    { 1.234567, 0, 1, 1, { { 267.000000, 187.000000, 0.000000, 0.000000,
    26.000000, 86.000000, 992.000000, 706.000000, 220,
    GESTURES_FINGER_POSSIBLE_PALM | GESTURES_FINGER_WARP_X_NON_MOVE } } }

You just had to remember what number meant what. Now they look like
this:

    { 1.234567, buttons 0x0, 1 f, 1 t, { { 220: (992.00, 706.00), touch
    267.00x187.00, width 0.00x0.00, pressure 26.00, orient 86.00,
    POSSIBLE_PALM | WARP_X_NON_MOVE } } }

Changes:

* Related numbers (e.g. X and Y, touch major and minor) are grouped
  together
* Fields are labelled
* Numbers take up less space by reducing precision (6 decimal places
  seems a little excessive)
* Flags no longer have the GESTURES_FINGER_ prefix, which is common to
  all of them anyway

BUG=b:245989146
TEST=On Android, run:
    $ adb shell 'stop && setprop log.tag.TouchpadInputMapperGestures
                 DEBUG && start'
    then check the InputReader log tag for the "New hardware state"
    messages. Also run unit tests:
    $ atest libchrome-gestures_test

Change-Id: I89c72b29cfcbbb11c54c25b9bed59fdf9420b321
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/5829402
Code-Coverage: Zoss <[email protected]>
Tested-by: Harry Cutts <[email protected]>
Reviewed-by: William Mahon <[email protected]>
Commit-Queue: Harry Cutts <[email protected]>
2 files changed