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

Delta Between Two Patch Sets: adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/MoreBlockingPreferenceCategory.java

Issue 29716681: Issue 6454 - IllegalStateException crash (Closed)
Left Patch Set: Add final modifiers and renamed removeOnEngineCreatedCallback Created March 8, 2018, 2:50 p.m.
Right Patch Set: Adjusting engine check Created March 9, 2018, 11:42 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 { 119 {
120 sb.append(DateUtils.formatDateTime(this.getContext(), timestamp, 120 sb.append(DateUtils.formatDateTime(this.getContext(), timestamp,
121 DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_TIME)); 121 DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_TIME));
122 } 122 }
123 else 123 else
124 { 124 {
125 sb.append(this.getContext().getString(R.string.last_update_never)); 125 sb.append(this.getContext().getString(R.string.last_update_never));
126 } 126 }
127 cbp.setSummary(sb.toString()); 127 cbp.setSummary(sb.toString());
128 } 128 }
129 else if (sub.getType() == SubscriptionInfo.Type.CUSTOM && engine != null) 129 else if (sub.getType() == SubscriptionInfo.Type.CUSTOM)
René Jeschke 2018/03/09 10:11:03 NIT: Unrelated change, but I don't mind. It's up t
130 { 130 {
131 engine.removeSubscriptionById(sub.getId()); 131 if (engine != null)
132 {
133 engine.removeSubscriptionById(sub.getId());
134 }
132 continue; 135 continue;
133 } 136 }
134 137
135 cbp.setTitle(resInt == null ? sub.getTitle() : getContext().getString(resI nt)); 138 cbp.setTitle(resInt == null ? sub.getTitle() : getContext().getString(resI nt));
136 cbp.setChecked(sub.isEnabled()); 139 cbp.setChecked(sub.isEnabled());
137 cbp.setPersistent(false); 140 cbp.setPersistent(false);
138 cbp.setKey(sub.getId()); 141 cbp.setKey(sub.getId());
139 cbp.setOnPreferenceChangeListener(this); 142 cbp.setOnPreferenceChangeListener(this);
140 this.addPreference(cbp); 143 this.addPreference(cbp);
141 } 144 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 249 }
247 return true; 250 return true;
248 } 251 }
249 252
250 @Override 253 @Override
251 public void subscriptionAdded() 254 public void subscriptionAdded()
252 { 255 {
253 refreshEntries(); 256 refreshEntries();
254 } 257 }
255 } 258 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld