Thursday, January 3, 2013

[android-developers] Re: Weird situation when build with usr mode

Well, you are calling the methods using Reflection.


So, Java doesn't know you are actually using them.


So, the Java compiler just optimizes those methods out.


Maybe you shouldn't use Reflection?



On Thursday, January 3, 2013 2:57:44 AM UTC-6, futurexiong wrote:
Product must be built in usr mode...

在 2013年1月2日星期三UTC+8下午10时30分41秒,bob写道:


On Wednesday, January 2, 2013 2:46:23 AM UTC-6, futurexiong wrote:
I modified createLockScreen method of LockPatternKeyguardView.java in framework,intend to change default LockScreen. In createLockScreen method I use reflection to new my own lockscreen view in my own lockscreen apk which would be installed in /system/app/.
It works fine when i build the entire system with eng mode,


Sounds like you should build it with eng mode.


 
but not fine with usr mode.Log shows me that reflection find no such method in my own lockscreen view. I decompile the apk in each build mode,find out that apk build with usr mode does not have constructor,and some other method are lost either.
Can anyone explain this weird situation for me?
BTW,my apk share uid with android.uid.system and my Android.mk add this line:LOCAL_JAVA_LIBRARIES := android.policy framework because I need to use some internal apis of Keyguard.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment