|
|
|
@ -26,13 +26,10 @@ import androidx.annotation.NonNull;
|
|
|
|
|
import androidx.core.content.ContextCompat;
|
|
|
|
|
import androidx.preference.PreferenceManager;
|
|
|
|
|
import androidx.room.Entity;
|
|
|
|
|
import androidx.room.Ignore;
|
|
|
|
|
import androidx.room.Index;
|
|
|
|
|
import androidx.room.PrimaryKey;
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
|
|
|
|
|
|
@ -67,9 +64,6 @@ public class EntityLog {
|
|
|
|
|
@NonNull
|
|
|
|
|
public String data;
|
|
|
|
|
|
|
|
|
|
@Ignore
|
|
|
|
|
private static Map<Type, Integer> mapColor = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
enum Type {General, Statistics, Scheduling, Network, Account, Protocol, Classification, Notification, Rules}
|
|
|
|
|
|
|
|
|
|
private static final ExecutorService executor =
|
|
|
|
@ -206,12 +200,6 @@ public class EntityLog {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Integer getColor(Context context, Type type) {
|
|
|
|
|
if (!mapColor.containsKey(type))
|
|
|
|
|
mapColor.put(type, _getColor(context, type));
|
|
|
|
|
return mapColor.get(type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static Integer _getColor(Context context, Type type) {
|
|
|
|
|
// R.color.solarizedRed
|
|
|
|
|
switch (type) {
|
|
|
|
|
case General:
|
|
|
|
|