Closed Bug 709289 Opened 13 years ago Closed 13 years ago

Implement bookmarks repository layer

Categories

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

All
Android
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ally, Assigned: rnewman)

References

Details

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>(SQLiteCursor.java:98) E/StrictMode( 764): at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:51) E/StrictMode( 764): at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1573) E/StrictMode( 764): at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:354) E/StrictMode( 764): at org.mozilla.fennec_rnewman.db.BrowserProvider.query(BrowserProvider.java:935) 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(SQLiteStatement.java:113) W/GlobalSession( 762): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1745) W/GlobalSession( 762): at android.database.sqlite.SQLiteDatabase.insertOrThrow(SQLiteDatabase.java:1644) W/GlobalSession( 762): at org.mozilla.fennec_rnewman.db.BrowserProvider.insertInTransaction(BrowserProvider.java:684) W/GlobalSession( 762): at org.mozilla.fennec_rnewman.db.BrowserProvider.insert(BrowserProvider.java:634) W/GlobalSession( 762): at android.content.ContentProvider$Transport.insert(ContentProvider.java:186) W/GlobalSession( 762): at android.content.ContentResolver.insert(ContentResolver.java:723) W/GlobalSession( 762): at org.mozilla.gecko.sync.repositories.android.AndroidBrowserRepositoryDataAccessor.insert(AndroidBrowserRepositoryDataAccessor.java:95) W/GlobalSession( 762): at org.mozilla.gecko.sync.repositories.android.AndroidBrowserBookmarksDataAccessor.insertSpecialFolder(AndroidBrowserBookmarksDataAccessor.java:91) W/GlobalSession( 762): at org.mozilla.gecko.sync.repositories.android.AndroidBrowserBookmarksDataAccessor.checkAndBuildSpecialGuids(AndroidBrowserBookmarksDataAccessor.java:79) W/GlobalSession( 762): at org.mozilla.gecko.sync.repositories.android.AndroidBrowserBookmarksRepositorySession.begin(AndroidBrowserBookmarksRepositorySession.java:153) Needs thorough testing.
Summary: implement bookmarks repository layer → Implement bookmarks repository layer
Assignee: jvoll → rnewman
Status: NEW → ASSIGNED
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
Status: ASSIGNED → RESOLVED
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.