am 2f1d09c3: Merge "Use default constructor to get anti-aliasing" into mnc-dev
* commit '2f1d09c3c5e80e875f588d77bc1e47d317491fa8': Use default constructor to get anti-aliasing
This commit is contained in:
@@ -4490,7 +4490,7 @@ public class Editor {
|
||||
|
||||
private class CorrectionHighlighter {
|
||||
private final Path mPath = new Path();
|
||||
private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private final Paint mPaint = new Paint();
|
||||
private int mStart, mEnd;
|
||||
private long mFadingStartTime;
|
||||
private RectF mTempRectF;
|
||||
|
||||
@@ -216,7 +216,7 @@ public class Switch extends CompoundButton {
|
||||
public Switch(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
|
||||
mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
||||
mTextPaint = new TextPaint();
|
||||
|
||||
final Resources res = getResources();
|
||||
mTextPaint.density = res.getDisplayMetrics().density;
|
||||
|
||||
@@ -668,11 +668,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
final Resources res = getResources();
|
||||
final CompatibilityInfo compat = res.getCompatibilityInfo();
|
||||
|
||||
mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
||||
mTextPaint = new TextPaint();
|
||||
mTextPaint.density = res.getDisplayMetrics().density;
|
||||
mTextPaint.setCompatibilityScaling(compat.applicationScale);
|
||||
|
||||
mHighlightPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mHighlightPaint = new Paint();
|
||||
mHighlightPaint.setCompatibilityScaling(compat.applicationScale);
|
||||
|
||||
mMovement = getDefaultMovementMethod();
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ImageUtils {
|
||||
COMPACT_BITMAP_SIZE, COMPACT_BITMAP_SIZE, Bitmap.Config.ARGB_8888
|
||||
);
|
||||
mTempCompactBitmapCanvas = new Canvas(mTempCompactBitmap);
|
||||
mTempCompactBitmapPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mTempCompactBitmapPaint = new Paint();
|
||||
mTempCompactBitmapPaint.setFilterBitmap(true);
|
||||
}
|
||||
mTempMatrix.reset();
|
||||
|
||||
@@ -133,7 +133,7 @@ public class GradientDrawable extends Drawable {
|
||||
|
||||
private GradientState mGradientState;
|
||||
|
||||
private final Paint mFillPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private final Paint mFillPaint = new Paint();
|
||||
private Rect mPadding;
|
||||
private Paint mStrokePaint; // optional, set by the caller
|
||||
private ColorFilter mColorFilter; // optional, set by the caller
|
||||
@@ -323,7 +323,7 @@ public class GradientDrawable extends Drawable {
|
||||
|
||||
private void setStrokeInternal(int width, int color, float dashWidth, float dashGap) {
|
||||
if (mStrokePaint == null) {
|
||||
mStrokePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mStrokePaint = new Paint();
|
||||
mStrokePaint.setStyle(Paint.Style.STROKE);
|
||||
}
|
||||
mStrokePaint.setStrokeWidth(width);
|
||||
@@ -1802,7 +1802,7 @@ public class GradientDrawable extends Drawable {
|
||||
mPadding = state.mPadding;
|
||||
|
||||
if (state.mStrokeWidth >= 0) {
|
||||
mStrokePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mStrokePaint = new Paint();
|
||||
mStrokePaint.setStyle(Paint.Style.STROKE);
|
||||
mStrokePaint.setStrokeWidth(state.mStrokeWidth);
|
||||
|
||||
|
||||
@@ -501,7 +501,7 @@ public class ShapeDrawable extends Drawable {
|
||||
if (mShapeState.mPaint != null) {
|
||||
mShapeState.mPaint = new Paint(mShapeState.mPaint);
|
||||
} else {
|
||||
mShapeState.mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mShapeState.mPaint = new Paint();
|
||||
}
|
||||
if (mShapeState.mPadding != null) {
|
||||
mShapeState.mPadding = new Rect(mShapeState.mPadding);
|
||||
@@ -555,7 +555,7 @@ public class ShapeDrawable extends Drawable {
|
||||
mAlpha = orig.mAlpha;
|
||||
mShaderFactory = orig.mShaderFactory;
|
||||
} else {
|
||||
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mPaint = new Paint();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -225,23 +225,23 @@ public class BatteryMeterView extends View implements DemoMode,
|
||||
mSubpixelSmoothingRight = context.getResources().getFraction(
|
||||
R.fraction.battery_subpixel_smoothing_right, 1, 1);
|
||||
|
||||
mFramePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mFramePaint = new Paint();
|
||||
mFramePaint.setColor(frameColor);
|
||||
mFramePaint.setDither(true);
|
||||
mFramePaint.setStrokeWidth(0);
|
||||
mFramePaint.setStyle(Paint.Style.FILL_AND_STROKE);
|
||||
|
||||
mBatteryPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mBatteryPaint = new Paint();
|
||||
mBatteryPaint.setDither(true);
|
||||
mBatteryPaint.setStrokeWidth(0);
|
||||
mBatteryPaint.setStyle(Paint.Style.FILL_AND_STROKE);
|
||||
|
||||
mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mTextPaint = new Paint();
|
||||
Typeface font = Typeface.create("sans-serif-condensed", Typeface.BOLD);
|
||||
mTextPaint.setTypeface(font);
|
||||
mTextPaint.setTextAlign(Paint.Align.CENTER);
|
||||
|
||||
mWarningTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mWarningTextPaint = new Paint();
|
||||
mWarningTextPaint.setColor(mColors[1]);
|
||||
font = Typeface.create("sans-serif", Typeface.BOLD);
|
||||
mWarningTextPaint.setTypeface(font);
|
||||
@@ -249,7 +249,7 @@ public class BatteryMeterView extends View implements DemoMode,
|
||||
|
||||
mChargeColor = context.getColor(R.color.batterymeter_charge_color);
|
||||
|
||||
mBoltPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mBoltPaint = new Paint();
|
||||
mBoltPaint.setColor(context.getColor(R.color.batterymeter_bolt_color));
|
||||
mBoltPoints = loadBoltPoints(res);
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class Watermark {
|
||||
int fontSize = WindowManagerService.getPropertyInt(tokens, 1,
|
||||
TypedValue.COMPLEX_UNIT_DIP, 20, dm);
|
||||
|
||||
mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mTextPaint = new Paint();
|
||||
mTextPaint.setTextSize(fontSize);
|
||||
mTextPaint.setTypeface(Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user