Remove dependency on hidden NetworkStats API
GB_IN_BYTES is not API in TrafficStats; remove the API usage and just
use a constant in the test.
Bug: 197717846
Test: atest DownloadProviderTests
(cherry-picked from ag/16780144)
Change-Id: I0afaa4788fe18a75972473a72fdfe071798b1011
Merged-In: I0afaa4788fe18a75972473a72fdfe071798b1011
diff --git a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
index f45e102..d36635a 100644
--- a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
@@ -18,7 +18,6 @@
import static android.app.DownloadManager.STATUS_FAILED;
import static android.app.DownloadManager.STATUS_PAUSED;
-import static android.net.TrafficStats.GB_IN_BYTES;
import static android.text.format.DateUtils.SECOND_IN_MILLIS;
import static org.mockito.Matchers.anyInt;
@@ -71,6 +70,7 @@
public class PublicApiFunctionalTest extends AbstractPublicApiTest {
private static final String REDIRECTED_PATH = "/other_path";
private static final String ETAG = "my_etag";
+ private static final long GB_IN_BYTES = 1024 * 1024 * 1024;
protected File mTestDirectory;
private NotificationManager mNotifManager;