FileDocCategorySizeDatePackage
OS.javaAPI DocAndroid 1.5 API1522Wed May 06 22:41:10 BST 2009com.android.hierarchyviewer.util

OS

public class OS extends Object

Fields Summary
private static boolean
macOs
private static boolean
leopard
private static boolean
linux
private static boolean
windows
Constructors Summary
Methods Summary
public static booleanisLeopardOrLater()

        return leopard;
    
public static booleanisLinux()

        return linux;
    
public static booleanisMacOsX()

        String osName = System.getProperty("os.name");
        macOs = "Mac OS X".startsWith(osName);
        linux = "Linux".startsWith(osName);
        windows = "Windows".startsWith(osName);

        String version = System.getProperty("os.version");
        final String[] parts = version.split("\\.");
        leopard = Integer.parseInt(parts[0]) >= 10 && Integer.parseInt(parts[1]) >= 5;
    
        return macOs;
    
public static booleanisWindows()

        return windows;