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

Commit 2fa5c264 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

resolve merge conflicts of 071352de to master.

Change-Id: Ib777927fd479fcb567d005910930fda7354865d0
parents 8fa7e23b 071352de
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.Context;
import android.content.res.Resources;
import android.net.NetworkPolicy;
import android.net.NetworkStatsHistory;
import android.net.TrafficStats;
import android.os.Handler;
import android.os.Message;
import android.text.Spannable;
@@ -30,6 +31,7 @@ import android.text.format.Formatter;
import android.text.format.Formatter.BytesResult;
import android.text.format.Time;
import android.util.AttributeSet;
import android.util.MathUtils;
import android.view.MotionEvent;
import android.view.View;

@@ -534,6 +536,7 @@ public class ChartDataUsageView extends ChartView {

        @Override
        public long buildLabel(Resources res, SpannableStringBuilder builder, long value) {
            value = MathUtils.constrain(value, 0, TrafficStats.TB_IN_BYTES);
            final BytesResult result = Formatter.formatBytes(res, value,
                    Formatter.FLAG_SHORTER | Formatter.FLAG_CALCULATE_ROUNDED);
            setText(builder, sSpanSize, result.value, "^1");