stats: Refactor proto maps to event specific enums
Each mapping of framework printing or BIPS value to a proto value is
specific to a particular stats event. However we currently have the
mappings named such that they could be used with any event. This will
get confusing when we add new events which should have their
respective mappings. Secondly we may run into calling the
StatsLogWrapper wrapper with the wrong proto value since these are
primarily represented as ints.
Refactor the existing mappings to be enums and the StatsLogWrapper to
take specific enum types so that the compiler enforces we record
events with the correct enums.
Bug: 390478410
Test: atest BuiltInPrintServiceRobolectricTest
Flag: com.android.bips.flags.printing_telemetry
Change-Id: I2e6cc922bc4aff275d2c61a346aa847423edc168
6 files changed