tags:

views:

31

answers:

1

Is there a way to test, from within an android app, if the device it's running on is actually using the Froyo JIT?

I ask because I know that 2.2 has a JIT, but we've already had a few test builds that seem to lack the JIT. So it's not a case where you can just test for the api version and be assured you've got the JIT.

A: 

Looks like you can use reflection to see if java.lang.Compiler exists and then to try calling some methods on it to see if they work or return nulls.

http://developer.android.com/reference/java/lang/Compiler.html

Keith Twombley
Upon closer inspection, the Android team chose not to implement the compileClass method (and I assume the other java.lang.Compiler methods) leaving me with no idea how to detect a JIT.
Keith Twombley