kdevlab / miui-v5-russian-translation-for-miuiandroid

Russian translation for MIUI v5
9 stars 13 forks source link

Cleaner app FC #24

Closed ingbrzy closed 10 years ago

ingbrzy commented 10 years ago

Guys, do you have any solution for Cleaner app FC on 4.3.4/5/6..?

because of that number format 00,00 and not 00.00...

or where to find that number format definition..?

FC occurs on all langs except CN/EN

Log FC from Mi3W 4.3.5

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.miui.optimizecenter.MainActivity}: java.lang.NumberFormatException: Invalid float: "0,00" at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2214) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2264) at android.app.ActivityThread.access$600(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1259) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5137) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:752) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:568) at miui.dexspy.DexspyInstaller.main(DexspyInstaller.java:170) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NumberFormatException: Invalid float: "0,00" at java.lang.StringToReal.invalidReal(StringToReal.java:63) at java.lang.StringToReal.parseFloat(StringToReal.java:310) at java.lang.Float.parseFloat(Float.java:300) at com.miui.optimizecenter.view.MainFragmentContent.f(MainFragmentContent.java:106) at com.miui.optimizecenter.view.MainFragmentContent.onFinishInflate(MainFragmentContent.java:74) at android.view.LayoutInflater.rInflate(LayoutInflater.java:763) at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at miui.dexspy.DexspyInstaller.invokeOriginalMethodNative(Native Method) at miui.dexspy.DexspyInstaller.invokeOriginalMethod(DexspyInstaller.java:490) at miui.dexspy.DexspyInstaller.handleHookedMethod(DexspyInstaller.java:404) at android.view.LayoutInflater.inflate(Native Method) at com.miui.securitycenter.common.p.onCreateView(BaseFragment.java:22) at android.app.Fragment.performCreateView(Fragment.java:1695) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:885) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1057) at android.app.BackStackRecord.run(BackStackRecord.java:682) at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1435) at android.app.Activity.performStart(Activity.java:5142) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2187) ... 12 more

miuirussia commented 10 years ago

We rewrited some methods in smali (Settings.apk). com/miui/securitycenter/common/AndroidUtils.smali (In mi3 has obfuscated name s.smali): http://pastebin.com/6GB2pPnP

miuirussia commented 10 years ago

In Java (replaced lines marked with // KDG Replaces): http://pastebin.com/HrvYdFpu

ingbrzy commented 10 years ago

Thank you..!

zdunex25 commented 10 years ago

@ingbrzy have you tested it already?: I am getting:

I: Smaling... [203,4] Error for input '.param': Invalid directive [758,4] Error for input '.param': Invalid directive [203,11] mismatched input 'p0' expecting END_METHOD_DIRECTIVE [758,11] mismatched input 'p0' expecting END_METHOD_DIRECTIVE Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: Settings\smali\com\miui\securitycenter\common\AndroidUtils.smali

line 203: .param p0, "var0" # J line 758: .param p0 # J

ingbrzy commented 10 years ago

@zdunex25 not yet.. Bartek will test it later today.. hope it works because this bug is present in 4.3.7 also...

another great move from Xiaomi...

zdunex25 commented 10 years ago

@ingbrzy I believe I have some bad news. I tried this "fix" on Bartek's build from yesterday and it does throw the error I posted right above

miuirussia commented 10 years ago

Use latest smali.jar (2.0.3)

zdunex25 commented 10 years ago

Yeah I just realized that googing it. Going to check it with 2.0.3 now.

EDIT: It works with smali 2.0.3 thanks a lot @miuirussia

Patch for older smali: https://github.com/zdunex25/patchrom_m0/commit/47f2f44e06f5948b03600018780c28bb454549f8

ingbrzy commented 10 years ago

fixed in 4.3.21...

elsorro commented 10 years ago

In 4.4.25 the error is the same... jbart not translate in other languages but have error....

Any solutions?