diff options
author | Chris Craik <ccraik@google.com> | 2015-04-28 22:06:16 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-28 22:06:17 +0000 |
commit | 2f1d09c3c5e80e875f588d77bc1e47d317491fa8 (patch) | |
tree | 9b9f132a66596e5a46e10a0cd93136fdf539bbb8 | |
parent | ff623a5ab3b26cd98790e355e316a65d76197cbd (diff) | |
parent | 58fc522a69e8ddf9ac8530ce88e9c2c92da1dd14 (diff) | |
download | frameworks_base-2f1d09c3c5e80e875f588d77bc1e47d317491fa8.zip frameworks_base-2f1d09c3c5e80e875f588d77bc1e47d317491fa8.tar.gz frameworks_base-2f1d09c3c5e80e875f588d77bc1e47d317491fa8.tar.bz2 |
Merge "Use default constructor to get anti-aliasing" into mnc-dev
8 files changed, 16 insertions, 16 deletions
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java index d162efc..089074a 100644 --- a/core/java/android/widget/Editor.java +++ b/core/java/android/widget/Editor.java @@ -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; diff --git a/core/java/android/widget/Switch.java b/core/java/android/widget/Switch.java index ae779fe..f94f97c 100644 --- a/core/java/android/widget/Switch.java +++ b/core/java/android/widget/Switch.java @@ -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; diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 3e8df08..8ce5f08 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -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(); diff --git a/core/java/com/android/internal/util/ImageUtils.java b/core/java/com/android/internal/util/ImageUtils.java index 7d56e9e..a0d0b20 100644 --- a/core/java/com/android/internal/util/ImageUtils.java +++ b/core/java/com/android/internal/util/ImageUtils.java @@ -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(); diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java index 4c2817c..dc9aa67 100644 --- a/graphics/java/android/graphics/drawable/GradientDrawable.java +++ b/graphics/java/android/graphics/drawable/GradientDrawable.java @@ -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); diff --git a/graphics/java/android/graphics/drawable/ShapeDrawable.java b/graphics/java/android/graphics/drawable/ShapeDrawable.java index 334b3bd..caa0787 100644 --- a/graphics/java/android/graphics/drawable/ShapeDrawable.java +++ b/graphics/java/android/graphics/drawable/ShapeDrawable.java @@ -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(); } } diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java index 0d331d1..3fbc76b 100755 --- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java +++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java @@ -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); diff --git a/services/core/java/com/android/server/wm/Watermark.java b/services/core/java/com/android/server/wm/Watermark.java index e226e3d..ba3ce36 100644 --- a/services/core/java/com/android/server/wm/Watermark.java +++ b/services/core/java/com/android/server/wm/Watermark.java @@ -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)); |