X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fasynctasks%2FPopulateBlocklists.java;h=106c8d9c919a8ddbad8e16fbe92c1fd7c0bcd0a2;hp=f732f47534aadcf354cf089bbe160755ba6ec137;hb=2a28c6401f60afa40ca93b18fc0b9a0ab196ff88;hpb=8a72caf321663f9549997695af01d89db45fe7d1 diff --git a/app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java b/app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java index f732f475..106c8d9c 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java +++ b/app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java @@ -24,18 +24,20 @@ import android.content.Context; import android.os.AsyncTask; import android.view.View; import android.widget.LinearLayout; +import android.widget.ProgressBar; import android.widget.RelativeLayout; import android.widget.TextView; +import androidx.appcompat.widget.Toolbar; +import androidx.drawerlayout.widget.DrawerLayout; + import com.stoutner.privacybrowser.R; -import com.stoutner.privacybrowser.helpers.BlockListHelper; +import com.stoutner.privacybrowser.helpers.BlocklistHelper; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; -import androidx.appcompat.widget.Toolbar; - public class PopulateBlocklists extends AsyncTask>>> { // The public interface is used to send information back to the parent activity. public interface PopulateBlocklistsListener { @@ -60,13 +62,37 @@ public class PopulateBlocklists extends AsyncTask>> doInBackground(Void... none) { // Get a handle for the context. Context context = contextWeakReference.get(); // Instantiate the blocklist helper. - BlockListHelper blockListHelper = new BlockListHelper(); + BlocklistHelper blocklistHelper = new BlocklistHelper(); // Create a combined array list. ArrayList>> combinedBlocklists = new ArrayList<>(); @@ -77,35 +103,35 @@ public class PopulateBlocklists extends AsyncTask> easyList = blockListHelper.parseBlockList(context.getAssets(), "blocklists/easylist.txt"); + ArrayList> easyList = blocklistHelper.parseBlocklist(context.getAssets(), "blocklists/easylist.txt"); // Update the progress. publishProgress(context.getString(R.string.loading_easyprivacy)); // Populate EasyPrivacy. - ArrayList> easyPrivacy = blockListHelper.parseBlockList(context.getAssets(), "blocklists/easyprivacy.txt"); + ArrayList> easyPrivacy = blocklistHelper.parseBlocklist(context.getAssets(), "blocklists/easyprivacy.txt"); // Update the progress. publishProgress(context.getString(R.string.loading_fanboys_annoyance_list)); // Populate Fanboy's Annoyance List. - ArrayList> fanboysAnnoyanceList = blockListHelper.parseBlockList(context.getAssets(), "blocklists/fanboy-annoyance.txt"); + ArrayList> fanboysAnnoyanceList = blocklistHelper.parseBlocklist(context.getAssets(), "blocklists/fanboy-annoyance.txt"); // Update the progress. publishProgress(context.getString(R.string.loading_fanboys_social_blocking_list)); // Populate Fanboy's Social Blocking List. - ArrayList> fanboysSocialList = blockListHelper.parseBlockList(context.getAssets(), "blocklists/fanboy-social.txt"); + ArrayList> fanboysSocialList = blocklistHelper.parseBlocklist(context.getAssets(), "blocklists/fanboy-social.txt"); // Update the progress. publishProgress(context.getString(R.string.loading_ultraprivacy)); // Populate UltraPrivacy. - ArrayList> ultraPrivacy = blockListHelper.parseBlockList(context.getAssets(), "blocklists/ultraprivacy.txt"); + ArrayList> ultraPrivacy = blocklistHelper.parseBlocklist(context.getAssets(), "blocklists/ultraprivacy.txt"); // Populate the combined array list. @@ -149,6 +175,7 @@ public class PopulateBlocklists extends AsyncTask