| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the service lifecycle was managed through a large for()
loop which was extremely tricky to reason about. This resulted in
several race conditions that could leave the service running
indefinitely, or terminate it early before tasks had finished.
This change redesigns the update loop to be event driven based on
database updates, and to collapse mutiple pending update passes. It
is much easier to reason about service termination conditions, and
it correctly uses startId to handle races during command delivery.
Also moves scanner into isolated class, and switches to using public
API instead of binding to private interface.
Bug: 7638470, 7455406, 7162341
Change-Id: I380e77f5432223b2acb4e819e37f29f98ee4782b
|
|
|
|
| |
Change-Id: Ice24d5c62bbcbcfd3d7374eac3a20580f7f31f36
|
|
|
|
|
|
| |
Directly mock NotificationManager instead of using SystemFacade.
Change-Id: If932d26e23816e8674469c275a828701cce5fc2d
|
|
|
|
|
| |
Bug: 4726601
Change-Id: Ibe537bd5c2a092dbf974360cd454751881f7f4ea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|