[HTC One X] mtb2104:
Hi dekkyy,

Appreciate your help with HTC_IME.apk...

But I am still facing issues with Contact with Chinese character :D

It seems all result from HanziToPinyin or related java according to the logcat

In version 16, everything works fine.. here is part of the log

D/HanziToPinyinHelper( 4073): Read
D/HanziToPinyinHelper( 4073): [1]ms to load data file
V/ContactSaveService( 4272): Saved contact. New URI: content://com.android.contacts/contacts/lookup/1234567890/370
D/ContactEditorFragment( 4272): onSaveCompleted(0, content://com.android.contacts/contacts/lookup/1234567890/370

However, in version 22, may it be syncing an existing contact with Chinese character, or updating the contact with Chinese character, it will crash... log here

E/DatabaseUtils( 1163): Writing exception to parcel
E/DatabaseUtils( 1163): java.lang.NullPointerException
E/DatabaseUtils( 1163):	at miui.util.HanziToPinyinHelper.getPinyinString(HanziToPinyinHelper.java:82)
E/DatabaseUtils( 1163):	at miui.util.HanziToPinyin.get(HanziToPinyin.java:328)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.ContactLocaleUtils$ChineseContactUtils.getSortKey(ContactLocaleUtils.java:65)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.ContactLocaleUtils.getSortKey(ContactLocaleUtils.java:170)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.ContactsDatabaseHelper.updateRawContactDisplayName(ContactsDatabaseHelper.java:5018)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.DataRowHandler.fixRawContactDisplayName(DataRowHandler.java:324)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.DataRowHandlerForStructuredName.update(DataRowHandlerForStructuredName.java:91)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.ContactsProvider2.updateData(ContactsProvider2.java:4510)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.ContactsProvider2.updateData(ContactsProvider2.java:4494)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.ContactsProvider2.updateInTransaction(ContactsProvider2.java:4023)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.AbstractContactsProvider.update(AbstractContactsProvider.java:140)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.ContactsProvider2.update(ContactsProvider2.java:2153)
E/DatabaseUtils( 1163):	at android.content.ContentProviderOperation.apply(ContentProviderOperation.java:229)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.AbstractContactsProvider.applyBatch(AbstractContactsProvider.java:208)
E/DatabaseUtils( 1163):	at com.android.providers.contacts.ContactsProvider2.applyBatch(ContactsProvider2.java:2272)
E/DatabaseUtils( 1163):	at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:219)
E/DatabaseUtils( 1163):	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:214)
E/DatabaseUtils( 1163):	at android.os.Binder.execTransact(Binder.java:338)
E/DatabaseUtils( 1163):	at dalvik.system.NativeStart.run(Native Method)
D/ContactsSyncAdapter( 3294): FAILURE: processed 1 records in 565 ms from feed http://www.google.com/m8/feeds/contacts/abc1234567890@gmail.com/base2_property-android_linksto-gprofiles, updated time is 2012-06-29T06:31:48.059Z
W/dalvikvm( 3294): threadid=23: thread exiting with uncaught exception (group=0x40a81228)
E/AndroidRuntime( 3294): FATAL EXCEPTION: SyncAdapterThread-1
E/AndroidRuntime( 3294): java.lang.NullPointerException
E/AndroidRuntime( 3294):	at android.os.Parcel.readException(Parcel.java:1338)
E/AndroidRuntime( 3294):	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:181)
E/AndroidRuntime( 3294):	at android.database.DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(DatabaseUtils.java:158)
E/AndroidRuntime( 3294):	at android.content.ContentProviderProxy.applyBatch(ContentProviderNative.java:509)
E/AndroidRuntime( 3294):	at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:120)
E/AndroidRuntime( 3294):	at com.google.android.syncadapters.contacts.ContactsSyncAdapter.applyOperations(ContactsSyncAdapter.java:1283)
E/AndroidRuntime( 3294):	at com.google.android.syncadapters.contacts.ContactsSyncAdapter.getServerDiffs(ContactsSyncAdapter.java:1138)
E/AndroidRuntime( 3294):	at com.google.android.syncadapters.contacts.ContactsSyncAdapter.innerPerformSync(ContactsSyncAdapter.java:293)
E/AndroidRuntime( 3294):	at com.google.android.syncadapters.contacts.ContactsSyncAdapter.onPerformLoggedSync(ContactsSyncAdapter.java:180)
E/AndroidRuntime( 3294):	at com.google.android.common.LoggingThreadedSyncAdapter.onPerformSync(LoggingThreadedSyncAdapter.java:33)
E/AndroidRuntime( 3294):	at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:247)
D/filemap ( 870): FileMap::releaseMemory 0x9e9420 /system/framework/framework-res.apk
D/filemap ( 870): FileMap::releaseMemory 0x9e9530 /system/framework/framework-res.apk
D/filemap ( 870): FileMap::releaseMemory 0x9ea790 /system/framework/com.htc.resources.apk
D/filemap ( 870): FileMap::releaseMemory 0x9ea810 /system/framework/com.htc.resources.apk
D/filemap ( 870): FileMap::releaseMemory 0x9ef1d8 /system/framework/framework-htc-res.apk
D/filemap ( 870): FileMap::releaseMemory 0x9ef268 /system/framework/framework-htc-res.apk
D/filemap ( 870): FileMap::releaseMemory 0xa00400 /system/framework/framework-miui-res.apk
D/filemap ( 870): FileMap::releaseMemory 0xa02488 /system/framework/framework-miui-res.apk
D/filemap ( 870): FileMap::releaseMemory 0xa39fe0 /system/app/MiuiSystemUI.apk
D/filemap ( 870): FileMap::releaseMemory 0xa37f98 /system/app/MiuiSystemUI.apk
E/EmbeddedLogger( 578): App crashed! Process: com.google.process.gapps
E/EmbeddedLogger( 578): App crashed! Package: com.google.android.syncadapters.contacts v15 (4.0.3-239410)
E/EmbeddedLogger( 578): App crashed! Package: com.google.android.gsf v15 (4.0.3-239410)
E/EmbeddedLogger( 578): App crashed! Package: com.google.android.syncadapters.bookmarks v15 (4.0.3-239410)
E/EmbeddedLogger( 578): Application Label: <MULTIPLE_PACKAGE>

I tried to use apktool to look at HanziToPinyinHelper.... can't really see much difference with my untrained eye :D

can you guide me how to solve it?

Thanks!