Only report speeds from full samples windows.
authorJeff Sharkey <jsharkey@android.com>
Wed, 20 Feb 2013 01:11:41 +0000 (17:11 -0800)
committerJeff Sharkey <jsharkey@android.com>
Wed, 20 Feb 2013 01:11:41 +0000 (17:11 -0800)
commitd1214c9c92b6a4a44cfc46125c33d071a0f3d880
tree580d8d0d8d241bcb41be3d00adbe0d3d89bbd741
parent2eb144d8effed2dbb067957c5b25e735233bca89
Only report speeds from full samples windows.

Wait until we've passed a full sample window (500ms) before reporting
an estimated speed.  This avoid showing skewed times like "900 hours
remaining."

Also remember to clean up the UpdateThread.

Bug: 8176417
Change-Id: I851e0abcbb443114abe9c22f4650fee7a9bc3aaa
src/com/android/providers/downloads/DownloadService.java
src/com/android/providers/downloads/DownloadThread.java