Fixed dynamic reload rules fail when no rules activated

This commit is contained in:
PeratX 2017-08-24 23:53:14 +08:00
parent 97625045b2
commit 503d122abe
2 changed files with 3 additions and 2 deletions

View File

@ -12,13 +12,11 @@ import android.net.Uri;
import android.os.Build;
import android.preference.PreferenceManager;
import android.util.Log;
import com.google.firebase.crash.FirebaseCrash;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonParseException;
import com.google.gson.stream.JsonReader;
import org.itxtech.daedalus.activity.MainActivity;
import org.itxtech.daedalus.service.DaedalusVpnService;
import org.itxtech.daedalus.util.Configurations;
@ -175,6 +173,8 @@ public class Daedalus extends Application {
break;
}
}
} else {
RuleResolver.clear();
}
}
}

View File

@ -62,6 +62,7 @@ public class RuleResolver implements Runnable {
public static void clear() {
rulesA = null;
rulesAAAA = null;
}
public static String resolve(String hostname, Record.TYPE type) {