Add exemption cases for app background restrictions
For the high background current drains and long-running FGS, exempt
idle allowlisted apps, companion device apps, device owner apps, etc.
Additionally, we're also exempting/setting a higher threshold for
the apps with long-running media sessions, media/location FGS,
bg location permissions.
Meanwhile, the durations that apps spent on TOP state will be excluded
from all these accounting.
BYPASS_INCLUSIVE_LANGUAGE_REASON=Legacy API name
Bug: 200326767
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: Ie22cd011679dcb70612cf740fa3e6dec9f1299d0
15 files changed