Merge \"Update Settings to use DeviceDefault.Settings.\" into nyc-mr1-dev

am: 70ff5f8fa1

Change-Id: I3b556a3f7b0146deadf59b7c8fb244580b060fdf
This commit is contained in:
Andrew Sapperstein
2016-06-21 23:49:59 +00:00
committed by android-build-merger
7 changed files with 18 additions and 46 deletions

View File

@@ -4,7 +4,6 @@
package com.android.settings.applications;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.LinearGradient;
import android.graphics.Paint;
@@ -13,9 +12,9 @@ import android.graphics.Rect;
import android.graphics.Shader;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.widget.LinearLayout;
import com.android.settings.Utils;
public class LinearColorBar extends LinearLayout {
@@ -71,11 +70,7 @@ public class LinearColorBar extends LinearLayout {
? 2 : 1;
mEdgeGradientPaint.setStrokeWidth(mLineWidth);
mEdgeGradientPaint.setAntiAlias(true);
Resources.Theme theme = context.getTheme();
TypedValue typedValue = new TypedValue();
theme.resolveAttribute(android.R.attr.colorAccent, typedValue, true);
mLeftColor = mMiddleColor = context.getColor(typedValue.resourceId);
mLeftColor = mMiddleColor = Utils.getColorAccent(context);
}
public void setOnRegionTappedListener(OnRegionTappedListener listener) {

View File

@@ -21,7 +21,6 @@ import android.app.Dialog;
import android.app.Fragment;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.SystemClock;
import android.os.UserHandle;
@@ -29,7 +28,6 @@ import android.text.BidiFormatter;
import android.text.format.DateUtils;
import android.text.format.Formatter;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -44,6 +42,7 @@ import android.widget.TextView;
import com.android.internal.util.MemInfoReader;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.Utils;
import java.util.ArrayList;
import java.util.Collections;
@@ -451,13 +450,8 @@ public class RunningProcessesView extends FrameLayout
mListView.addHeaderView(mHeader, null, false /* set as not selectable */);
mColorBar = (LinearColorBar)mHeader.findViewById(R.id.color_bar);
final Context context = getContext();
Resources.Theme theme = context.getTheme();
TypedValue typedValue = new TypedValue();
theme.resolveAttribute(android.R.attr.colorAccent, typedValue, true);
mColorBar.setColors(context.getColor(R.color.running_processes_system_ram),
context.getColor(typedValue.resourceId),
Utils.getColorAccent(context),
context.getColor(R.color.running_processes_free_ram));
mBackgroundProcessPrefix = (TextView)mHeader.findViewById(R.id.freeSizePrefix);
mAppsProcessPrefix = (TextView)mHeader.findViewById(R.id.appsSizePrefix);