Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java

Issue 29401555: Issue 5088 - Remove code duplicate for refresh subscriptions (Closed)
Patch Set: using "update" instead of "refresh" terminology Created April 13, 2017, 9:36 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java b/libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java
index 9f4e981b89aa4eb788acaff233f9f14abffbcba9..51d16b3b21b0aac3881e11dded788b69baf1815c 100644
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java
+++ b/libadblockplus-android/src/org/adblockplus/libadblockplus/android/AdblockEngine.java
@@ -42,8 +42,6 @@ import org.adblockplus.libadblockplus.UpdateCheckDoneCallback;
import org.adblockplus.libadblockplus.WebRequest;
import android.content.Context;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Build.VERSION;
import android.os.Handler;
import android.os.Looper;
@@ -262,18 +260,7 @@ public final class AdblockEngine
if (filterEngine != null)
{
Log.d(TAG, "Force update subscriptions");
- List<Subscription> subscriptions = filterEngine.getListedSubscriptions();
- for (Subscription eachSubscription : subscriptions)
- {
- try
- {
- eachSubscription.updateFilters();
- }
- finally
- {
- eachSubscription.dispose();
- }
- }
+ AdblockEngine.this.updateSubscriptions();
}
}
};
@@ -495,7 +482,7 @@ public final class AdblockEngine
}
}
- public void refreshSubscriptions()
+ public void updateSubscriptions()
{
for (final Subscription s : this.filterEngine.getListedSubscriptions())
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld