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

Side by Side Diff: libadblockplus-android/src/org/adblockplus/libadblockplus/FilterEngine.java

Issue 29405564: Issue 5121 - Use Acceptable Ads API in libadblockplus (Closed)
Patch Set: minor cleanup suggestions by Serge Created May 4, 2017, 6:17 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 public void setAllowedConnectionType(String value) 174 public void setAllowedConnectionType(String value)
175 { 175 {
176 setAllowedConnectionType(this.ptr, value); 176 setAllowedConnectionType(this.ptr, value);
177 } 177 }
178 178
179 public String getAllowedConnectionType() 179 public String getAllowedConnectionType()
180 { 180 {
181 return getAllowedConnectionType(this.ptr); 181 return getAllowedConnectionType(this.ptr);
182 } 182 }
183 183
184 public void setAcceptableAdsEnabled(final boolean enabled)
185 {
186 setAcceptableAdsEnabled(this.ptr, enabled);
187 }
188
189 public boolean isAcceptableAdsEnabled()
190 {
191 return isAcceptableAdsEnabled(this.ptr);
192 }
193
194 public String getAcceptableAdsSubscriptionURL()
195 {
196 return getAcceptableAdsSubscriptionURL(this.ptr);
197 }
198
184 @Override 199 @Override
185 public void dispose() 200 public void dispose()
186 { 201 {
187 this.disposer.dispose(); 202 this.disposer.dispose();
188 } 203 }
189 204
190 private final static class DisposeWrapper implements Disposable 205 private final static class DisposeWrapper implements Disposable
191 { 206 {
192 private final long ptr; 207 private final long ptr;
193 208
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 private final static native boolean isElemhideWhitelisted(long ptr, String url , String[] documentUrls); 263 private final static native boolean isElemhideWhitelisted(long ptr, String url , String[] documentUrls);
249 264
250 private final static native void setPref(long ptr, String pref, long valuePtr) ; 265 private final static native void setPref(long ptr, String pref, long valuePtr) ;
251 266
252 private final static native String getHostFromURL(long ptr, String url); 267 private final static native String getHostFromURL(long ptr, String url);
253 268
254 private final static native void setAllowedConnectionType(long ptr, String val ue); 269 private final static native void setAllowedConnectionType(long ptr, String val ue);
255 270
256 private final static native String getAllowedConnectionType(long ptr); 271 private final static native String getAllowedConnectionType(long ptr);
257 272
273 private final static native void setAcceptableAdsEnabled(long ptr, boolean ena bled);
274
275 private final static native boolean isAcceptableAdsEnabled(long ptr);
276
277 private final static native String getAcceptableAdsSubscriptionURL(long ptr);
278
258 private final static native void dtor(long ptr); 279 private final static native void dtor(long ptr);
259 } 280 }
OLDNEW

Powered by Google App Engine
This is Rietveld