Use data plans for better job scheduling.
Now that we have data plan information from the carrier, we can start using it to influence when we schedule jobs. As a first pass algorithm: -- If the network is congested, and a job is less than 50% through its runnable window, then we'll defer it for awhile. -- If the network has a surplus of data, we'll consider using some of it to improve the user experience by running prefetching jobs. Provider APIs for carrier apps to override their connections to be temporarily marked as either "unmetered" or "congested", along with automatic timeouts if desired. Flag for developers to indicate which jobs will have a material positive impact on end users. (We don't want to promote jobs that are simply doing logs upload; for example.) Glue code to quickly return targetSdk of a specific package. More tweaking to the exact algorithms will come in future CLs. Test: bit FrameworksServicesTests:com.android.server.job. Bug: 64133169 Change-Id: Iabb9f90a7a65958ad648b091edec378fc3bf785a
Loading
Please register or sign in to comment