Skip to content

Commit

Permalink
Use system property to detect Android
Browse files Browse the repository at this point in the history
  • Loading branch information
diegopl committed Mar 9, 2016
1 parent 40238df commit c238f97
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/com/esotericsoftware/kryo/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@
/** A few utility methods, mostly for private use.
* @author Nathan Sweet <misc@n4te.com> */
public class Util {
static public boolean isAndroid;
static {
try {
Class.forName("android.os.Process");
isAndroid = true;
} catch (Exception ignored) {
}
}
static public boolean isAndroid = "Dalvik".equals(System.getProperty("java.vm.name"));

/** Returns the primitive wrapper class for a primitive class.
* @param type Must be a primitive class. */
Expand Down

0 comments on commit c238f97

Please sign in to comment.