v0.7.4: increased minSDK to 9(android 2.3) from 8(android 2.2)

This commit is contained in:
Evan Debenham
2019-06-03 19:23:10 -04:00
parent c91af78699
commit d67a4bf021
15 changed files with 13 additions and 204 deletions

View File

@@ -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();
}
}