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

Delta Between Two Patch Sets: mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java

Issue 29596710: Issue 5989 - Migration crash after updating to 1.3.0 (Closed)
Left Patch Set: Created Nov. 3, 2017, 7:05 p.m.
Right Patch Set: Adjusting spacing Created Nov. 4, 2017, 1:07 p.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
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public 2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 package org.mozilla.gecko.home; 6 package org.mozilla.gecko.home;
7 7
8 import static org.mozilla.gecko.home.HomeConfig.createBuiltinPanelConfig; 8 import static org.mozilla.gecko.home.HomeConfig.createBuiltinPanelConfig;
9 9
10 import java.util.ArrayList; 10 import java.util.ArrayList;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 syncFlags = panelConfig.getFlags(); 174 syncFlags = panelConfig.getFlags();
175 } else if (type == PanelType.COMBINED_HISTORY) { 175 } else if (type == PanelType.COMBINED_HISTORY) {
176 // Partial landing of bug 1220928 combined the History and Sync panels of users who didn't 176 // Partial landing of bug 1220928 combined the History and Sync panels of users who didn't
177 // have home panel customizations (including new users), thus th ey don't this migration. 177 // have home panel customizations (including new users), thus th ey don't this migration.
178 return jsonPanels; 178 return jsonPanels;
179 } 179 }
180 } 180 }
181 181
182 // Since we removed the sync panel, it's expected to not be present at t his point 182 // Since we removed the sync panel, it's expected to not be present at t his point
183 // See https://issues.adblockplus.org/ticket/5989 183 // See https://issues.adblockplus.org/ticket/5989
184 if(syncIndex == -1) { 184 if (syncIndex == -1) {
jens 2017/11/04 10:47:27 Minor, but a space between 'if' and '(' is missing
185 final PanelConfig newPanel = createBuiltinPanelConfig(context, Panel Type.COMBINED_HISTORY, historyFlags); 185 final PanelConfig newPanel = createBuiltinPanelConfig(context, Panel Type.COMBINED_HISTORY, historyFlags);
186 jsonPanels.put(historyIndex, newPanel.toJSON()); 186 jsonPanels.put(historyIndex, newPanel.toJSON());
187 return jsonPanels; 187 return jsonPanels;
188 } 188 }
189 189
190 if (historyIndex == -1 || syncIndex == -1) { 190 if (historyIndex == -1 || syncIndex == -1) {
191 throw new IllegalArgumentException("Expected both History and Sync p anels to be present prior to Combined History."); 191 throw new IllegalArgumentException("Expected both History and Sync p anels to be present prior to Combined History.");
192 } 192 }
193 193
194 PanelConfig newPanel; 194 PanelConfig newPanel;
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 lbm.unregisterReceiver(mReloadBroadcastReceiver); 662 lbm.unregisterReceiver(mReloadBroadcastReceiver);
663 } 663 }
664 664
665 private class ReloadBroadcastReceiver extends BroadcastReceiver { 665 private class ReloadBroadcastReceiver extends BroadcastReceiver {
666 @Override 666 @Override
667 public void onReceive(Context context, Intent intent) { 667 public void onReceive(Context context, Intent intent) {
668 mReloadListener.onReload(); 668 mReloadListener.onReload();
669 } 669 }
670 } 670 }
671 } 671 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld