Add tracing for batching status

Check whether batching notification has already been made.

Test procedure:
1. Add "system tracing" to quick settings from developer options (enable
   the quick settings tile for system tracing)
2. Start system tracing via UI of quick settings
3. Open all apps and do some swipes
4. Click "stop tracing"
5. Pull the logs to the device `adb pull /data/local/traces/ ~/trace`
6. Go to https://ui.perfetto.dev/
7. Click "open trace file" and navigate to the local file
8. In the trace, open the process of interest. In this case, it's the
   launcher process
9. Scroll down to "InputConsumer processing"
10. The "cookie" field of each entry is the sequence number of this
    event (but not the event id).

Bug: 311142655
Test: perfetto test procedure described above
Change-Id: Idc123a65798ae64fa304553a18140149e5cd0ea8
3 files changed