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

Commit 00ff604a authored by Andrew Sapperstein's avatar Andrew Sapperstein
Browse files

Fix crash when tapping on cell icon in QS.

During a refactoring, accidentally tried to use a color int
as a color resource int.

Change-Id: I4a96ffea9a997ad3cf19029b1101a283b7e88459
FIXES: 29575154
parent 5d1d6370
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.qs.tiles;

import android.annotation.ColorInt;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -65,7 +66,7 @@ public class DataUsageDetailView extends LinearLayout {
        final Resources res = mContext.getResources();
        final int titleId;
        final long bytes;
        int usageColor = 0;
        @ColorInt int usageColor = 0;
        final String top;
        String bottom = null;
        if (info.usageLevel < info.warningLevel || info.limitLevel <= 0) {
@@ -90,7 +91,7 @@ public class DataUsageDetailView extends LinearLayout {
                    formatBytes(info.usageLevel));
            bottom = res.getString(R.string.quick_settings_cellular_detail_data_limit,
                    formatBytes(info.limitLevel));
            usageColor = R.color.system_warning_color;
            usageColor = mContext.getColor(R.color.system_warning_color);
        }

        if (usageColor == 0) {
@@ -101,7 +102,7 @@ public class DataUsageDetailView extends LinearLayout {
        title.setText(titleId);
        final TextView usage = (TextView) findViewById(R.id.usage_text);
        usage.setText(formatBytes(bytes));
        usage.setTextColor(mContext.getColor(usageColor));
        usage.setTextColor(usageColor);
        final DataUsageGraph graph = (DataUsageGraph) findViewById(R.id.usage_graph);
        graph.setLevels(info.limitLevel, info.warningLevel, info.usageLevel);
        final TextView carrier = (TextView) findViewById(R.id.usage_carrier_text);