diff options
author | Steve Howard <showard@google.com> | 2010-07-28 17:51:02 -0700 |
---|---|---|
committer | Steve Howard <showard@google.com> | 2010-07-28 18:39:35 -0700 |
commit | 9da9df3d6e84a3c4b04dd22d277e0e6d8f7f1ccb (patch) | |
tree | 49499d63a55ae22d33d7a63b62aced57fef39b1a /tests/src/com | |
parent | 0d4f9f105c3a31475a36e9a1edfa868c66ff455f (diff) | |
download | android_packages_providers_DownloadProvider-9da9df3d6e84a3c4b04dd22d277e0e6d8f7f1ccb.tar.gz android_packages_providers_DownloadProvider-9da9df3d6e84a3c4b04dd22d277e0e6d8f7f1ccb.tar.bz2 android_packages_providers_DownloadProvider-9da9df3d6e84a3c4b04dd22d277e0e6d8f7f1ccb.zip |
Make all public API downloads visible.
This change makes all downloads through the public API visible by
default. It removes the API that had allowed applications to control
notifications while the download runs. This has been replaced with a
hidden API, since such behavior is needed by SystemUpdater and Market
(for self-updates). Additionally, the behavior is now protected by a
new permission.
I'm making this permission signatureOrSystem, and changing the
non-purgeable permission to the same (it should've been that, I just
didn't know). I'm also adding string descriptions to appease the
translation folks.
Change-Id: I192e8b19ff9b0e425257cef0db081c3d75996ea5
Diffstat (limited to 'tests/src/com')
-rw-r--r-- | tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java index b601846a..840b20ac 100644 --- a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java +++ b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java @@ -358,8 +358,7 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest { } public void testNotificationClickedBroadcast() throws Exception { - Download download = enqueueRequest(getRequest().setShowNotification( - DownloadManager.Request.NOTIFICATION_WHEN_RUNNING)); + Download download = enqueueRequest(getRequest()); DownloadReceiver receiver = new DownloadReceiver(); receiver.mSystemFacade = mSystemFacade; @@ -431,15 +430,13 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest { public void testNotifications() throws Exception { enqueueEmptyResponse(HTTP_OK); - Download download = enqueueRequest(getRequest()); // no visibility requested + Download download = enqueueRequest(getRequest().setShowRunningNotification(false)); download.runUntilStatus(DownloadManager.STATUS_SUCCESSFUL); assertEquals(0, mSystemFacade.mActiveNotifications.size()); assertEquals(0, mSystemFacade.mCanceledNotifications.size()); enqueueEmptyResponse(HTTP_OK); - download = enqueueRequest( - getRequest() - .setShowNotification(DownloadManager.Request.NOTIFICATION_WHEN_RUNNING)); + download = enqueueRequest(getRequest()); // notifications by default download.runUntilStatus(DownloadManager.STATUS_SUCCESSFUL); assertEquals(1, mSystemFacade.mActiveNotifications.size()); |