Bug 1264134 - Don't assert SavedReaderViewHelper running off main thread r?mcomella
It turns out that with sync enabled, we do the first load of the database on the UI thread.
The SavedReaderViewHelper (which is initialised during DB load) assumes we're run off the
main thread, we need to disable that assertion until we can ensure that DB loading is done
off the main thread.
MozReview-Commit-ID: AYQewTVjEbA
--- a/mobile/android/base/java/org/mozilla/gecko/reader/SavedReaderViewHelper.java
+++ b/mobile/android/base/java/org/mozilla/gecko/reader/SavedReaderViewHelper.java
@@ -84,17 +84,19 @@ public class SavedReaderViewHelper {
}
/**
* Load the reader view cache list from our JSON file.
*
* Must not be run on the UI thread due to file access.
*/
public synchronized void loadItems() {
- ThreadUtils.assertNotOnUiThread();
+ // Band aid fix for Bug 1264134. We need to figure out the root cause and reenable this
+ // assertion.
+ // ThreadUtils.assertNotOnUiThread();
if (mItems != null) {
return;
}
try {
mItems = GeckoProfile.get(mContext).readJSONObjectFromFile(FILE_PATH);
} catch (IOException e) {