From 30ca5cd11a23f06f2f8eeaa587685450826f800f Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Mon, 7 May 2012 17:45:44 -0700 Subject: Fix bug #6408393 Character corruption is caused when locale is changed - free the TextLayoutCache on Locale change - also free TextLayoutCache when memory is low Change-Id: I39a37ac8ec3c292cfb1c0eea4bb41ff71897d089 --- graphics/java/android/graphics/Canvas.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'graphics/java/android') diff --git a/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java index 7e9297381733..3949afdd4a2a 100644 --- a/graphics/java/android/graphics/Canvas.java +++ b/graphics/java/android/graphics/Canvas.java @@ -1617,6 +1617,13 @@ public class Canvas { */ public static native void freeCaches(); + /** + * Free up text layout caches + * + * @hide + */ + public static native void freeTextLayoutCaches(); + private static native int initRaster(int nativeBitmapOrZero); private static native void native_setBitmap(int nativeCanvas, int bitmap); private static native int native_saveLayer(int nativeCanvas, RectF bounds, -- cgit v1.2.3-59-g8ed1b