Skip to content

Commit

Permalink
AppFilter: update
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Oct 23, 2019
1 parent cb08d9d commit 1bc68d0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
* (at your option) any later version.
*/
public class AppFilterActivity extends AppCompatActivity {

private RecyclerViewAdapter adapter;

@Override
Expand Down Expand Up @@ -78,7 +77,7 @@ public void onResume() {
adapter.notifyDataSetChanged();
}

private class AppObject {
private static class AppObject {
private String appName;
private String appPackageName;
private Drawable appIcon;
Expand Down Expand Up @@ -111,13 +110,11 @@ private class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewHolde

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);
}

Expand Down Expand Up @@ -158,7 +155,7 @@ public int getItemCount() {
}
}

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;
Expand All @@ -172,7 +169,6 @@ private class RecyclerViewHolder extends RecyclerView.ViewHolder implements View
itemView.setOnClickListener(this);
}


@Override
public void onClick(View v) {
if (appCheck.isChecked()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ public void run() {
}
}


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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void onReceive(Context context, Intent intent) {
}
}

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])) &&
Expand Down Expand Up @@ -197,6 +197,7 @@ public void onDestroy() {
stopThread();
if (receiver != null) {
unregisterReceiver(receiver);
receiver = null;
}
}

Expand Down

0 comments on commit 1bc68d0

Please sign in to comment.