Unify shorthand for byte-based units.
Change-Id: If990859dee3f0973e1d4c48f05312c84071b3328
This commit is contained in:
@@ -44,6 +44,13 @@ public class TrafficStats {
|
||||
*/
|
||||
public final static int UNSUPPORTED = -1;
|
||||
|
||||
/** @hide */
|
||||
public static final long KB_IN_BYTES = 1024;
|
||||
/** @hide */
|
||||
public static final long MB_IN_BYTES = KB_IN_BYTES * 1024;
|
||||
/** @hide */
|
||||
public static final long GB_IN_BYTES = MB_IN_BYTES * 1024;
|
||||
|
||||
/**
|
||||
* Special UID value used when collecting {@link NetworkStatsHistory} for
|
||||
* removed applications.
|
||||
|
||||
@@ -34,6 +34,7 @@ import static android.net.NetworkStats.TAG_NONE;
|
||||
import static android.net.NetworkStats.UID_ALL;
|
||||
import static android.net.NetworkTemplate.buildTemplateMobileAll;
|
||||
import static android.net.NetworkTemplate.buildTemplateWifi;
|
||||
import static android.net.TrafficStats.MB_IN_BYTES;
|
||||
import static android.provider.Settings.Secure.NETSTATS_DEV_BUCKET_DURATION;
|
||||
import static android.provider.Settings.Secure.NETSTATS_DEV_DELETE_AGE;
|
||||
import static android.provider.Settings.Secure.NETSTATS_DEV_PERSIST_BYTES;
|
||||
@@ -153,10 +154,6 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
|
||||
private PendingIntent mPollIntent;
|
||||
|
||||
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 final String PREFIX_DEV = "dev";
|
||||
private static final String PREFIX_UID = "uid";
|
||||
private static final String PREFIX_UID_TAG = "uid_tag";
|
||||
|
||||
Reference in New Issue
Block a user