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

Unified Diff: mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java

Issue 29596710: Issue 5989 - Migration crash after updating to 1.3.0 (Closed)
Patch Set: Adjusting spacing Created Nov. 4, 2017, 1:07 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java
===================================================================
--- a/mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java
@@ -174,16 +174,24 @@ public class HomeConfigPrefsBackend impl
syncFlags = panelConfig.getFlags();
} else if (type == PanelType.COMBINED_HISTORY) {
// Partial landing of bug 1220928 combined the History and Sync panels of users who didn't
// have home panel customizations (including new users), thus they don't this migration.
return jsonPanels;
}
}
+ // Since we removed the sync panel, it's expected to not be present at this point
+ // See https://issues.adblockplus.org/ticket/5989
+ if (syncIndex == -1) {
+ final PanelConfig newPanel = createBuiltinPanelConfig(context, PanelType.COMBINED_HISTORY, historyFlags);
+ jsonPanels.put(historyIndex, newPanel.toJSON());
+ return jsonPanels;
+ }
+
if (historyIndex == -1 || syncIndex == -1) {
throw new IllegalArgumentException("Expected both History and Sync panels to be present prior to Combined History.");
}
PanelConfig newPanel;
int replaceIndex;
int removeIndex;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld