diff options
| author | Kweku Adams <kwekua@google.com> | 2019-06-14 11:24:35 -0700 |
|---|---|---|
| committer | doc HD <doc.divxm@gmail.com> | 2020-06-06 21:57:03 +0300 |
| commit | 14a4c4b8aac40700c382f239a9db6de739c10e92 (patch) | |
| tree | 7c64ae7abd4fb10ffa37ff483c00a5829feef2e2 | |
| parent | e3f12ac345b95e223a4bb0ee8f71983fbafb4915 (diff) | |
Switch from deprecated/removed JobInfo method.
JobInfo.setEstimatedBytes(long) was deprecated and tagged with @removed
before Pie shipped but DownloadProvider continued to use the deprecated
method. Switching DownloadProvider over to the public method so the
deprecated method can be removed.
Bug: 130692844
Bug: 135214188
Test: atest com.android.server.job.controllers.ConnectivityControllerTest
Test: atest com.android.providers.downloads.DownloadProviderFunctionalTest
Change-Id: I5506079ee06e75f7394814fc967df21a4a86341d
(cherry picked from commit a8d67ad37081951fde57ed494730f86e595ba709)
| -rw-r--r-- | src/com/android/providers/downloads/Helpers.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/android/providers/downloads/Helpers.java b/src/com/android/providers/downloads/Helpers.java index 57cdf04a..a34097d3 100644 --- a/src/com/android/providers/downloads/Helpers.java +++ b/src/com/android/providers/downloads/Helpers.java @@ -54,7 +54,6 @@ import android.text.TextUtils; import android.util.Log; import android.util.LongSparseArray; import android.util.SparseArray; -import android.util.SparseBooleanArray; import android.webkit.MimeTypeMap; import com.android.internal.util.ArrayUtils; @@ -192,9 +191,10 @@ public class Helpers { if (info.mCurrentBytes > 0 && !TextUtils.isEmpty(info.mETag)) { // If we're resuming an in-progress download, we only need to // download the remaining bytes. - builder.setEstimatedNetworkBytes(info.mTotalBytes - info.mCurrentBytes); + builder.setEstimatedNetworkBytes(info.mTotalBytes - info.mCurrentBytes, + JobInfo.NETWORK_BYTES_UNKNOWN); } else { - builder.setEstimatedNetworkBytes(info.mTotalBytes); + builder.setEstimatedNetworkBytes(info.mTotalBytes, JobInfo.NETWORK_BYTES_UNKNOWN); } } |
