Add new job scheduler constraints for "battery not low".
Clean up the implementation of boolean constraints so that they are in a single flags value that gets propagated all of the way from JobInfo.Builder in to the JobStatus. Much simpler and easier to add new constraints! Also introduce some shell commands to make it easier to write tests against the job scheduler (and other things tied to power). One of the big things here is that there is a new sequence number that propagates with battery updates, which we can look for in the job scheduler to determine when a change the test has made to battery state has actually gotten applied, to allow it to safely and minimally wait until executing the condition being tested. Test: New BatteryConstraintTest suite added. Change-Id: I11076d90b80ec25ee604c29b6a6dc2337fd867ce
Loading
Please register or sign in to comment