mirror of
https://github.com/SimpleMobileTools/Simple-Flashlight.git
synced 2025-04-06 22:51:12 +02:00
25 lines
654 B
Java
25 lines
654 B
Java
package com.simplemobiletools.flashlight;
|
|
|
|
import android.content.Context;
|
|
import android.content.SharedPreferences;
|
|
|
|
public class Config {
|
|
private SharedPreferences mPrefs;
|
|
|
|
public static Config newInstance(Context context) {
|
|
return new Config(context);
|
|
}
|
|
|
|
public Config(Context context) {
|
|
mPrefs = context.getSharedPreferences(Constants.PREFS_KEY, Context.MODE_PRIVATE);
|
|
}
|
|
|
|
public boolean getIsFirstRun() {
|
|
return mPrefs.getBoolean(Constants.IS_FIRST_RUN, true);
|
|
}
|
|
|
|
public void setIsFirstRun(boolean firstRun) {
|
|
mPrefs.edit().putBoolean(Constants.IS_FIRST_RUN, firstRun).apply();
|
|
}
|
|
}
|