Hi,

I'm porting Android on a new architecture called XBurst, just like arm
and x86.

I did the following things:

1. Build a new toolchain for XBurst.
2. Porting the Linux 2.6.27 kernel to XBurst.
3. Porting the Android libc called bionic to XBurst (added syscalls,
linker etc.)
4. Use the generic C implementation of Dalvik VM (the quicker way for
me, next I will port it to XBurst)

Now, Android can be run successfully on XBurst and most applications
work normally.

But there is one problem with the String's equals() method. Some Java
codes using this method
get a wrong return value. For example:


String str1 = "android.intent.action.VIEW";
String str2 = "android.intent.action.PICK";
String str3 = "android.intent.action.GET_CONTENT";
Boolean res1, res2;

res1 = str1.equals(str2);
res2 = str1.equals(str3);

I ran these codes on the Android's emulator and they returned
res1=false and res2=false. (They are correct)

But when I ran them on XBurst, they returned res1=true and res2=false.
(They are wrong)

I did several tests with different strings and found that when the two
strings have different length, the method
can return a correct value. While they have the same length, the
method return a wrong value.

Then I ran above codes with dalvikvm on the command shell, and found
that they returned res1=false
and res2=false. (They are correct)

The difference is that the wrong one was got when the Android runtime
startuped and while the correct
one is just running .jar file on the command shell with dalvikvm.

So I guessed this should be the Android runtime problem when using the
generic C implementation of Dalvik VM.

Can anyone tell me the true reason? Is it a bug of the Android runtime
codes? Or is there other ways to help me to locate the issue?

Any suggestions are appreciated.

-
Peter





--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to