Closed Bug 709289 Opened 13 years ago Closed 13 years ago

Implement bookmarks repository layer


(Firefox for Android Graveyard :: Android Sync, defect, P1)



(Not tracked)



(Reporter: ally, Assigned: rnewman)



      No description provided.
OS: Mac OS X → Android
Hardware: x86 → All
Depends on: 709432
Where I left off:
Current test suite passes, but more tests are needed (hence why I haven't resolved this bug). Bookmarks is functional and fine for this point in the game. Testing is needed in the areas of re-parenting and positioning of bookmarks in their folders. This code is on the ugly side and needs a refactor, I just simply didn't have time to clean it up as much as I wanted to.
This is mostly done, but I've seen exceptions:

E/StrictMode(  764): Finalizing a Cursor that has not been deactivated or closed. database = /mnt/sdcard/Android/data/org.mozilla.fennec_rnewman/files/mozilla/m4njtd72.default/browser.db, table = bookmarks, query = SELECT _id, guid, created, modified, deleted, title, url, folder, parent, position, tags, description, keyword FROM bookmarks WHERE (guid in ('none')) ORDER BY folder DESC, position ASC, _id ASC
E/StrictMode(  764): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
E/StrictMode(  764): 	at android.database.sqlite.SQLiteCursor.<init>(
E/StrictMode(  764): 	at android.database.sqlite.SQLiteDirectCursorDriver.query(
E/StrictMode(  764): 	at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(
E/StrictMode(  764): 	at android.database.sqlite.SQLiteQueryBuilder.query(
E/StrictMode(  764): 	at org.mozilla.fennec_rnewman.db.BrowserProvider.query(

D/GeckoBrowserProvider(  762): Insert on BOOKMARKS: content://org.mozilla.fennec_rnewman.db.browser/bookmarks?sync=true&show_deleted=true
D/GeckoBrowserProvider(  762): Extracting image values for URI: null
D/GeckoBrowserProvider(  762): Inserting bookmark in database with URL: null
I/System.out(  762): WARN: First RecordsChannel flow failed to begin.
W/SynchronizerSession(  762): First RecordsChannel flow failed to begin.
I/ServerSyncStage(  762): onSynchronizeAborted.
W/GlobalSession(  762): Aborting sync: Synchronization was aborted.
I/SyncAdapter(  762): GlobalSession indicated error.
I/SyncAdapter(  762): Notifying sync monitor.
I/ServerSyncStage(  762): onSynchronizeFailed: Got session error.
W/GlobalSession(  762): Aborting sync: Got session error.
W/GlobalSession(  762): android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed
W/GlobalSession(  762): 	at android.database.sqlite.SQLiteStatement.native_executeInsert(Native Method)
W/GlobalSession(  762): 	at android.database.sqlite.SQLiteStatement.executeInsert(
W/GlobalSession(  762): 	at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(
W/GlobalSession(  762): 	at android.database.sqlite.SQLiteDatabase.insertOrThrow(
W/GlobalSession(  762): 	at org.mozilla.fennec_rnewman.db.BrowserProvider.insertInTransaction(
W/GlobalSession(  762): 	at org.mozilla.fennec_rnewman.db.BrowserProvider.insert(
W/GlobalSession(  762): 	at android.content.ContentProvider$Transport.insert(
W/GlobalSession(  762): 	at android.content.ContentResolver.insert(
W/GlobalSession(  762): 	at
W/GlobalSession(  762): 	at
W/GlobalSession(  762): 	at
W/GlobalSession(  762): 	at

Needs thorough testing.
Summary: implement bookmarks repository layer → Implement bookmarks repository layer
Assignee: jvoll → rnewman
Depends on: 716811
Depends on: 718194
I'm going to call this done in the 2012-01-14 drop, with follow-up bugs as necessary.
Blocks: 718194
Closed: 13 years ago
No longer depends on: 718194
Resolution: --- → FIXED
Product: Mozilla Services → Android Background Services
Product: Android Background Services → Firefox for Android
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.