allow disabling the Long tap tp capture feature

This commit is contained in:
tibbi
2016-06-18 18:16:43 +02:00
parent 68e7a8de1e
commit 4fdfa9b157
7 changed files with 77 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
package com.simplemobiletools.camera;
import android.content.Context;
import android.content.SharedPreferences;
public class Config {
private SharedPreferences prefs;
public static Config newInstance(Context context) {
return new Config(context);
}
public Config(Context context) {
prefs = context.getSharedPreferences(Constants.PREFS_KEY, Context.MODE_PRIVATE);
}
public boolean getLongTapEnabled() {
return prefs.getBoolean(Constants.LONG_TAP, true);
}
public void setLongTapEnabled(boolean enabled) {
prefs.edit().putBoolean(Constants.LONG_TAP, enabled).apply();
}
}