mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 13:47:05 +02:00
Added menu item to disable main log
This commit is contained in:
@@ -20,8 +20,10 @@ package eu.faircode.email;
|
||||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.Index;
|
||||
import androidx.room.PrimaryKey;
|
||||
@@ -61,6 +63,11 @@ public class EntityLog {
|
||||
static void log(final Context context, String data) {
|
||||
Log.i(data);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean main_log = prefs.getBoolean("main_log", true);
|
||||
if (!main_log)
|
||||
return;
|
||||
|
||||
final EntityLog entry = new EntityLog();
|
||||
entry.time = new Date().getTime();
|
||||
entry.data = data;
|
||||
|
||||
Reference in New Issue
Block a user