v0.7.4: increased minSDK to 9(android 2.3) from 8(android 2.2)
This commit is contained in:
@@ -92,30 +92,16 @@ public class GameSettings {
|
||||
}
|
||||
}
|
||||
|
||||
//android 2.3+ supports apply, which is asyncronous, much nicer
|
||||
|
||||
public static void put( String key, int value ) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
|
||||
get().edit().putInt(key, value).apply();
|
||||
} else {
|
||||
get().edit().putInt(key, value).commit();
|
||||
}
|
||||
get().edit().putInt(key, value).apply();
|
||||
}
|
||||
|
||||
public static void put( String key, boolean value ) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
|
||||
get().edit().putBoolean(key, value).apply();
|
||||
} else {
|
||||
get().edit().putBoolean(key, value).commit();
|
||||
}
|
||||
get().edit().putBoolean(key, value).apply();
|
||||
}
|
||||
|
||||
public static void put( String key, String value ) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
|
||||
get().edit().putString(key, value).apply();
|
||||
} else {
|
||||
get().edit().putString(key, value).commit();
|
||||
}
|
||||
get().edit().putString(key, value).apply();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user