Vibrate as system instead of as an app
When DND is on, apps aren't allowed to play vibrations on
blocked usages. However, we still need to play vibrations for
notifications from those apps that meet DND criteria.
Previously we accomplished this by passing in the bypass
DND flag, however this flag is also being used to bypass camera
audio restrictions, which we don't want.
So now we'll play vibrations as "android", which is always
exception from DND restrictions and isn't exempt from the
camera restriction. In order to maintain debugging from bugreports,
the package name and uid that we're vibrating for are now included
in the vibration reason.
Test: BuzzBeepBlinkTest
Test: trigger notification vibration
Test: trigger notification vibration, DND on, notif allowed
Test: fail to trigger notification vibration, DND on, notif intercepted
Test: fail to trigger notification vibration, camera is recording video
Test: check bugreport output
Bug: 171946151
Change-Id: I8958852403827341480351ee0c60a4fd30f5280d
2 files changed