forked from EsotericSoftware/kryo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use system property to detect Android
- Loading branch information
Showing
1 changed file
with
1 addition
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,14 +24,7 @@ | |
/** A few utility methods, mostly for private use. | ||
* @author Nathan Sweet <[email protected]> */ | ||
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. */ | ||
|