Added an api to query ForcedAppStandby state

Adding an api which apps can query to check if the user has put them
into forced app standby.
An app may want to do this to manage expectations for any jobs or alarms
it schedules. It can also be used as an indication that the user noticed
unreasonable battery consumption attributed to the app.

Test: atest android.app.cts.ActivityManagerTest#testIsBackgroundRestricted

Bug: 73664209
Change-Id: I870f6c852c500769d3bf99d5a9ba3bf4eb1b65f5
4 files changed