8 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Fri, 10 Sep 2010 20:09:15 +0000]
Import revised translations.  DO NOT MERGE

Change-Id: I806756f787cd261ca5cfdb8aeb40b1e6681c7f42

8 years agoFirst pass at new system UI for download manager.
Steve Howard [Thu, 2 Sep 2010 01:21:32 +0000]
First pass at new system UI for download manager.

This is the initial checkin for a new system UI for the download
manager.  This UI shows all entries present in the Download Manager
database, sorted by either date or size.  It allows the user to
monitor status, open files, and delete/cancel entries.

The code was initially copied from the "Downloads" page of
packages/apps/Browser, since the design is based on that UI.  Much of
the code is changed, although DateSortedExpandableListAdapter is
nearly identical.

The code is not quite finished, but this is very much a working first
pass.

Change-Id: I7fe102e9f2998e57d893cc3c0f5f6da1cf2db549

8 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Sat, 28 Aug 2010 00:18:20 +0000]
Import revised translations.  DO NOT MERGE

Change-Id: Ic5de3f973bab21a4d09d375cca1e6775eb1612d7

8 years agoAdd UI message when queued for wifi due to size.
Steve Howard [Sat, 21 Aug 2010 00:45:03 +0000]
Add UI message when queued for wifi due to size.

As it stands, when a download is paused because it's too big to
proceed over mobile, and must proceed over wifi, it looks like any
other paused download, with no indication of why it's paused.  That
may be passable for most other reasons for pausing a download, but it
seems too confusing for this case.  So this change adds a simple
string message that replaces the progress bar when a download is
paused for this reason (the icon also changes to a warning).

The implementation isn't beautiful and could use some improvement, but
I think it's acceptable and necessary.  The exact UI design and
wording are certainly open to change.

Change-Id: I753d57f463e2614b5694bdc178d2a51066da8ca3

8 years agoAvoid endless restarts when waiting for connectivity.
Steve Howard [Wed, 18 Aug 2010 23:11:34 +0000]
Avoid endless restarts when waiting for connectivity.

Adding an extra check for usable network connectivity to avoid an endless
restart-pause loop while waiting for usable connectivity.

Change-Id: If4da9ad222993b5479ada658508f445d10a42013

8 years agoMerge "Fix and test handling of null/empty download fields." into gingerbread
Steve Howard [Wed, 18 Aug 2010 16:05:12 +0000]
Merge "Fix and test handling of null/empty download fields." into gingerbread

8 years agoFix and test handling of null/empty download fields.
Steve Howard [Tue, 3 Aug 2010 19:39:35 +0000]
Fix and test handling of null/empty download fields.

Minor change to make title/description default to blank stings, and
add test case covering all null/empty download fields.

Change-Id: Id44344bc2e464f46589faed49c8f383a45a8d329

8 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Tue, 17 Aug 2010 23:45:53 +0000]
Import revised translations.  DO NOT MERGE

Change-Id: Ie97669dcd7a43f4f408beeee7ab7e65d9114731d

8 years agoClean up error codes returned by download manager.
Steve Howard [Sat, 31 Jul 2010 01:55:38 +0000]
Clean up error codes returned by download manager.

This set of changes cleans up the error codes returned by the download
manager in various failure cases, aiming for improved consistency.
Error codes are part of the public API so it's important to get this
right now.

The main changes here are:
* Refactoring the flow of error status information throughout
  DownloadThread to make it more explicit, by having StopRequest
  accept a status code in its constructor and eliminating
  State.mFinaStatus.
* Eliminating the use of valid HTTP 4xx statuses when those statuses
  weren't actually returned by the server.  Now, if the returned error
  code is a valid HTTP status code, that means it was returned by the
  server.  These cases have been replaced with more sensible
  artificial error codes, including a new ERROR_CANNOT_RESUME when an
  interrupted download can't be resumed.
* Improvements to some of the error handling code paths -- ensuring we
  don't clear the cache for external downloads, ensuring we don't fail
  with CANNOT_RESUME when the download hasn't actually started yet,
  removing the restriction on acceptable mime types for public API
  downloads.

Change-Id: I0d825845fe0fe7ed5df74bad26e8d34ac0d1cc4e

8 years agoExtend PublicApiAccessTest to exercise DownloadManager.
Steve Howard [Mon, 2 Aug 2010 18:52:16 +0000]
Extend PublicApiAccessTest to exercise DownloadManager.

This change adds a new test case to PublicApiAccessTest to enqueue a
request through DownloadManager, ensuring that the values constructed
by DownloadManager fit within the allowed bounds.  It also fixes a bug
with allowing http header values exposed by the new test.

Change-Id: I94fec57d7a41298ac42ddaab338516e6a60c4e75

8 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Tue, 10 Aug 2010 18:52:39 +0000]
Import revised translations.  DO NOT MERGE

Change-Id: Ib2ce8f6ee48925ab4371c39266ef4696cb812f91

8 years agoMerge "Make all public API downloads visible." into gingerbread
Steve Howard [Fri, 6 Aug 2010 18:22:53 +0000]
Merge "Make all public API downloads visible." into gingerbread

8 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Wed, 4 Aug 2010 17:46:11 +0000]
Import revised translations.  DO NOT MERGE

Change-Id: Ic6f84636b3bbb635ecc790711ba5828dd094f878

8 years agoMake all public API downloads visible.
Steve Howard [Thu, 29 Jul 2010 00:51:02 +0000]
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

8 years agoGet wifi limit from secure settings.
Steve Howard [Wed, 28 Jul 2010 02:47:50 +0000]
Get wifi limit from secure settings.

Change-Id: I750654c28cb3d9f9aa67bd56e4d8d770dbfde4b4

8 years agoAdd test for many interruptions to a single download.
Steve Howard [Tue, 27 Jul 2010 23:28:40 +0000]
Add test for many interruptions to a single download.

Adding a new test case for downloads that undergo many interruptions
(as may happen with a very large download that takes many hours).
Includes some refactoring in the test suite.

Early on, this test exposed a race condition in which the download
manager got some I/O exception while reading from the MockWebServer.
I went in and improved/refactored much of the error logging code in
DownloadThread to try and track this down.  Unfortunately, once I
finished, the race condition no longer seems to be reproducible, even
with hundreds of runs of the test case.  So I've given up on it for
now.  In any event, error logging is better and much duplicate code
has been eliminated.

8 years agoImproved support for 302/307 redirects.
Steve Howard [Tue, 27 Jul 2010 21:34:12 +0000]
Improved support for 302/307 redirects.

Change the download manager's handling of 302/307 temporary redirects
so that after an interruption of any kind, the delayed retry/resume
will return to the original URI.  This complies better with the HTTP
spec.  This change also makes the download manager handle other
redirects immediately rather than using the delay that's otherwise
applied to download errors.

I made one more method extraction in DownloadThread to simplify this
change, pulling the top-level logic for a single request into
executeDownload().  It was then just a matter of introducing a new
RetryDownload exeception, similar to StopRequest, and making the
redirection code use it.

Change-Id: Ic719c5725a9fd2e5eebe4dc03453ee71d9f27cd4

8 years agoFix bug with closing output stream for external downloads.
Steve Howard [Wed, 28 Jul 2010 00:02:14 +0000]
Fix bug with closing output stream for external downloads.

I added a unit test to cover this, and it caught another issue with
disallowing external destinations outside of the default downloads
directory (which are now allowed with the new API).

Change-Id: I4df6442bebb06458ad28c85f6bc8cbcbf3ce67a1

8 years agoSerialize threading for download manager testing.
Steve Howard [Mon, 26 Jul 2010 22:25:06 +0000]
Serialize threading for download manager testing.

The download manager uses threading in a simple way -- it launches two
threads, UpdateThread and DownloadThread, and both are "fire and
forget".  This is fortunate for testing, since it means we can
eliminate multithreading and simply run each thread in order, and
everything still works.

This change does just that, abstracting Thread.start() behind
SystemFacade and making FakeSystemFacade put new threads into a queue
and then run through them serially.  This simplifies much of the test
code and makes it all much more predictable.

I've simplified the test code as much as possible here and moved a few
more tests over to PublicApiFunctionalTest, leaving only a minimum in
DownloadManagerFunctionalTest, which will eventually be deleted
altogether.  I've also improved testing in some areas -- for example,
we can now test that running notifications get cancelled after the
download completes in a robust way.

There is one test case that checks for race conditions and requires
multithreading.  I've moved this into a new ThreadingTest class, which
uses a custom FakeSystemFacade that allows multithreading.  I've
extracted AbstractPublicApiTest for the newly shared code.

Change-Id: Ic1d5c76bfa9913fe053174c3d8b516790ca8b25f

8 years agoStub out and test system notifications.
Steve Howard [Sat, 24 Jul 2010 03:32:21 +0000]
Stub out and test system notifications.

This change abstracts NotificationManager interactions behind
SystemFacade and takes advantage of that to test notifications, to a
limited degree.

It also fixes a silly typo in AbstractDownloadManagerFunctionalTest,
and it introduces an extra sleep between tests to avoid some
flakiness.  I'll look for a better solution to that problem after this
change goes in.

Change-Id: I3a0307f828955cd45b0e3581ad499da28cc0556e

8 years agoTest + utilize change notification in DownloadProvider
Steve Howard [Sat, 24 Jul 2010 01:30:16 +0000]
Test + utilize change notification in DownloadProvider

Now that I've learned how ContentResolver.notifyChange() works, add a
test to explicitly check it's being called in DownloadProvider, and
take advantage of it in waitForDownloadToStop to get rid of the ugly
old polling mechanism.

Change-Id: Iba71bdf1b0d31454cc4e186ceb4fdd9fdb5faad5

8 years agoSupport for non-purgeable downloads through the public API.
Steve Howard [Tue, 20 Jul 2010 23:32:31 +0000]
Support for non-purgeable downloads through the public API.

This change adds a permission,
android.permission.DOWNLOAD_CACHE_NON_PURGEABLE.  When an app has this
permission, any downloads it requests through the public API to the
download cache will automatically become non-purgeable, i.e. they'll
never be automatically deleted by the download manager to free up
space.  This is intended for use only by the system updater.

Change-Id: I35cdd44f7e5d46bc70443d1a9743f61a51395ddb

8 years agoMake DownloadProvider accessible for public API usage.
Steve Howard [Thu, 22 Jul 2010 18:33:50 +0000]
Make DownloadProvider accessible for public API usage.

This change removes the requirement that apps have the
ACCESS_DOWNLOAD_MANAGER permission in order to access
DownloadProvider.  This enables the public API to work.  Instead,
DownloadProvider enforces the new permissions model for the public
API:
* insert() requires INTERNET permission
* insert() checks that input fits within the restricted input allowed
  for the public API
* insert() also strictly checks the file URI provided with
  DESTINATION_FILE_URI (and still requires WRITE_EXTERNAL_STORAGE
  permission if that is supplied)

Note that if an app has the ACCESS_DOWNLOAD_MANAGER permission, legacy
behavior is retained.

I've added a test to cover this new access, and updated the existing
permissions tests.

I also fixed a bug in WHERE clause construction in update() and
delete(), and refactored the code to eliminate duplication.

Change-Id: I53a08df137b35c2788c36350276c9dff24858af1

9 years agoMake COLUMN_URI readable and tighten UID restrictions.
Steve Howard [Thu, 22 Jul 2010 02:41:15 +0000]
Make COLUMN_URI readable and tighten UID restrictions.

I need to make COLUMN_URI readable by apps, since the public API
exposes that field.  In order to avoid any possible security issues, I
got rid of the feature that potentially allowed apps to view downloads
from other UIDs.  No one was using that feature and the public API
exposes no such feature (yet).

While at it, I cleaned up some related code in update() and delete().

Change-Id: I5384115d2a865255d009fbe37449488fd2269389

9 years agoPublic API support for broadcasts and connectivity control.
Steve Howard [Wed, 21 Jul 2010 18:41:30 +0000]
Public API support for broadcasts and connectivity control.

* Three new DB fields, one indicating whether a download was initiated by the public API or not, two to hold connectivity control info.  DB migration to add these fields and code in DownloadProvider.insert() to handle them.
* Change broadcast intent code to match public API spec, for public API downloads only.  (Legacy code can go away once existing clients are converted over to the new API.)
* Introduce SystemFacade methods for sending broadcasts and checking package ownership; this facilitates new tests of broadcast code.
* Change DownloadInfo.canUseNetwork() to obey new connectivity controls available in public API, but again, retain legacy behavior for downloads initiated directly through DownloadProvider
* New test cases to cover the new behavior

Also made a couple changes to reduce some test flakiness I was observing:
* in tearDown(), wait for any running UpdateThread to complete
* in PublicApiFunctionalTest.setUp(), if the test directory already exists, remove it rather than aborting

DB changes for broadcast + roaming support

Change-Id: I60f39fc133f678f3510880ea6eb9f639358914b4

9 years agoMajor refactoring of DownloadThread.run().
Steve Howard [Fri, 16 Jul 2010 21:28:35 +0000]
Major refactoring of DownloadThread.run().

Motivation: I need to fix the handling of 302s, so that after a
disconnect, subsequent retries will use the original URI, not the
redirected one.  Rather than store extra information in the DB, I'd
like to just keep the redirected URI in memory and make the redirected
request within the same DownloadThread.  This involves working with
the large-scale structure of DownloadThread.run().  Since run() was a
~700 line method, I didn't feel comfortable making such changes.

So this change refactors run() into a ~80 line method which calls into
a collection of ~20 other short methods.  The state previously kept in
local variables has been pulled into a couple of state-only inner
classes.  The error-handling control flow, formerly handled by "break
http_request_loop" statements, is now handled by throwing a
"StopRequest" exception.  The remaining structure of run() has been
simplified -- the outermost for loop, for example, could never
actually repeat and has been removed for now.  Some other bits of code
have been cleaned up a bit, but the functionality has not been
modified.

There are many good next steps to this refactoring.  Besides various
other cleanup bits, a major improvement would be to consolidate the
State/InnerState classes, move some functionality to this new class
(there are many functions of the form "void foo(State)" which would be
good candidates), and promote it to a top-level class.  But I want to
take things one step at a time, and I think what I've got here is a
major improvement and should be enough to allow me to safely implement
the changes to redirection handling.

In the process of doing this refactoring I added many test cases to
PublicApiFunctionalTest to exercise some of the pieces of code I was
moving around.  I also moved some test cases from
DownloadManagerFunctionalTest.  Over time I'd like to move everything
over to use the PublicApiFunctionalTest approach, and then I may break
that into some smaller suites.

Other minor changes:
* use longs instead of ints to track file sizes, as these may be
  getting quite large in the future
* provide a default DB value of -1 for COLUMN_TOTAL_BYTES, as this
  simplifies some logic in DownloadThread
* small extensions to MockResponse to faciliate new test cases

Change-Id: If7862349296ad79ff6cdc97e554ad14c01ce1f49

9 years agoFix bug with deciding when to restart a download.
Steve Howard [Tue, 20 Jul 2010 19:04:02 +0000]
Fix bug with deciding when to restart a download.

In previous refactoring I had combined the code for starting a
download (from DownloadService.insertDownload()) and restarting a
download (from DownloadService.updateDownload()).  I'd missed the fact
that the former checks DownloadInfo.isReadyToStart() while the latter
checks DownloadInfo.isReadyToRestart().  This cause a race condition
where multiple startService() calls during a download would cause the
service to try to spawn a second thread for the same running download.

I've fixed the bug and added a test case to exercise this.

Change-Id: Ia968331a030137daac7c8b5792a01e3e19065b38

9 years agoSupport for max download size that may go over mobile
Steve Howard [Fri, 16 Jul 2010 02:59:40 +0000]
Support for max download size that may go over mobile

This change introduces support for a maximum download size that may go
over a mobile connection.  Downloads above this limit will wait for a
wifi connection.

To accomplish this, I moved a lot of the logic for checking
connectivity info into DownloadInfo itself.  I then moved the code to
call these checks from DownloadService, where it would call the checks
before spawning a DownloadThread, into DownloadThread itself.  This
makes it simpler to check connectivity after we get Content-Length
info.  It also eliminates the risk of a race condition where
connectivity changes between the check and the actual request
execution.

I realize this change reduces efficiency, because we now call into
ConnectivityManager/TelephonyManager twice per DownloadThread, rather
than once per DownloadService "tick".  I feel that it's OK since its a
small amount of computation running relatively infrequently.  If we
feel that it's a serious concern, and that the efficiency issues
outweigh the race problem, I can go easily back to the old approach.

I've left out the code to actually fetch the limit. I think this will
come from system settings, but I want to double-check, so I'll put it
in a separate change.

Other changes:
* simplify SystemFacade's interface to get connectivity info - rather
  than returning all connected types, just return the active type,
  since that should be all we care about
* adding @LargeTest to PublicApiFunctionalTest

Change-Id: Id1faa2c45bf2dade9fe779440721a1d42cbdfcd1

9 years agoMerge "Introduce a seam to ConnectivityManager and TelephonyManager" into gingerbread
Steve Howard [Mon, 19 Jul 2010 17:58:58 +0000]
Merge "Introduce a seam to ConnectivityManager and TelephonyManager" into gingerbread

9 years agoRevert "fix permissons/targets in download provider tests"
Guang Zhu [Fri, 16 Jul 2010 22:47:04 +0000]
Revert "fix permissons/targets in download provider tests"

This reverts commit c7717b4d1e6cf51ab8d8de03fe23dcad2dc97f52.

9 years agoIntroduce a seam to ConnectivityManager and TelephonyManager
Steve Howard [Thu, 15 Jul 2010 22:57:31 +0000]
Introduce a seam to ConnectivityManager and TelephonyManager

This change abstracts access to ConnectivityManager and
TelephonyManager behind methods on SystemFacade, moving the code from
Helpers into RealSystemFacade and adding fake implementations to
FakeSystemFacade.  This facilitates new connectivity tests.

Change-Id: Id6c6b861e1d4ca45b3c1572bfb8ae0aa26af756b

9 years agoMerge "Support for custom HTTP headers on download requests" into gingerbread
Steve Howard [Thu, 15 Jul 2010 19:28:45 +0000]
Merge "Support for custom HTTP headers on download requests" into gingerbread

9 years agoMerge "fix permissons/targets in download provider tests" into gingerbread
Guang Zhu [Thu, 15 Jul 2010 19:24:40 +0000]
Merge "fix permissons/targets in download provider tests" into gingerbread

9 years agofix permissons/targets in download provider tests
Guang Zhu [Thu, 15 Jul 2010 19:22:35 +0000]
fix permissons/targets in download provider tests

* permission tests package should be signed with the same cert as
  download provider itself
* permission tests should not target on itself

Change-Id: Ic4307119ed6c41cbffd98fe165ebc360e2b38c8e

9 years agoCleanup whitespace in DownloadNotification
Steve Howard [Thu, 15 Jul 2010 18:01:14 +0000]
Cleanup whitespace in DownloadNotification

Change-Id: I598ece9690649573d44d3089e473612e25f2974b

9 years agoSupport for custom HTTP headers on download requests
Steve Howard [Wed, 14 Jul 2010 18:30:59 +0000]
Support for custom HTTP headers on download requests

Provider changes:
* new many-to-one DB table holding headers for each download.  since
  there was no real migration logic in DownloadProvider, I implemented
  some.
* DownloadProvider.insert() reads request headers out of the
  ContentValues and puts them into the new table
* DownloadProvider.query() supports a new URI form,
  download/#/headers, to fetch the headers associated with a download
* DownloadProvider.delete() removes request headers from this table

Service changes:
* made DownloadInfo store request headers upon initialization.  While
  I was at it, I refactored the initialization logic into DownloadInfo
  to get rid of the massive 24-parameter constructor.  The right next
  step would be to move the update logic into DownloadInfo and merge
  it with the initialization logic; however, I realized that headers
  don't need to be updatable, and in the future, we won't need the
  update logic at all, so i didn't bother touching the update code.
* made DownloadThread read headers from the DownloadInfo and include
  them in the request; merged the custom Cookie and Referer logic into
  this logic

Also added a couple new test cases for this stuff.

Change-Id: I421ce1f0a694e815f2e099795182393650fcb3ff

9 years agoSupport for file URI destinations + last modified timestamp
Steve Howard [Tue, 13 Jul 2010 00:24:17 +0000]
Support for file URI destinations + last modified timestamp

File URI destinations:
* permission checking in DownloadProvider
* implementation in Helpers.generateSaveFile().  it's a fairly small
  amount of logic added here, but I did some significant method
  extraction to simplify this change and clean up the code in general.
* added test case

Last modified timestamp:
* made DownloadProvider use a SystemFacade for getting system time, so I could properly test timestamps
* updated test cases to cover last modified time + handle new ordering

9 years agoImprove error message when SQL parser gets illegal character
Steve Howard [Sat, 10 Jul 2010 01:24:28 +0000]
Improve error message when SQL parser gets illegal character

Change-Id: Ife165361ebd75d558b311710e62abdfbdc355f1b

9 years agoNew functional test for download manager public API.
Steve Howard [Fri, 2 Jul 2010 19:59:05 +0000]
New functional test for download manager public API.

I refactored a lot of the logic from DownloadManagerFunctionalTest
into a new abstract class so that it could be shared with the new
PublicApiFunctionalTest.  There could be even more sharing, but it's
not entirely clear it'd be worthwhile at this point.  The new test
covers most features of the new public API.

Change-Id: I8c6859411f44b6430f8b348cf26a61225f5768cb

9 years agoChange AnimatedImageViews to ImageViews.
Steve Howard [Thu, 1 Jul 2010 23:31:16 +0000]
Change AnimatedImageViews to ImageViews.

The AnimatedImageView class was private and should not have been used.
When it was removed, the decision was made to change these to
unanimated images.  The first frame will show, which should be good
enough, and it'll safe a bit of CPU.

9 years agoStub out the system clock in the download manager, add tests
Steve Howard [Wed, 23 Jun 2010 01:20:55 +0000]
Stub out the system clock in the download manager, add tests

Introduce SystemFacade, an interface that allows us to stub out the
system clock for testing the download manager.  This allows us to test
retrying a failed download without having the test wait 60 seconds.
This interface can include other dependencies in the future as well.

I've also used this to add tests for 503 (retry-after) and 301
(redirect), and I've added a test for download to the cache partition.

Other changes:
* made MockWebServer capable of checking + rethrowing exceptions from child threads
* refactoring + cleanup of DownloadManagerFunctionalTest

9 years agoFix build in master - new method in FakeIConnectivityManager
Steve Howard [Tue, 29 Jun 2010 23:57:08 +0000]
Fix build in master - new method in FakeIConnectivityManager

Change-Id: I76996b9a7b6d0f725480cacb1da032cec2dade0b

9 years agoFirst pass at a functional test for the Download Manager.
Steve Howard [Thu, 10 Jun 2010 00:50:07 +0000]
First pass at a functional test for the Download Manager.

This "Large" test sets up an HTTP server on the device using
MockWebServer and then initiates downloads from that server through
the download manager.  It uses ServiceTestCase to control the
construction and execution of the DownloadService, and it uses some
logic from ProviderTestCase2 to construct a DownloadProvider and a
ContentResolver that uses it.

This setup gives us some ability to mock dependencies.  This commit
includes use of a fake ConnectivityManager to test responses to
connectivity changes, and use of some customizations to MockWebServer
to test resuming an interrupted download.  This test is disabled,
though, since it requires a very long sleep.

Avoiding that, and achieving certain other things, will require
changes to the Download Manager code itself to introduce new seams.  I
wanted to check this in before I started such changes.

Change-Id: Iefb13b3c3cccdc13fabe5cc18703e13244805539

9 years agoam 8fed41c3: Merge "Don\'t inadvertantly include tests in the build." into kraken
Steve Howard [Mon, 21 Jun 2010 22:56:09 +0000]
am 8fed41c3: Merge "Don\'t inadvertantly include tests in the build." into kraken

Merge commit '8fed41c37e52a3e186e8f36b18a0b6433278acd3' into gingerbread

* commit '8fed41c37e52a3e186e8f36b18a0b6433278acd3':
  Don't inadvertantly include tests in the build.

9 years agoMerge "Don't inadvertantly include tests in the build." into kraken
Steve Howard [Mon, 21 Jun 2010 22:54:16 +0000]
Merge "Don't inadvertantly include tests in the build." into kraken

9 years agoDon't inadvertantly include tests in the build.
Steve Howard [Mon, 21 Jun 2010 22:46:16 +0000]
Don't inadvertantly include tests in the build.

Change-Id: Ic57f0b66dd81da1b6acc7132f792b024e974f74c

9 years agoam 4c54154c: Check in copies of MockWebServer + friends.
Steve Howard [Mon, 21 Jun 2010 21:36:31 +0000]
am 4c54154c: Check in copies of MockWebServer + friends.

Merge commit '4c54154c83a5b3516d81903140b31349f196cbe2' into gingerbread

* commit '4c54154c83a5b3516d81903140b31349f196cbe2':
  Check in copies of MockWebServer + friends.

9 years agoCheck in copies of MockWebServer + friends.
Steve Howard [Thu, 17 Jun 2010 21:56:48 +0000]
Check in copies of MockWebServer + friends.

This commit includes unmodified copies of MockWebServer and its
supporting classes, taken from
dalvik-dev:libcore/support/src/tests/java.  My test will require some
changes, but I'm committing unchanged versions first so I can more
easily track my changes and eventually merge them back over.

Change-Id: Ic4b79c7a2cbd3bd439864ed94c43fe985eae8e78

9 years agoam 09330001: Import revised translations
Kenny Root [Mon, 21 Jun 2010 16:02:33 +0000]
am 09330001: Import revised translations

Merge commit '09330001cc50f8a5ffe2ef527dbb5729080f52e2' into gingerbread

* commit '09330001cc50f8a5ffe2ef527dbb5729080f52e2':
  Import revised translations

9 years agoImport revised translations froyo froyo-tegra tegra-10.7.1 tegra-10.7.1-ER tegra-10.7.1-ER-baseline tegra-10.7.2 tegra-10.7.2-baseline tegra-10.8.1 tegra-10.8.2 tegra-10.8.2-test tegra-10.8.2-test-baseline tegra-10.8.3 tegra-10.9.1 tegra-10.9.2 tegra-10.9.3 tegra-10.9.3-baseline tegra-10.9.4 tegra-10.9.4-baseline tegra-10.9.5 tegra-10.9.5-baseline tegra-10.9.5-baseline-debug tegra-10.9.6 tegra-10.9.6-baseline tegra-10.9.7 tegra-10.9.7-baseline tegra-10.9.8 tegra-10.9.8-baseline tegra-10.9.9 tegra-10.9.9-baseline
Kenny Root [Mon, 21 Jun 2010 02:01:54 +0000]
Import revised translations

Change-Id: I012450adc3ff91ce5cfbd28e21eed1aa6833c56f

9 years agomerge from open-source master
The Android Open Source Project [Mon, 10 May 2010 21:01:05 +0000]
merge from open-source master

Change-Id: If84d4054324db6d10fd0cdbd2169c039c6675726

9 years agocode left opened files behind
usul [Sun, 28 Mar 2010 15:26:05 +0000]
code left opened files behind
verified with lsof DownloadProvider after downloading a file shows:
${proc} 338    10034   33w   REG      179,0  167634    5 /sdcard/download/fw4-1.pdf

Change-Id: I8e2412fe9a6348f5ece6f5ca3a9ebf99a4474bce

9 years agoMerge "Show correct date for downloads in the statusbar"
Jean-Baptiste Queru [Mon, 10 May 2010 17:46:03 +0000]
Merge "Show correct date for downloads in the statusbar"

9 years agoImport revised translations tegra-10.8.1-baseline tegra-10.8.2-baseline tegra-10.8.3-baseline tegra-10.9.1-baseline tegra-10.9.2-baseline
Kenny Root [Tue, 27 Apr 2010 21:32:02 +0000]
Import revised translations

Change-Id: I800cdf6e7d34180e13d7af74abfe0887e1f20316

9 years agoAdjust DownloadProvider's makefile so its tests get built.
Brett Chabot [Mon, 5 Apr 2010 23:16:08 +0000]
Adjust DownloadProvider's makefile so its tests get built.

Bug 2562721

Change-Id: I7dfd73d4e30fcc5dc80c9ed024432c0b833a011a

9 years agoImport revised translations
Kenny Root [Thu, 18 Mar 2010 05:17:11 +0000]
Import revised translations

Change-Id: Iac9bc801179d35cf266b6398c2c6557f5abc524e

9 years agoAdd an empty CleanSpec.mk
Jean-Baptiste Queru [Tue, 9 Mar 2010 02:05:14 +0000]
Add an empty CleanSpec.mk

Change-Id: Idbb6ff1607b2885ed2da0749fc99b39f815fac15

9 years agoImport new translations
Eric Fischer [Thu, 4 Mar 2010 22:07:31 +0000]
Import new translations

9 years agoImport new translations.
Eric Fischer [Sat, 27 Feb 2010 01:34:58 +0000]
Import new translations.

9 years agoUpdate to reflect android-common no longer in framework.
Dianne Hackborn [Thu, 25 Feb 2010 03:59:19 +0000]
Update to reflect android-common no longer in framework.

9 years agoSupply a Context to AndroidHttpClient.newInstance(), to enable
Dan Egnor [Wed, 10 Feb 2010 20:51:47 +0000]
Supply a Context to AndroidHttpClient.newInstance(), to enable
persistent SSL session caching.

9 years agoShow correct date for downloads in the statusbar
Per Edelberg [Wed, 10 Feb 2010 07:30:48 +0000]
Show correct date for downloads in the statusbar

The date was not set properly in notifications when the text for
expanded view was created.

This fix sets the displayed time to the download time for each
individual file. The DownloadProvider recreates the notifications
several times but don't set the time before the expanded message
is created. The expanded message will therefore display the time
the notification was created and not the time a file was downloaded.
The displayed time will in most case be the time when the last file
was downloaded. This fix sets the displayed time to the downloaded
time for each individual file.

9 years agoam 29ca9e3a: am 7f75be7e: reconcile main tree with open-source eclair
The Android Open Source Project [Fri, 5 Feb 2010 22:25:27 +0000]
am 29ca9e3a: am 7f75be7e: reconcile main tree with open-source eclair

Merge commit '29ca9e3a63b63f71b0c4ab9544d0bd5361386751'

* commit '29ca9e3a63b63f71b0c4ab9544d0bd5361386751':
  android-2.1_r1 snapshot

9 years agoam 7f75be7e: reconcile main tree with open-source eclair
The Android Open Source Project [Fri, 5 Feb 2010 16:49:39 +0000]
am 7f75be7e: reconcile main tree with open-source eclair

Merge commit '7f75be7ea7027a2ad6e7564195333fd075c0b1a0' into eclair-plus-aosp

* commit '7f75be7ea7027a2ad6e7564195333fd075c0b1a0':
  android-2.1_r1 snapshot

9 years agoCreate a new permission that allows apps to see downloads from other
Leon Scroggins [Thu, 28 Jan 2010 22:53:26 +0000]
Create a new permission that allows apps to see downloads from other
applications to the SD card.

Necessary for http://b/issue?id=2384554

Also create names for files by default, so they do not display as
<Untitled>.  Remove calls to createTitleFromFilename, which are
no longer necessary.

Requires a change to frameworks/base.

9 years agoreconcile main tree with open-source eclair
The Android Open Source Project [Fri, 5 Feb 2010 16:09:41 +0000]
reconcile main tree with open-source eclair

9 years agoreconcile android-2.1_r1 snapshot eclair eclair-9.12.13 eclair-tegra tegra-9.12.10 tegra-9.12.10-baseline tegra-9.12.11 tegra-9.12.11-baseline tegra-9.12.12 tegra-9.12.12-baseline tegra-9.12.13 tegra-9.12.13-baseline tegra-9.12.13.1 tegra-9.12.7 tegra-9.12.7-baseline tegra-9.12.8 tegra-9.12.8-baseline tegra-9.12.9 tegra-9.12.9-baseline
The Android Open Source Project [Fri, 29 Jan 2010 22:09:29 +0000]
reconcile android-2.1_r1 snapshot

9 years agoGrant access to downloaded packages to default container.
Suchi Amalapurapu [Mon, 25 Jan 2010 23:50:36 +0000]
Grant access to downloaded packages to default container.
The package name is hardcoded for now but will eventually move to a separate gid
guarded by a permission.

9 years agob/2383073 Use new fine-grained download status codes.
Attila Bodis [Tue, 26 Jan 2010 22:56:11 +0000]
b/2383073 Use new fine-grained download status codes.

Takes advantage of two new download status codes (STATUS_DEVICE_NOT_FOUND_ERROR
and STATUS_INSUFFICIENT_SPACE_ERROR) when reporting failed download attempts.

9 years agoRevert "Download files even if there is no activity to launch them."
Leon Scroggins [Fri, 22 Jan 2010 14:35:34 +0000]
Revert "Download files even if there is no activity to launch them."

This reverts commit 0f1aae327a9e4c68044d767e9bafbac747b6d985.

I misunderstood the bug.  We do not want to be able to download
files for which there is currently no Activity to launch them.

9 years agoUpdate the title of the download based on the filename.
Leon Scroggins [Thu, 21 Jan 2010 21:21:46 +0000]
Update the title of the download based on the filename.

Now that the downloads page is not necessarily opened when a download
starts, we need to provide a name even if the downloads page isn't
shown.  So when we create a notification, provide the title.

Depends on a change to frameworks/base

9 years agoDownload files even if there is no activity to launch them.
Leon Scroggins [Thu, 21 Jan 2010 18:09:54 +0000]
Download files even if there is no activity to launch them.

Fixes http://b/issue?id=2367247

9 years agoUse the private legacy API
Jean-Baptiste Queru [Fri, 8 Jan 2010 00:33:05 +0000]
Use the private legacy API

The public API is getting deeply reworked for forward compatibility,
but since the Download Manager and the Browser need to continue using
the old API, a separate copy is being kept on the side.

Bug: 2245521

Change-Id: I85eff6ba9efc68600aa80e8dffa6720b0f2ed155

9 years agoandroid-2.1_r1 snapshot
The Android Open Source Project [Tue, 12 Jan 2010 23:19:21 +0000]
android-2.1_r1 snapshot

9 years agoDeprecate fill_parent and introduce match_parent.
Romain Guy [Fri, 8 Jan 2010 23:07:17 +0000]
Deprecate fill_parent and introduce match_parent.
Bug: #2361749.

9 years agoUpdate with latest translations.
Eric Fischer [Fri, 8 Jan 2010 00:01:26 +0000]
Update with latest translations.

9 years agoremove ACCESS_CACHE_FILESYSTEM permission
Doug Zongker [Wed, 6 Jan 2010 23:56:48 +0000]
remove ACCESS_CACHE_FILESYSTEM permission

Its definition is moving to frameworks/base.

Change-Id: Ieb0409c458939c14e2cc8b5bdbcef14564a59c55

9 years agoexplicit set an "optional" tag
Jean-Baptiste Queru [Tue, 5 Jan 2010 19:09:54 +0000]
explicit set an "optional" tag

9 years agoMerge commit 'goog/eclair-plus-aosp'
Android Git Automerger [Tue, 15 Dec 2009 08:45:09 +0000]
Merge commit 'goog/eclair-plus-aosp'

9 years agoam 31342163: am dc0accaa: Changed class paths for classes moved in unbundling effort
Paul Westbrook [Mon, 14 Dec 2009 19:55:48 +0000]
am 31342163: am dc0accaa: Changed class paths for classes moved in unbundling effort

Merge commit '313421638f1fa01bf269350fd32d4e4df8afbc5e'

* commit '313421638f1fa01bf269350fd32d4e4df8afbc5e':
  Changed class paths for classes moved in unbundling effort

9 years agoam dc0accaa: Changed class paths for classes moved in unbundling effort
Paul Westbrook [Mon, 14 Dec 2009 18:40:55 +0000]
am dc0accaa: Changed class paths for classes moved in unbundling effort

Merge commit 'dc0accaaa66cdd7321505a8c42504b05a98ae341' into eclair-mr2-plus-aosp

* commit 'dc0accaaa66cdd7321505a8c42504b05a98ae341':
  Changed class paths for classes moved in unbundling effort

9 years agoChanged class paths for classes moved in unbundling effort
Paul Westbrook [Mon, 14 Dec 2009 18:25:46 +0000]
Changed class paths for classes moved in unbundling effort

9 years agoam e88706b9: (-s ours) am b0033a36: am a61606af: (-s ours) Import revised translation...
Eric Fischer [Wed, 2 Dec 2009 01:39:37 +0000]
am e88706b9: (-s ours) am b0033a36: am a61606af: (-s ours) Import revised translations.  DO NOT MERGE

Merge commit 'e88706b900716b2cfaa917efdd320e6bef7b21fa'

* commit 'e88706b900716b2cfaa917efdd320e6bef7b21fa':
  Import revised translations.  DO NOT MERGE

9 years agoam b0033a36: am a61606af: (-s ours) Import revised translations. DO NOT MERGE
Eric Fischer [Wed, 2 Dec 2009 01:29:57 +0000]
am b0033a36: am a61606af: (-s ours) Import revised translations.  DO NOT MERGE

Merge commit 'b0033a369377c3cfba1121f7ed7941165cc1c415' into eclair-mr2-plus-aosp

* commit 'b0033a369377c3cfba1121f7ed7941165cc1c415':
  Import revised translations.  DO NOT MERGE

9 years agoam a61606af: (-s ours) Import revised translations. DO NOT MERGE
Eric Fischer [Wed, 2 Dec 2009 01:12:18 +0000]
am a61606af: (-s ours) Import revised translations.  DO NOT MERGE

Merge commit 'a61606af5d154cd6281bd5f5de9e01e7240cca53' into eclair-mr2

* commit 'a61606af5d154cd6281bd5f5de9e01e7240cca53':
  Import revised translations.  DO NOT MERGE

9 years agoam a61606af: Import revised translations. DO NOT MERGE
Eric Fischer [Mon, 30 Nov 2009 20:06:00 +0000]
am a61606af: Import revised translations.  DO NOT MERGE

Merge commit 'a61606af5d154cd6281bd5f5de9e01e7240cca53' into eclair-plus-aosp

* commit 'a61606af5d154cd6281bd5f5de9e01e7240cca53':
  Import revised translations.  DO NOT MERGE

9 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Mon, 30 Nov 2009 19:41:02 +0000]
Import revised translations.  DO NOT MERGE

9 years agoam 5b9bcf8d: am 18c30402: Fix Download application notification timestamp not correct...
Lixin Yue [Wed, 25 Nov 2009 21:40:30 +0000]
am 5b9bcf8d: am 18c30402: Fix Download application notification timestamp not correct issue

Merge commit '5b9bcf8d3f74b8827b2a2e1f148d8ccd574083c8'

* commit '5b9bcf8d3f74b8827b2a2e1f148d8ccd574083c8':
  Fix Download application notification timestamp not correct issue

9 years agoam 18c30402: Fix Download application notification timestamp not correct issue
Lixin Yue [Wed, 25 Nov 2009 21:37:57 +0000]
am 18c30402: Fix Download application notification timestamp not correct issue

Merge commit '18c3040260907472a9e471e5707a5b2f8320d074' into eclair-mr2-plus-aosp

* commit '18c3040260907472a9e471e5707a5b2f8320d074':
  Fix Download application notification timestamp not correct issue

9 years agoFix Download application notification timestamp not correct issue
Lixin Yue [Mon, 2 Nov 2009 07:22:42 +0000]
Fix Download application notification timestamp not correct issue

Should set the value of Notification.when before calling
setLatestEventInfo(). On downloading an image without
exif information, the received file's timestamp is correct for main database field
but incorrect for temporary display field.

Root cause is that if Notification.when not set before calling setLatestEventInfo(),
the timestamp value in milliseconds unit will be directly set to a field as second
unit. Thus database will record the time as 1000 times forward as 2067, etc.
However from UI the file's time will be just shown like "10/10/67", misleading
people to think time is set backwards before system time 0(1969).

9 years agoam caec636f: am 89f9c9b4: change ACCESS_CACHE_FILESYSTEM to signatureOrSystem
Doug Zongker [Wed, 18 Nov 2009 00:14:19 +0000]
am caec636f: am 89f9c9b4: change ACCESS_CACHE_FILESYSTEM to signatureOrSystem

Merge commit 'caec636f568242f59196fec7487051d535c236e6'

* commit 'caec636f568242f59196fec7487051d535c236e6':
  change ACCESS_CACHE_FILESYSTEM to signatureOrSystem

9 years agoam 89f9c9b4: change ACCESS_CACHE_FILESYSTEM to signatureOrSystem
Doug Zongker [Wed, 18 Nov 2009 00:06:22 +0000]
am 89f9c9b4: change ACCESS_CACHE_FILESYSTEM to signatureOrSystem

Merge commit '89f9c9b4ccc22bc1f37edf5effa518970d342808' into eclair-mr2-plus-aosp

* commit '89f9c9b4ccc22bc1f37edf5effa518970d342808':
  change ACCESS_CACHE_FILESYSTEM to signatureOrSystem

9 years agochange ACCESS_CACHE_FILESYSTEM to signatureOrSystem
Doug Zongker [Tue, 17 Nov 2009 23:34:15 +0000]
change ACCESS_CACHE_FILESYSTEM to signatureOrSystem

Needed for unbundling of google OTA.

9 years agoam c2c3d692: merge from open-source master
Jean-Baptiste Queru [Sun, 15 Nov 2009 23:09:45 +0000]
am c2c3d692: merge from open-source master

Merge commit 'c2c3d69268004ebe055dd7dfa63bed1818cc4334'

* commit 'c2c3d69268004ebe055dd7dfa63bed1818cc4334':
  eclair snapshot

9 years agomerge from open-source master
Jean-Baptiste Queru [Sun, 15 Nov 2009 22:55:28 +0000]
merge from open-source master

9 years agomerge from open-source master
Jean-Baptiste Queru [Sun, 15 Nov 2009 22:06:49 +0000]
merge from open-source master

Merge commit 'goog/stage-korg-master' into HEAD

9 years agomerge from eclair master
Jean-Baptiste Queru [Sun, 15 Nov 2009 20:07:00 +0000]
merge from eclair

9 years agoam 93c36e2c: (-s ours) am 38b7e34a: am 9d6b0fa7: (-s ours) Import revised translation...
Eric Fischer [Sat, 14 Nov 2009 02:06:30 +0000]
am 93c36e2c: (-s ours) am 38b7e34a: am 9d6b0fa7: (-s ours) Import revised translations.  DO NOT MERGE

Merge commit '93c36e2ca5d0f3a5a176060b945d206cf3cf5a67'

* commit '93c36e2ca5d0f3a5a176060b945d206cf3cf5a67':
  Import revised translations.  DO NOT MERGE

9 years agoam 38b7e34a: am 9d6b0fa7: (-s ours) Import revised translations. DO NOT MERGE
Eric Fischer [Sat, 14 Nov 2009 02:02:12 +0000]
am 38b7e34a: am 9d6b0fa7: (-s ours) Import revised translations.  DO NOT MERGE

Merge commit '38b7e34aacd4ab7a73c26c099fe07abe6f83a9dc' into eclair-mr2-plus-aosp

* commit '38b7e34aacd4ab7a73c26c099fe07abe6f83a9dc':
  Import revised translations.  DO NOT MERGE

9 years agoam 9d6b0fa7: (-s ours) Import revised translations. DO NOT MERGE
Eric Fischer [Sat, 14 Nov 2009 01:58:09 +0000]
am 9d6b0fa7: (-s ours) Import revised translations.  DO NOT MERGE

Merge commit '9d6b0fa777f6978be741f2b34bf36cdec8cb7a41' into eclair-mr2

* commit '9d6b0fa777f6978be741f2b34bf36cdec8cb7a41':
  Import revised translations.  DO NOT MERGE