Reduce expected network usage of RemoteProvisioner
This change aims to minimize the likelihood that provisioning ever
occurs over a metered connection. In the worst case possible, the
provisioner will consume around 20KB / month in data. By making use of
the ConnectivityManager, the service now attempts to delay any attempts
at provisioning over a metered connection until there is simply no time
left to delay before certificates will expire.
This is also partially assisted by offering a much more accurate
estimate of the download/upload byte requirements for the case
where the service actually gets certificates.
Test: atest RemoteProvisionerUnitTests
7 files changed