Thread: K5 JBPatch
View Single Post
Old 01-01-2013, 03:33 PM   #999
ghudod
Connoisseur
ghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toys
 
Posts: 56
Karma: 5502
Join Date: Oct 2012
Device: none
Quote:
Originally Posted by ixtab View Post
Thank you for providing that really helpful input (honest!) - you're right again, the settings actually are preserved, and do work as long as they're >= 50. Now, does anybody know a sane way of finding out where these suckers hid that "if margin < 50 (or >=50)" switch, inside all of their horribly obfuscated code? That PW is really cracking me up

PS: No, it's not the "reader.content.[(left)|(right)]Margin" settings which determine the PDF margins, I just tried that. And there doesn't seem to be any other related number with the value of "50" in the settings either. *sigh*.

PPS: The only place where the "font.wordsperline.margin.list" setting of the com.amazon.ebook.booklet.reader.resources.ReaderRe sources file is (seemingly) read is inside the com.amazon.ebook.booklet.reader.impl.ui.yd class (the FontDialog class), which is already patched by this patch. So that value of "50" is most probably hardcoded somewhere, but I simply don't know how to find out where.
ixtab, how about using grep and regex to search all source files for the margin-checking logic? (presumably X >= 50 or X < 50)

Something like:
grep -PHn '>=\s*?50|<\s*?50' *.java

That searches all Java files and displays filename and line number where "< 50" or ">= 50" is found (whitespace is accounted for). There will probably be some false positive, but it's certainly better than searching with eyeball.
ghudod is offline   Reply With Quote