Teach DownloadManager about network policy.
authorJeff Sharkey <jsharkey@android.com>
Wed, 15 Jun 2011 18:18:46 +0000 (11:18 -0700)
committerJeff Sharkey <jsharkey@android.com>
Fri, 17 Jun 2011 23:34:50 +0000 (16:34 -0700)
commit961024389b3782936a40a7d090d670290bb66c3c
tree7188814c93d784118a5efea428eb203418f88575
parent1fec3e68161dce11cc6995c8c3de50d6ca37f2e7
Teach DownloadManager about network policy.

Now network access is determined by using getActiveNetworkInfoForUid()
which uses BLOCKED to indicate that network should be rejected for
the requesting UID.  While download in progress, watch for any policy
changes that should trigger pause.

Also check NetworkInfo.isConnected() for correctness.

Change-Id: I1efa79823f15ecc3fa088a6719da1b770c64b255
AndroidManifest.xml
res/values/strings.xml
src/com/android/providers/downloads/DownloadInfo.java
src/com/android/providers/downloads/DownloadThread.java
src/com/android/providers/downloads/Helpers.java
src/com/android/providers/downloads/RealSystemFacade.java
src/com/android/providers/downloads/SystemFacade.java
tests/src/com/android/providers/downloads/FakeSystemFacade.java
tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
ui/src/com/android/providers/downloads/ui/DownloadAdapter.java