mozilla-mobile/android-components

Truncate camera and microphone permissions telemetry.

Mugurell opened this issue · 1 comments

Issue seen in mozilla-mobile/fenix#26391 with potential approaches for fixing discussed in https://mozilla-hub.atlassian.net/browse/DO-857.

It seems like there are cases (example) where we'd try to record too much data (above 60 bytes):

Facing front:Camera 1, Facing front, Orientation 270, Facing back:Camera 0, Facing back, Orientation
Facing front:1, Facing back:0, Facing back:2, Facing back:3, Facing back:4, Default audio input device

Seems like the data should be cleaned up before reporting.

  • instead of all the camera details probably just "Camera" is enough
  • instead of “Default audio input device" just "Microphone" is enough.

┆Issue is synchronized with this Jira Task

The issue seems to be happening because of the mappings from GeckoPermissonRequest which overwrite the ids we set in PermissionRequest.
In some cases the default ids will remain, in some they are overwritten.
Seems like the best course of action is to use the Permission class names.