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=75306368addbffd4e508ba2865430fbcf73383d9;hp=106c8d9c919a8ddbad8e16fbe92c1fd7c0bcd0a2;hb=ffdec8106ad23f62ca529749ade99f51e336ce55;hpb=2a28c6401f60afa40ca93b18fc0b9a0ab196ff88 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 106c8d9c..75306368 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java +++ b/app/src/main/java/com/stoutner/privacybrowser/asynctasks/PopulateBlocklists.java @@ -24,7 +24,6 @@ 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; @@ -44,13 +43,14 @@ public class PopulateBlocklists extends AsyncTask>> combinedBlocklists); } - // Declare a populate blocklists listener. + // Define a populate blocklists listener. private PopulateBlocklistsListener populateBlocklistsListener; - // Declare weak references for the activity and context. + // Define weak references for the activity and context. private WeakReference contextWeakReference; private WeakReference activityWeakReference; + // The public constructor. public PopulateBlocklists(Context context, Activity activity) { // Populate the weak reference to the context. contextWeakReference = new WeakReference<>(context); @@ -127,6 +127,12 @@ public class PopulateBlocklists extends AsyncTask> fanboysSocialList = blocklistHelper.parseBlocklist(context.getAssets(), "blocklists/fanboy-social.txt"); + // Update the progress. + publishProgress(context.getString(R.string.loading_ultralist)); + + // Populate UltraList. + ArrayList> ultraList = blocklistHelper.parseBlocklist(context.getAssets(), "blocklists/ultralist.txt"); + // Update the progress. publishProgress(context.getString(R.string.loading_ultraprivacy)); @@ -139,6 +145,7 @@ public class PopulateBlocklists extends AsyncTask