Add background app activity criterion

Extends the reboot readiness criteria by taking the
background activity performed by applications into
account. This is done by querying ActivityManager
for running foreground services, and blocking the
reboot if any exist.

Also added DeviceConfig property to turn this check
off for testing.

Test: Manual: check that device does not become
      reboot-ready when using apps in the background
Test: atest CtsRebootReadinessTests
Bug: 161353402
Change-Id: Ia8a576763d3fe54c05739abc7491a3e8f3734497
2 files changed
tree: 932f4550df4d9ee482b7346239ea33aacc5cbd5e
  1. apex/
  2. framework/
  3. service/
  4. tests/
  5. PREUPLOAD.cfg