Improve download remaining time calculation.
authorJeff Sharkey <jsharkey@android.com>
Wed, 28 Nov 2012 22:35:40 +0000 (14:35 -0800)
committerJeff Sharkey <jsharkey@android.com>
Wed, 28 Nov 2012 22:35:42 +0000 (14:35 -0800)
commitfec5f50a85e1bfc7bb4fa12d04ffa7526c79fad7
tree93926fa30b621cdce8b93ba8382580f9bc0f96d3
parentf818eecf1b60ddba2854314863243d6aa87707b0
Improve download remaining time calculation.

Calculate remaining time in DownloadNotifier so we always use the
most recent progress data, which avoids showing stale times.

Weight speed calculation to prefer historical data so remaining time
is smoother on bumpy network connections.

Bug: 7631948
Change-Id: I497be0899e65086356745340b19d3987c6185bdd
src/com/android/providers/downloads/DownloadHandler.java
src/com/android/providers/downloads/DownloadNotifier.java
src/com/android/providers/downloads/DownloadThread.java