Detect+trigger bugreport for abnormal connections

This is an effort investigate why certain connections take really long
to finish.

Users running user-debug builds will be shown an notification, which
they may tap on to file a bugreport.

Added DeviceConfig flags (that is disabled by default) which may be
configured on the server side to enable this feature for a select group
of users. Also added a flag to fine tune the threshold at which
bugreports get triggered.

Bug: 132648941
Test: Unit tests
Test: Tested turning on the bugreport trigger with "adb shell
device_config put wifi abnormal_connection_bugreport_enabled true"
Test: Ran "adb shell device_config put wifi abnormal_connection_duration_ms 30" and verified that bugreport is taken

Change-Id: Ic4ea7c1850677781838a645b989f81db858546f4
5 files changed
tree: 5fb203cac41ea35eb6fd9154428938ac027c753b
  1. service/
  2. PREUPLOAD.cfg