-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Noticed this issue while browsing through Mat.scala, notably, on in the getOS function:
final val OS_WINDOWS = 0;
final val OS_LINUX = 1;
final val OS_OSX = 2;
final val OS_ANDROID = 3;
def getOS:Int = {
val osname = System.getProperty("os.name");
if (osname.startsWith("Windows")) OS_WINDOWS
else if (osname.startsWith("Linux")) OS_LINUX
else if (osname.startsWith("Mac")) OS_OSX
else OS_ANDROID
}
val ostype = getOS
According to http://developer.android.com/reference/java/lang/System.html#getProperty(java.lang.String), System.getProperty("os.name")
always returns "Linux"
on Android.
Seems like another way might be to check System.getProperty("java.vendor")
for "The Android Project"
, then System.getProperty("os.name")
for the remaining platforms?
Metadata
Metadata
Assignees
Labels
No labels