diff options
author | Chris Craik <ccraik@google.com> | 2015-05-12 16:36:28 +0000 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-05-12 16:36:49 +0000 |
commit | dfe0a66ceca530e0777ebfab20f81103baa18f14 (patch) | |
tree | c6c694f61a07824efda588c7c941dab2672459d6 | |
parent | 356a26122bf928709d88cdc9a4a304b4495b1b31 (diff) | |
download | frameworks_base-dfe0a66ceca530e0777ebfab20f81103baa18f14.zip frameworks_base-dfe0a66ceca530e0777ebfab20f81103baa18f14.tar.gz frameworks_base-dfe0a66ceca530e0777ebfab20f81103baa18f14.tar.bz2 |
Revert "Use default constructor to get anti-aliasing"
bug:20948129
This reverts commit 58fc522a69e8ddf9ac8530ce88e9c2c92da1dd14.
Change-Id: Iddeccb4ad15b843bb3e610bd3673a0c7abc1bf46
8 files changed, 16 insertions, 16 deletions
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java index 2e36cee..c81e2f0 100644 --- a/core/java/android/widget/Editor.java +++ b/core/java/android/widget/Editor.java @@ -4475,7 +4475,7 @@ public class Editor { private class CorrectionHighlighter { private final Path mPath = new Path(); - private final Paint mPaint = new Paint(); + private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 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 ff587c2..356df31 100644 --- a/core/java/android/widget/Switch.java +++ b/core/java/android/widget/Switch.java @@ -214,7 +214,7 @@ public class Switch extends CompoundButton { public Switch(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); - mTextPaint = new TextPaint(); + mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); 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 68c49cd..574f24b 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -669,11 +669,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final Resources res = getResources(); final CompatibilityInfo compat = res.getCompatibilityInfo(); - mTextPaint = new TextPaint(); + mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG); mTextPaint.density = res.getDisplayMetrics().density; mTextPaint.setCompatibilityScaling(compat.applicationScale); - mHighlightPaint = new Paint(); + mHighlightPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 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 a0d0b20..7d56e9e 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(); + mTempCompactBitmapPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mTempCompactBitmapPaint.setFilterBitmap(true); } mTempMatrix.reset(); diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java index dc9aa67..4c2817c 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(); + private final Paint mFillPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 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(); + mStrokePaint = new Paint(Paint.ANTI_ALIAS_FLAG); 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(); + mStrokePaint = new Paint(Paint.ANTI_ALIAS_FLAG); 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 caa0787..334b3bd 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(); + mShapeState.mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); } 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(); + mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); } } diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java index 3fbc76b..0d331d1 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(); + mFramePaint = new Paint(Paint.ANTI_ALIAS_FLAG); mFramePaint.setColor(frameColor); mFramePaint.setDither(true); mFramePaint.setStrokeWidth(0); mFramePaint.setStyle(Paint.Style.FILL_AND_STROKE); - mBatteryPaint = new Paint(); + mBatteryPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mBatteryPaint.setDither(true); mBatteryPaint.setStrokeWidth(0); mBatteryPaint.setStyle(Paint.Style.FILL_AND_STROKE); - mTextPaint = new Paint(); + mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); Typeface font = Typeface.create("sans-serif-condensed", Typeface.BOLD); mTextPaint.setTypeface(font); mTextPaint.setTextAlign(Paint.Align.CENTER); - mWarningTextPaint = new Paint(); + mWarningTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 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(); + mBoltPaint = new Paint(Paint.ANTI_ALIAS_FLAG); 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 ba3ce36..e226e3d 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(); + mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mTextPaint.setTextSize(fontSize); mTextPaint.setTypeface(Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD)); |