diff --git a/lib_face/src/main/java/com/sw/plate/utils/PrefUtils.java b/lib_face/src/main/java/com/sw/plate/utils/PrefUtils.java index 946b0ad..d57c1d7 100644 --- a/lib_face/src/main/java/com/sw/plate/utils/PrefUtils.java +++ b/lib_face/src/main/java/com/sw/plate/utils/PrefUtils.java @@ -44,6 +44,18 @@ public class PrefUtils { sp.edit().putInt(key, value).commit(); } + public static long getLong(Context ctx, String key, long defaultValue) { + SharedPreferences sp = ctx.getSharedPreferences(PREF_NAME, + Context.MODE_PRIVATE); + return sp.getLong(key, defaultValue); + } + + public static void setLong(Context ctx, String key, long value) { + SharedPreferences sp = ctx.getSharedPreferences(PREF_NAME, + Context.MODE_PRIVATE); + sp.edit().putLong(key, value).commit(); + } + public static float getFloat(Context ctx, String key, float defaultValue) { SharedPreferences sp = ctx.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE);