Add and enforce ALLOW_METERED column.
authorJeff Sharkey <jsharkey@android.com>
Tue, 17 Apr 2012 19:26:06 +0000 (12:26 -0700)
committerJeff Sharkey <jsharkey@android.com>
Tue, 17 Apr 2012 19:28:25 +0000 (12:28 -0700)
commita7ae77fdae69bcc6d6609d4639fed5d96e55eeaa
tree5021a8ffe6ceadb1e39fba775caccf5d18c1d22c
parent9b606340a0b5b88436505651dbe3cdaf60117604
Add and enforce ALLOW_METERED column.

Include flag with each download to indicate if its allowed to proceed
over metered networks.  Downloads are left in WAITING_FOR_NETWORK
state, similar to how ALLOWED_NETWORK_TYPES is handled.

Also keep blocked downloads in WAITING_FOR_NETWORK state instead
of marking them as failed.

Bug: 3001465, 5734560
Change-Id: I80bb9aa9bd25ddf6f7a2472db344b6ba6878bd74
src/com/android/providers/downloads/DownloadInfo.java
src/com/android/providers/downloads/DownloadProvider.java
src/com/android/providers/downloads/DownloadThread.java
src/com/android/providers/downloads/RealSystemFacade.java
src/com/android/providers/downloads/SystemFacade.java
tests/src/com/android/providers/downloads/FakeSystemFacade.java