Unify shorthand for byte-based units.
Change-Id: If990859dee3f0973e1d4c48f05312c84071b3328
This commit is contained in:
@@ -24,6 +24,8 @@ import static android.net.NetworkStatsHistory.FIELD_TX_BYTES;
|
||||
import static android.net.NetworkStatsHistory.DataStreamUtils.readVarLong;
|
||||
import static android.net.NetworkStatsHistory.DataStreamUtils.writeVarLong;
|
||||
import static android.net.NetworkStatsHistory.Entry.UNKNOWN;
|
||||
import static android.net.TrafficStats.GB_IN_BYTES;
|
||||
import static android.net.TrafficStats.MB_IN_BYTES;
|
||||
import static android.text.format.DateUtils.DAY_IN_MILLIS;
|
||||
import static android.text.format.DateUtils.HOUR_IN_MILLIS;
|
||||
import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
|
||||
@@ -50,10 +52,6 @@ public class NetworkStatsHistoryTest extends AndroidTestCase {
|
||||
|
||||
private static final long TEST_START = 1194220800000L;
|
||||
|
||||
private static final long KB_IN_BYTES = 1024;
|
||||
private static final long MB_IN_BYTES = KB_IN_BYTES * 1024;
|
||||
private static final long GB_IN_BYTES = MB_IN_BYTES * 1024;
|
||||
|
||||
private NetworkStatsHistory stats;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,6 +31,7 @@ import static android.net.NetworkStats.UID_ALL;
|
||||
import static android.net.NetworkStatsHistory.FIELD_ALL;
|
||||
import static android.net.NetworkTemplate.buildTemplateMobileAll;
|
||||
import static android.net.NetworkTemplate.buildTemplateWifi;
|
||||
import static android.net.TrafficStats.MB_IN_BYTES;
|
||||
import static android.net.TrafficStats.UID_REMOVED;
|
||||
import static android.net.TrafficStats.UID_TETHERING;
|
||||
import static android.text.format.DateUtils.DAY_IN_MILLIS;
|
||||
@@ -92,10 +93,6 @@ public class NetworkStatsServiceTest extends AndroidTestCase {
|
||||
private static final String IMSI_1 = "310004";
|
||||
private static final String IMSI_2 = "310260";
|
||||
|
||||
private static final long KB_IN_BYTES = 1024;
|
||||
private static final long MB_IN_BYTES = 1024 * KB_IN_BYTES;
|
||||
private static final long GB_IN_BYTES = 1024 * MB_IN_BYTES;
|
||||
|
||||
private static NetworkTemplate sTemplateWifi = buildTemplateWifi();
|
||||
private static NetworkTemplate sTemplateImsi1 = buildTemplateMobileAll(IMSI_1);
|
||||
private static NetworkTemplate sTemplateImsi2 = buildTemplateMobileAll(IMSI_2);
|
||||
|
||||
Reference in New Issue
Block a user