void finishedPopulatingBlocklists(ArrayList<ArrayList<List<String[]>>> 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<Context> contextWeakReference;
private WeakReference<Activity> activityWeakReference;
+ // The public constructor.
public PopulateBlocklists(Context context, Activity activity) {
// Populate the weak reference to the context.
contextWeakReference = new WeakReference<>(context);
ArrayList<List<String[]>> fanboysSocialList = blocklistHelper.parseBlocklist(context.getAssets(), "blocklists/fanboy-social.txt");
+ // Update the progress.
+ publishProgress(context.getString(R.string.loading_ultralist));
+
+ // Populate UltraList.
+ ArrayList<List<String[]>> ultraList = blocklistHelper.parseBlocklist(context.getAssets(), "blocklists/ultralist.txt");
+
// Update the progress.
publishProgress(context.getString(R.string.loading_ultraprivacy));
combinedBlocklists.add(easyPrivacy);
combinedBlocklists.add(fanboysAnnoyanceList);
combinedBlocklists.add(fanboysSocialList);
+ combinedBlocklists.add(ultraList);
combinedBlocklists.add(ultraPrivacy);
}