[Desire HD Android Development] Bachar David:
RTL FIX

Hi Mike,

Last week we spoke about the full RTL fix, as you ask me I found the code for the fix.

I did not do anything I just bring you the fix so you can include it with your rom.

The first link is a post about this fix, http://iandroid.co.il/hero-nexus/?p=7474, I know you dont understand heb so I used the google translate :

"

Hebrew to English translation

The Hebrew Android - Evolution

19

01

2011

"Patches Hebrew" Hebrew fixes "- let's call a bit impressed.

Even if you do not understand the terminology, you should not abandon, and read to the end, only to see and understand, work done and getting here is not simple and easy, get to know the names / Police engaged in this holy work, and cherish them for their efforts. You can also comment this post.

Since I did not found the technical details, I just copy the coverage of classicaldude - Ron Regev, Developer's Forum Chefs Forum.

"

Four levels of display text

1. Most of the text is formatted by the Library in Java StaticLayout. Android developers include basic algorithms for co - directional library, forcing that, Hebrew was shown generally true, but numbers were presented in paragraph Hebrew from right to left as well. Punctuation well behaved irrationally. Alignment of the paragraph is determined by the Layout Library, originally the paragraph will be determined by directionality first character in it (which made a complete mess in messaging software with user names in English and Hebrew text.) Transition from 2.1 to 2.2 developers were playing with the settings in StaticLayout functions and Library building, and in fact exacerbated the situation further.

The problem was first corrected numbers by yes-men say. He tried to hand over its source code to Google, but they rejected him. Akeinug Chen did not reject it, so about a year ago, started a tradition CM Enhanced support for displaying Hebrew. Later Eran Mizrahi (Our erasmux) and I sat on all the punctuation problems remaining in StaticLayout brought the text to show a parallel, more or less, that of a PC. Align the paragraph states that even one Hebrew character container paragraph will be aligned right, what works in the percentage of critical cases .

2. Some applications, as well as Gmail, for example, not using the on-StaticLayout, but directly in the library function drawText Canvas. Android developers there did not include any support in C directional and therefore bearing emails Gmail are reversed. Some Android Developers Arabic project began to find solutions to the problem, and immediately closed the code and tried to make money on it. These were not complete solutions. Dudi Cohen (dudyk) took the matter into their own hands and created there - where an algorithm for co - directional library Canvas. His work also came to the CM, since the titles Gmail straight. However, my uncle's algorithm has some problems with punctuation, and amended by erasmux. Since version 6.1 of CM also calling for direct application to drawText display Hebrew correctly.

3. Essentially graphical applications, like Google's navigation software, mostly use Paint Library, which also had no support for text two - way. David added that too, and - by the way has collaborated with Arab developers got to display properly support Arabic, which is a problem of having to design - again according to the letters of neighboring letters.

4. In fact, there is no reason key format the user interface of his application in any language other than Java. But in some cases developers have decided, or other such reasons, they want their code to be native - that is, not run the virtual machine environment that most of Android, but will run directly on the basic code of the operating system. For example, daily headlines events in the calendar, the weather, the calendar version of the HTC, and tags Gmail. Of course - even here there was no support in C - directional. David created a dialog reading algorithm - Directions made, in every application that tries to format text directly with native code system will be directed through the JNI (Java acronym for Native Interface) to the same algorithm.

David has created a problem here. Last spring I discovered the non-discovery - to - to - so - amazing you can use tools baksmali and smali to move libraries Java Mkomplut framework.jar from one to another file. That is, to correct the Hebrew libraries Java manufacturers of Romans we had to compile the source code and plant these specific directories. Because manufacturers have not changed the code of Google, it worked.

But with my uncle in the patch for native was part of the code written in C, which is impossible to reverse engineer as easily as possible with Java. That's the advantage of CM - all code is open, you can change everything. Change my uncle did the native code was included in libandroid_runtime.so, it all changes phone manufacturer, and the code are not releasing.

Here again erasmux entered the picture, separating the patches Java-native fix. I created the script based on the correct framework.jar erasmux's work, which the Romans solved the problems of manufacturers and 1 to 3, but not the problem 4.

I was sitting, Akimplti the libandroid_runtime.so from source the original version corrected version, and compared between them in hex editor. The difference between the files was one byte. It did not help much, because I have not found the arms and legs in dismantling the hex file of the HTC, for example. I'm a pianist, not a programmer ... Fortunately, I turned my attention mena this regard, he found immediately how to fix the HTC file to include the same change of size. He sent me the file, and I looked CM code (all algorithms at this stage of dudyk, of my little erasmux) the libraries Java corresponding to the new file. The result was a patch I published the other day, which increases the Hebrew support of Rum Sense of Mudako for HTC Edizyr level of CM6.1. I mean - no more problems of Hebrew calendar, in Y. mail, gallery, in swype, music player, or elsewhere.

The only problem yet to be resolved at the top of Sens is vocalized words mail messages or Web pages will all be showing their line in reverse. Romans Orange and other devices, for example, this issue is resolved - but the level of native code, it has been much more difficult to import to other devices. At this point I will refer to this problem is negligible, although I am convinced that it would be a solution soon.

Between Android 2.2 to 2.3 did not apply any changes to the code of any text formatting mentioned levels. "

I was impressed, and more, I realized not an easy job, and extends appreciation for those involved in it.

«I have a confession! Actually more than one

http://iandroid.co.il/hero-nexus/?p=7461"

So there is another post again I used the translator :

"

Hebrew to English translation

I have a confession! Actually more than one

19

01

2011

Hebrew problem is known to all Android starts. Almost every forum every device has several posts about the Hebrew fixes - more expanded.

For a long time, personally I've "fix" (and soon you will understand why it is in quotation marks), more than a few different instruments and some Roman. Sometimes it was for personal use, and often in response to requests.

Search this Forum up the ridiculousness.

Search results list appears quite respectable name (in my opinion, at least), "created a patch Zevik," "rum with the patch of Zevik", and those on this road.

I always felt uncomfortable with it, because you do not I created a patch, just use the patch appeared in the forum, written by Ron Regev Nico classicaldude better known, in this cluster. (Ron Regev's part in this complex story is creating a script, the patch itself are responsible for additional names as erasmux, dudyk and mena, and that a separate post to tell the sequence of things to this point.)

This is the first confession. I received an assessment of the no fault of my own.

More ridiculous is, that I followed the cluster almost since he was first (May 2010), I was left with Hebrew tikkun of the previous generation. Amendment Order only the digits and letters combined problem, (the manual patch where post), and moreover he did not order the Hebrew gallery The headers in Gmail, Google Talk and in districts, it is also cumbersome and complicated.

If only I was watching I know the great script that does the job perfectly.

Not accurate I did not know him, I knew him. ("What do you say, I knew or did not know"?) Only had a little experience failed him at the very beginning of the road, and education to try it again later.

Chance, Achsabaksti the help of Ron Regev email, he asked me to check the new version beta script, after I tried it and good luck - it should be noted, just grinned about myself, where I was all those years this script came and I knew him, and I used it.

I copy here the list of solutions you get running the script, from the cluster dealing with the matter, see here.

1. Hebrew fonts installed. Android 2.2 includes Hebrew fonts built in, and they are certainly beautiful - but do not include emphases. Fonts of the amendment also included.

2. Inversion problem fix numbers in the Hebrew text message headers and repair reversal in the other's mail and applications. Also have the option to correct the situation where a contact image hiding text messaging app's original Android and Google Talk.

3. Hebrew Keyboard offers true fine words, and not the opposite. There are other keyboards are good, but it's a tested, worthy, reliable and free.

4. Hebrew problem patch generic calendar Android (HTC's not) and the gallery three - dimensional

5. Details about the emails alignment problems.

6. Hebrew patch opposite the navigation of Google (brut maps).

7. Fix situation where names of people widget HTC contacts flashing. This amendment requires a wipe of the cache partition and the dalvik cache to work. Learn more here.

Incidentally, I had to try since yesterday the script twice, the Android 2.3, it works outstanding.

It should be mentioned that there are two choices for running the script, patch file regardless of the device, (in case you want to make rum, which includes the amendments), and repair works on a specific device, connection device to a computer, he knows to retrieve the file, fix it, plant it back.

I had to unpack.

«Rum to nexus includes fixes Hebrew s

The Hebrew Android - Evolution »

"

The fix you can download from here: http://rapidshare.com/files/444013338/hebfixv2.zip

sorry it long, if I can help in any way I be more then glad to do so.

I dont have any credit.