Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stepping through Android code on the phone - big line number discrepancy

I am trying to debug some code related to ListView on Samsung Captivate (Galaxy S). I put breakpoint somewhere in my code and when it stops I go back on the stack few frames to the ListView source.

Now, I can expect that there would be some mismatch as my phone probably has slightly different version of Android classes than source code that I use in my IDE. However, I get a discrepancy of over 300 lines. I don't see this discrepancy on emulator.

More over, stack trace shows ListView line number 3688 for method performItemClick() while ListView source only has 3644 lines and this method appears in it on line 3395. I looked at different versions of Android code and none of them has performItemClick() much closer to line 3688.

The only explanation I can think of is that Samsung changed Android code so much, but I can't see why would they do such change.

Is there some other reason that I am missing? Is there any way to force debugger to adjust lines automatically as currently I just can't step through this code?

like image 236
Alex Gitelman Avatar asked May 21 '11 21:05

Alex Gitelman


1 Answers

Trying different versions won't help. Samsung modifies their framework code and they do not release the changes. I ran into the same problem with my Samsung Charge smartphone. They probably deal with the Galaxy in the same way. This is an unfortunate reality of the Apache license.

When I contacted Samsung about the issue I got the following response (with minor edits):

FRG83 android-2.2.1_r1 is [the right version number for the Samsung Charge].

Also, ''ListView.java'' file does not match between file on the phone and google original, because we modified it.

ListView.java is covered under Apache license which has no obligation to publish source code.

Please understand that we only publish open source codes that are covered licenses which have obligation of publishing.(ex. GPL, LGPL, MPL...etc).

The reason for mentioning ''Get android open source'' is only for build our Open source code.

like image 139
speedplane Avatar answered Oct 26 '22 16:10

speedplane