For rom devs!!
If you want to include this mod into your MIUI rom you have to decompile framework.jar and replace "classes\com\android\internal\util\HanziToPinyin.smali" with the attached one.
HanziToPinyin.smali
If you include it in your rom please give credit by linking to this thread. Thanks
NOTE:
This class changes from time to time due to Chinese T9 improvements, so if you get any error while compiling back framework.jar you'll have to manually edit the stock smali file by replacing the function below: (~line 16213)
Code:
.method public static formatCharToT9(C)C
.registers 4
.parameter "c"
.prologue
const/16 v2, 0x61
const/16 v1, 0x41
.line 1019
if-lt p0, v1, :cond_11
const/16 v0, 0x5a
if-gt p0, v0, :cond_11
.line 1020
sget-object v0, Lcom/android/internal/util/HanziToPinyin;->sT9Map:[C
sub-int v1, p0, v1
aget-char v0, v0, v1
.line 1026
:goto_10
return v0
.line 1021
:cond_11
if-lt p0, v2, :cond_1e
const/16 v0, 0x7a
if-gt p0, v0, :cond_1e
.line 1022
sget-object v0, Lcom/android/internal/util/HanziToPinyin;->sT9Map:[C
sub-int v1, p0, v2
aget-char v0, v0, v1
goto :goto_10
.line 1023
:cond_1e
const/16 v0, 0x30
if-lt p0, v0, :cond_28
const/16 v0, 0x39
if-gt p0, v0, :cond_28
move v0, p0
.line 1024
goto :goto_10
.line 1026
:cond_28
const/4 v0, 0x0
goto :goto_10
.end method
With the one found in HanziToPinyin.smali attached above.
And then compile back.