/* Copyright 2019 NickFreeman * * This file is a part of Fedilab * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation; either version 3 of the * License, or (at your option) any later version. * * Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * Public License for more details. * * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ package app.fedilab.android.asynctasks; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.os.AsyncTask; import android.os.Handler; import android.widget.Button; import android.widget.Toast; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.lang.ref.WeakReference; import java.net.URL; import java.util.ArrayList; import java.util.List; import javax.net.ssl.HttpsURLConnection; import app.fedilab.android.R; import app.fedilab.android.helper.Helper; import app.fedilab.android.sqlite.DomainBlockDAO; import app.fedilab.android.sqlite.Sqlite; import es.dmoral.toasty.Toasty; /** * Created by NickFreeman on 11/05/2019. * Download the list of blocked tracking domains for build-in browser */ public class DownloadTrackingDomainsAsyncTask extends AsyncTask { private WeakReference context; private WeakReference