| OLD | NEW | 
 | (Empty) | 
|   1 /* |  | 
|   2  * This file is part of Adblock Plus <https://adblockplus.org/>, |  | 
|   3  * Copyright (C) 2006-present eyeo GmbH |  | 
|   4  * |  | 
|   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 |  | 
|   7  * published by the Free Software Foundation. |  | 
|   8  * |  | 
|   9  * Adblock Plus is distributed in the hope that it will be useful, |  | 
|  10  * but WITHOUT ANY WARRANTY; without even the implied warranty of |  | 
|  11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  | 
|  12  * GNU General Public License for more details. |  | 
|  13  * |  | 
|  14  * You should have received a copy of the GNU General Public License |  | 
|  15  * along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>. |  | 
|  16  */ |  | 
|  17  |  | 
|  18 package org.adblockplus.libadblockplus.android.settings; |  | 
|  19  |  | 
|  20 import org.adblockplus.libadblockplus.android.ConnectionType; |  | 
|  21 import org.adblockplus.libadblockplus.android.Subscription; |  | 
|  22  |  | 
|  23 import java.io.Serializable; |  | 
|  24 import java.util.List; |  | 
|  25  |  | 
|  26 /** |  | 
|  27  * Adblock settings |  | 
|  28  */ |  | 
|  29 public class AdblockSettings implements Serializable |  | 
|  30 { |  | 
|  31   private transient boolean adblockEnabled; |  | 
|  32   private transient Boolean acceptableAdsEnabled; |  | 
|  33   private List<Subscription> subscriptions; |  | 
|  34   private List<String> whitelistedDomains; |  | 
|  35   private ConnectionType allowedConnectionType; |  | 
|  36  |  | 
|  37   public boolean isAdblockEnabled() |  | 
|  38   { |  | 
|  39     return adblockEnabled; |  | 
|  40   } |  | 
|  41  |  | 
|  42   public void setAdblockEnabled(boolean adblockEnabled) |  | 
|  43   { |  | 
|  44     this.adblockEnabled = adblockEnabled; |  | 
|  45   } |  | 
|  46  |  | 
|  47   public boolean isAcceptableAdsEnabled() |  | 
|  48   { |  | 
|  49     return acceptableAdsEnabled; |  | 
|  50   } |  | 
|  51  |  | 
|  52   public void setAcceptableAdsEnabled(boolean acceptableAdsEnabled) |  | 
|  53   { |  | 
|  54     this.acceptableAdsEnabled = acceptableAdsEnabled; |  | 
|  55   } |  | 
|  56  |  | 
|  57   public List<Subscription> getSubscriptions() |  | 
|  58   { |  | 
|  59     return subscriptions; |  | 
|  60   } |  | 
|  61  |  | 
|  62   public void setSubscriptions(List<Subscription> subscriptions) |  | 
|  63   { |  | 
|  64     this.subscriptions = subscriptions; |  | 
|  65   } |  | 
|  66  |  | 
|  67   public List<String> getWhitelistedDomains() |  | 
|  68   { |  | 
|  69     return whitelistedDomains; |  | 
|  70   } |  | 
|  71  |  | 
|  72   public void setWhitelistedDomains(List<String> whitelistedDomains) |  | 
|  73   { |  | 
|  74     this.whitelistedDomains = whitelistedDomains; |  | 
|  75   } |  | 
|  76  |  | 
|  77   public ConnectionType getAllowedConnectionType() |  | 
|  78   { |  | 
|  79     return allowedConnectionType; |  | 
|  80   } |  | 
|  81  |  | 
|  82   public void setAllowedConnectionType(ConnectionType allowedConnectionType) |  | 
|  83   { |  | 
|  84     this.allowedConnectionType = allowedConnectionType; |  | 
|  85   } |  | 
|  86  |  | 
|  87   @Override |  | 
|  88   public String toString() |  | 
|  89   { |  | 
|  90     return "AdblockSettings{" + |  | 
|  91       "adblockEnabled=" + adblockEnabled + |  | 
|  92       ", acceptableAdsEnabled=" + acceptableAdsEnabled + |  | 
|  93       ", subscriptions:" + (subscriptions != null ? subscriptions.size() : 0) + |  | 
|  94       ", whitelistedDomains:" + (whitelistedDomains != null ? whitelistedDomains
    .size() : 0) + |  | 
|  95       ", allowedConnectionType=" + (allowedConnectionType != null ? allowedConne
    ctionType.getValue() : "null") + |  | 
|  96       '}'; |  | 
|  97   } |  | 
|  98 } |  | 
| OLD | NEW |