mirror of
https://github.com/FossifyOrg/Camera.git
synced 2026-06-12 18:17:28 -04:00
allow disabling the Long tap tp capture feature
This commit is contained in:
24
app/src/main/java/com/simplemobiletools/camera/Config.java
Normal file
24
app/src/main/java/com/simplemobiletools/camera/Config.java
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user