| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 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/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 package org.adblockplus.libadblockplus.android.settings; | 18 package org.adblockplus.libadblockplus.android.settings; |
| 19 | 19 |
| 20 import org.adblockplus.libadblockplus.android.Subscription; | 20 import org.adblockplus.libadblockplus.android.Subscription; |
| 21 | 21 |
| 22 import java.io.Serializable; | 22 import java.io.Serializable; |
| 23 import java.util.List; | 23 import java.util.List; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Adblock settings | 26 * Adblock settings |
| 27 */ | 27 */ |
| 28 public class AdblockSettings implements Serializable | 28 public class AdblockSettings implements Serializable |
| 29 { | 29 { |
| 30 private transient boolean adblockEnabled; | 30 private volatile boolean adblockEnabled; |
|
anton
2017/04/14 08:14:00
actually it's a bug fix!
this was meant to be `vol
anton
2017/04/14 08:15:09
though the bug did not appear as we don't serializ
| |
| 31 private transient Boolean acceptableAdsEnabled; | 31 private volatile boolean acceptableAdsEnabled; |
|
anton
2017/04/14 08:14:00
decided to make it primitive.
The original intenti
| |
| 32 private List<Subscription> subscriptions; | 32 private List<Subscription> subscriptions; |
| 33 private List<String> whitelistedDomains; | 33 private List<String> whitelistedDomains; |
| 34 private ConnectionType allowedConnectionType; | 34 private ConnectionType allowedConnectionType; |
| 35 | 35 |
| 36 public boolean isAdblockEnabled() | 36 public boolean isAdblockEnabled() |
| 37 { | 37 { |
| 38 return adblockEnabled; | 38 return adblockEnabled; |
| 39 } | 39 } |
| 40 | 40 |
| 41 public void setAdblockEnabled(boolean adblockEnabled) | 41 public void setAdblockEnabled(boolean adblockEnabled) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 { | 88 { |
| 89 return "AdblockSettings{" + | 89 return "AdblockSettings{" + |
| 90 "adblockEnabled=" + adblockEnabled + | 90 "adblockEnabled=" + adblockEnabled + |
| 91 ", acceptableAdsEnabled=" + acceptableAdsEnabled + | 91 ", acceptableAdsEnabled=" + acceptableAdsEnabled + |
| 92 ", subscriptions:" + (subscriptions != null ? subscriptions.size() : 0) + | 92 ", subscriptions:" + (subscriptions != null ? subscriptions.size() : 0) + |
| 93 ", whitelistedDomains:" + (whitelistedDomains != null ? whitelistedDomains .size() : 0) + | 93 ", whitelistedDomains:" + (whitelistedDomains != null ? whitelistedDomains .size() : 0) + |
| 94 ", allowedConnectionType=" + (allowedConnectionType != null ? allowedConne ctionType.getValue() : "null") + | 94 ", allowedConnectionType=" + (allowedConnectionType != null ? allowedConne ctionType.getValue() : "null") + |
| 95 '}'; | 95 '}'; |
| 96 } | 96 } |
| 97 } | 97 } |
| OLD | NEW |