Don't auto move into restricted bucket if there's a recent interaction

Adding a grace period here, which is, if the app background battery
usage goes beyond the threshold, but the user interacts with it
recently, don't move it to the restricted bucket level automatically.
If it continues to drain the battery in the background after certain
amount of time, it'll be restricted still.

Bug: 203105544
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I8c86b399d3336e1fd71fcdfa25a93d1a6cd5c75f
2 files changed