AppFilter: update
This commit is contained in:
parent
cb08d9ddeb
commit
1bc68d0c89
@ -40,7 +40,6 @@ import java.util.Objects;
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
public class AppFilterActivity extends AppCompatActivity {
|
||||
|
||||
private RecyclerViewAdapter adapter;
|
||||
|
||||
@Override
|
||||
@ -78,7 +77,7 @@ public class AppFilterActivity extends AppCompatActivity {
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private class AppObject {
|
||||
private static class AppObject {
|
||||
private String appName;
|
||||
private String appPackageName;
|
||||
private Drawable appIcon;
|
||||
@ -111,13 +110,11 @@ public class AppFilterActivity extends AppCompatActivity {
|
||||
|
||||
void updateList(ArrayList<AppObject> appObjects) {
|
||||
appList = appObjects;
|
||||
|
||||
for (int i = 0; i < appObjects.size(); i++) {
|
||||
if (Daedalus.configurations.getAppObjects().contains(appObjects.get(i).appPackageName)) {
|
||||
checkStatus.put(i, true);
|
||||
}
|
||||
}
|
||||
|
||||
runOnUiThread(this::notifyDataSetChanged);
|
||||
}
|
||||
|
||||
@ -158,7 +155,7 @@ public class AppFilterActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private class RecyclerViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||
private static class RecyclerViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||
private ImageView appIcon;
|
||||
private TextView appName;
|
||||
private CheckBox appCheck;
|
||||
@ -172,7 +169,6 @@ public class AppFilterActivity extends AppCompatActivity {
|
||||
itemView.setOnClickListener(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (appCheck.isChecked()) {
|
||||
|
@ -151,7 +151,6 @@ public class DnsTestFragment extends ToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private StringBuilder testServer(DnsQuery dnsQuery, Record.TYPE type, AbstractDnsServer server, String domain, StringBuilder testText) {
|
||||
Logger.debug("Testing DNS server " + server.getRealName());
|
||||
testText.append(getString(R.string.test_domain)).append(" ").append(domain).append("\n")
|
||||
|
@ -15,7 +15,7 @@ import org.itxtech.daedalus.service.DaedalusVpnService;
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
public class ProviderPicker {
|
||||
public abstract class ProviderPicker {
|
||||
public static final int DNS_QUERY_METHOD_UDP = 0;
|
||||
public static final int DNS_QUERY_METHOD_TCP = 1;
|
||||
public static final int DNS_QUERY_METHOD_TLS = 2;
|
||||
|
@ -91,7 +91,7 @@ public class DaedalusVpnService extends VpnService implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
public static void updateUpstreamServers(Context context) {
|
||||
private static void updateUpstreamServers(Context context) {
|
||||
String[] servers = DnsServersDetector.getServers(context);
|
||||
if (servers != null) {
|
||||
if (servers.length >= 2 && (aliasPrimary == null || !aliasPrimary.getHostAddress().equals(servers[0])) &&
|
||||
@ -197,6 +197,7 @@ public class DaedalusVpnService extends VpnService implements Runnable {
|
||||
stopThread();
|
||||
if (receiver != null) {
|
||||
unregisterReceiver(receiver);
|
||||
receiver = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user