List of usage examples for java.lang Integer valueOf
@HotSpotIntrinsicCandidate public static Integer valueOf(int i)
From source file:Main.java
public static int getAndroidSDKVersion() { int version = 0; try {/* www . ja v a 2 s . c om*/ version = Integer.valueOf(android.os.Build.VERSION.SDK); } catch (NumberFormatException e) { e.printStackTrace(); } return version; }
From source file:Main.java
public static int getAndroidOSVersion() { int osVersion; try {// w w w . ja va2 s .c o m osVersion = Integer.valueOf(android.os.Build.VERSION.SDK); } catch (NumberFormatException e) { osVersion = 0; } return osVersion; }
From source file:Main.java
public static int getAndroidSDKVersion() { int version = 0; try {//from w ww . ja va 2 s.co m version = Integer.valueOf(android.os.Build.VERSION.SDK_INT); } catch (NumberFormatException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return version; }
From source file:Main.java
public static int getSDKVersionNumber() { int sdkVersion; try {/*from w ww . j av a 2 s . c o m*/ sdkVersion = Integer.valueOf(android.os.Build.VERSION.SDK); } catch (NumberFormatException e) { sdkVersion = 0; } return sdkVersion; }
From source file:Main.java
public static boolean IsFroyo() { if (SDK == null) { SDK = Integer.valueOf(Integer.parseInt(android.os.Build.VERSION.SDK)); }/*w w w. j av a 2 s .c o m*/ return SDK.intValue() == 8; }
From source file:Main.java
public static boolean IsHoneyOrlater() { if (SDK == null) { SDK = Integer.valueOf(Integer.parseInt(android.os.Build.VERSION.SDK)); }/*from w w w . ja v a2 s .c om*/ return SDK.intValue() >= 11; }
From source file:Main.java
public static boolean IsGingerbreadOrlater() { if (SDK == null) { SDK = Integer.valueOf(Integer.parseInt(android.os.Build.VERSION.SDK)); }/*w w w . j av a2s. co m*/ return SDK.intValue() >= 9; }
From source file:Main.java
public static String interceptionString(int version) { String st = Integer.toHexString(version).toString(); int a = Integer.valueOf(st.substring(0, 1)); int b = Integer.valueOf(st.substring(1, 3)); int c = Integer.valueOf(st.substring(3, 5)); st = "v" + a + "." + b + "." + c; return st;//from www .ja v a2s .c o m }
From source file:Main.java
public static int getAndroidOSVersion() { int osVersion; try {// ww w . j a va 2s.c o m osVersion = Integer.valueOf(Build.VERSION.SDK); } catch (NumberFormatException e) { osVersion = 0; } return osVersion; }
From source file:Main.java
public static boolean IsFroyo() { if (SDK == null) SDK = Integer.valueOf(Integer.parseInt(Build.VERSION.SDK)); if (SDK.intValue() == 8) return true; return false; }