From 89b07ea50cdb0bd9079590edc55013b5ff0efacd Mon Sep 17 00:00:00 2001 From: Hongyu Zhang Date: Sun, 1 Apr 2012 09:10:12 +0800 Subject: PinyinIME crashed in userdebug version The root cause of this issue is nativeImOpenDecoder method is optimized by JAVA compiler in userdebug version. And JVM could not find this symbol in the virtual table of PinyinDecoderService class, and this will cause JNI library load fail. Solution is avoid this optimization. Change-Id: I095860c407877ca3b9184cc82fa5c0c0d71302c0 Author: Hongyu Zhang Signed-off-by: Xiaokang Qin Signed-off-by: Bruce Beare Signed-off-by: Jack Ren Author-tracking-BZ: 22639 --- Android.mk | 3 +++ proguard.flags | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 proguard.flags diff --git a/Android.mk b/Android.mk index d390749..6512720 100644 --- a/Android.mk +++ b/Android.mk @@ -22,6 +22,9 @@ LOCAL_PROGUARD_FLAG_FILES := proguard.cfg # Make sure our dictionary file is not compressed, so we can read it with # a raw file descriptor. LOCAL_AAPT_FLAGS := -0 .dat +LOCAL_AAPT_FLAGS += -0 .dict + +LOCAL_PROGUARD_FLAG_FILES := proguard.flags include $(BUILD_PACKAGE) diff --git a/proguard.flags b/proguard.flags new file mode 100644 index 0000000..2888038 --- /dev/null +++ b/proguard.flags @@ -0,0 +1,3 @@ +-keep class com.android.inputmethod.pinyin.PinyinDecoderService { + *; +} -- cgit v1.2.3