Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77dae917 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Unify shorthand for byte-based units.

Change-Id: I32f998b5ee1f5416c9cceafd124fd34b7433be42
parent 5c474987
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ import static android.net.NetworkTemplate.buildTemplateMobile3gLower;
import static android.net.NetworkTemplate.buildTemplateMobile4g;
import static android.net.NetworkTemplate.buildTemplateMobileAll;
import static android.net.NetworkTemplate.buildTemplateWifi;
import static android.net.TrafficStats.GB_IN_BYTES;
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.FORMAT_ABBREV_MONTH;
@@ -171,10 +173,6 @@ public class DataUsageSummary extends Fragment {
    private static final int LOADER_CHART_DATA = 2;
    private static final int LOADER_SUMMARY = 3;

    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 INetworkManagementService mNetworkService;
    private INetworkStatsService mStatsService;
    private INetworkPolicyManager mPolicyService;
+3 −4
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@

package com.android.settings.widget;

import static android.net.TrafficStats.GB_IN_BYTES;
import static android.net.TrafficStats.MB_IN_BYTES;

import android.content.Context;
import android.content.res.Resources;
import android.net.NetworkPolicy;
@@ -40,10 +43,6 @@ import com.android.settings.widget.ChartSweepView.OnSweepListener;
 */
public class ChartDataUsageView extends ChartView {

    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 static final int MSG_UPDATE_AXIS = 100;
    private static final long DELAY_MILLIS = 250;