summaryrefslogtreecommitdiffstats
path: root/graphics/java/android
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-08-02 12:37:16 -0700
committerRomain Guy <romainguy@google.com>2011-08-02 12:37:16 -0700
commitb1216dd916e0f5fdec29684120c5bcc904800916 (patch)
tree0228c900db8ab619e1eb5c889e87aea334e6cce7 /graphics/java/android
parent357c942462e4eb1d0b2e91b3fe8ec9ac7524bbed (diff)
downloadframeworks_base-b1216dd916e0f5fdec29684120c5bcc904800916.zip
frameworks_base-b1216dd916e0f5fdec29684120c5bcc904800916.tar.gz
frameworks_base-b1216dd916e0f5fdec29684120c5bcc904800916.tar.bz2
Copy constructors should actually copy stuff.
Bug #5027094 Change-Id: Iab6bf652e0b9bdd1bbc794e7c4218f46bafdd1a4
Diffstat (limited to 'graphics/java/android')
-rw-r--r--graphics/java/android/graphics/Paint.java18
-rw-r--r--graphics/java/android/graphics/drawable/BitmapDrawable.java4
2 files changed, 18 insertions, 4 deletions
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
index 962f22c..163bd4a 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -349,6 +349,18 @@ public class Paint {
mCompatScaling = paint.mCompatScaling;
mInvCompatScaling = paint.mInvCompatScaling;
mBidiFlags = paint.mBidiFlags;
+ hasShadow = paint.hasShadow;
+ mColorFilter = paint.mColorFilter;
+ mMaskFilter = paint.mMaskFilter;
+ mPathEffect = paint.mPathEffect;
+ mRasterizer = paint.mRasterizer;
+ mShader = paint.mShader;
+ mTypeface = paint.mTypeface;
+ mXfermode = paint.mXfermode;
+ shadowColor = paint.shadowColor;
+ shadowDx = paint.shadowDx;
+ shadowDy = paint.shadowDy;
+ shadowRadius = paint.shadowRadius;
}
/** Restores the paint to its default settings. */
@@ -1932,7 +1944,11 @@ public class Paint {
@Override
protected void finalize() throws Throwable {
- finalizer(mNativePaint);
+ try {
+ finalizer(mNativePaint);
+ } finally {
+ super.finalize();
+ }
}
private static native int native_init();
diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java
index 7e03e1c..87421b1 100644
--- a/graphics/java/android/graphics/drawable/BitmapDrawable.java
+++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java
@@ -20,18 +20,16 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
+import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.Shader;
-import android.graphics.BitmapShader;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.Gravity;
-import android.view.View;
-
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;