Add device interactivity criterion

Adds additional check to the RebootReadinessManager, which
ensures that the device must be in a non-interactive state
before being ready to reboot. The default value for this
is 30 minutes. The information about device interactivity
is received by registering a BroadcastReceiver that handles
ACTION_SCREEN_ON/OFF broadcasts. The RebootReadinessManager keeps
track of the timing of these broadcasts.

Also adds two new DeviceConfig properties: one for setting the
device interactivity threshold time, and the other for disabling
the device interactivity check.

Test: atest CtsRebootReadinessTestCases
Test: Manual. Add extra logs and ensure that broadcasts are sent
      correctly when using different DeviceConfig property values
Bug: 161353402
Change-Id: I183fe571c500189c10cae8c528ad0eea7cf2f03b
2 files changed
tree: 76db6a55f93ecd192f052ae2cbb5a085f6fccbfc
  1. apex/
  2. framework/
  3. service/
  4. tests/
  5. PREUPLOAD.cfg