diff --git a/app/src/main/java/eu/faircode/email/ActivityBase.java b/app/src/main/java/eu/faircode/email/ActivityBase.java
index e5b091590e..2c17bf7109 100644
--- a/app/src/main/java/eu/faircode/email/ActivityBase.java
+++ b/app/src/main/java/eu/faircode/email/ActivityBase.java
@@ -166,11 +166,16 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
d.setTint(Color.WHITE);
d.draw(canvas);
- int colorPrimary = colorPrimaryDark;
- if (colorPrimary != 0 && Color.alpha(colorPrimary) != 255) {
- Log.w("Task color primary=" + Integer.toHexString(colorPrimary));
- colorPrimary = ColorUtils.setAlphaComponent(colorPrimary, 255);
- }
+ boolean task_description = prefs.getBoolean("task_description", true);
+ int colorPrimary;
+ if (task_description) {
+ colorPrimary = colorPrimaryDark;
+ if (colorPrimary != 0 && Color.alpha(colorPrimary) != 255) {
+ Log.w("Task color primary=" + Integer.toHexString(colorPrimary));
+ colorPrimary = ColorUtils.setAlphaComponent(colorPrimary, 255);
+ }
+ } else
+ colorPrimary = getColor(R.color.lightBluePrimary);
ActivityManager.TaskDescription td = new ActivityManager.TaskDescription(
null, bm, colorPrimary);
diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java
index fd2c0ff411..25af878b54 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java
@@ -168,6 +168,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private SwitchCompat swAutostart;
private SwitchCompat swEmergency;
private SwitchCompat swWorkManager;
+ private SwitchCompat swTaskDescription;
private SwitchCompat swExternalStorage;
private TextView tvExternalStorageFolder;
private SwitchCompat swIntegrity;
@@ -276,7 +277,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
"crash_reports", "cleanup_attachments",
"watchdog", "experiments", "main_log", "main_log_memory", "protocol", "log_level", "debug", "leak_canary",
"test1", "test2", "test3", "test4", "test5",
- "emergency_file", "work_manager", // "external_storage",
+ "emergency_file", "work_manager", "task_description", // "external_storage",
"sqlite_integrity_check", "wal", "sqlite_checkpoints", "sqlite_analyze", "sqlite_auto_vacuum", "sqlite_sync_extra", "sqlite_cache",
"oauth_tabs",
"chunk_size", "thread_range",
@@ -410,6 +411,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swAutostart = view.findViewById(R.id.swAutostart);
swEmergency = view.findViewById(R.id.swEmergency);
swWorkManager = view.findViewById(R.id.swWorkManager);
+ swTaskDescription = view.findViewById(R.id.swTaskDescription);
swExternalStorage = view.findViewById(R.id.swExternalStorage);
tvExternalStorageFolder = view.findViewById(R.id.tvExternalStorageFolder);
swIntegrity = view.findViewById(R.id.swIntegrity);
@@ -1096,6 +1098,13 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
}
});
+ swTaskDescription.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton v, boolean isChecked) {
+ prefs.edit().putBoolean("task_description", isChecked).apply();
+ }
+ });
+
swExternalStorage.setEnabled(Helper.getExternalFilesDir(getContext()) != null);
swExternalStorage.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
@@ -2315,6 +2324,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swAutostart.setChecked(Helper.isComponentEnabled(getContext(), ReceiverAutoStart.class));
swEmergency.setChecked(prefs.getBoolean("emergency_file", true));
swWorkManager.setChecked(prefs.getBoolean("work_manager", true));
+ swTaskDescription.setChecked(prefs.getBoolean("task_description", true));
swExternalStorage.setChecked(prefs.getBoolean("external_storage", false));
swIntegrity.setChecked(prefs.getBoolean("sqlite_integrity_check", true));
diff --git a/app/src/main/res/layout/fragment_options_misc.xml b/app/src/main/res/layout/fragment_options_misc.xml
index 6112063155..55b794d802 100644
--- a/app/src/main/res/layout/fragment_options_misc.xml
+++ b/app/src/main/res/layout/fragment_options_misc.xml
@@ -997,6 +997,18 @@
app:layout_constraintTop_toBottomOf="@id/swEmergency"
app:switchPadding="12dp" />
+
+
Autostart app
Write emergency file
Initialize work manager
+ Set task description
Use external storage
sqlite integrity check
sqlite WAL