Covers more corner cases on restricted network modes:

- Tests what happens on foreground applications when a restriction (like
  Data Saver or Battery Saver modes) is turned on (prior tests would
  turn the restriction on *before* switching the app to foreground).
- Tests multiple restrictions simultaneously enabled.

Also improved existing code:

- Fixed background state check.
- Reused some common checks in helper methods.
- Retries checks for process state.

BUG: 28473659

Change-Id: Ifcf9cc6d895ccde0ab5177f9f5d8c347ce53b811
10 files changed
tree: 7a4ea074a05c4f3c01395e65abc638b5e1c04423
  1. tests/