Track the battery usage in different dimensions in AppBatteryTracker

So it could be configured to catch abusive battery usage by different
combination. It also supports configurable power components.

By default, when background only battery usage reaches a certain
threshold, it'll be put into restricted standby bucket; while after
that, when the sum of its background and foreground service battery
usage reaches to another threshold, the system will prompt the user.

Bug: 200326767
Bug: 203105544
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I2887201c06cbe7c936eb52c9aa5beb5e326634b7
5 files changed