|
|
@ -125,10 +125,14 @@ public class EntityRule {
|
|
|
|
private static ExecutorService executor = Helper.getBackgroundExecutor(1, "rule");
|
|
|
|
private static ExecutorService executor = Helper.getBackgroundExecutor(1, "rule");
|
|
|
|
|
|
|
|
|
|
|
|
static boolean needsHeaders(List<EntityRule> rules) {
|
|
|
|
static boolean needsHeaders(List<EntityRule> rules) {
|
|
|
|
|
|
|
|
return needs(rules, "header");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static boolean needs(List<EntityRule> rules, String what) {
|
|
|
|
for (EntityRule rule : rules)
|
|
|
|
for (EntityRule rule : rules)
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
JSONObject jcondition = new JSONObject(rule.condition);
|
|
|
|
JSONObject jcondition = new JSONObject(rule.condition);
|
|
|
|
if (jcondition.has("header"))
|
|
|
|
if (jcondition.has(what))
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
Log.e(ex);
|
|
|
|
Log.e(ex);
|
|
|
|