Closed Bug 965033 Opened 11 years ago Closed 11 years ago

Hook up DynamicPanel to HomeProvider

Categories

(Firefox for Android Graveyard :: Data Providers, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 29

People

(Reporter: Margaret, Assigned: Margaret)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
With some minor HomeProvider tweaks... it works! \o/ We should file a bug to do proper schema migration somewhere, but for now, I just set the schema version where we create the table. To test, I used this panel hack: https://www.dropbox.com/s/a9ku3y14btrhul3/panel-hack.patch And then used this JS snippet to store the data: Task.spawn(function() { let storage = HomeProvider.getStorage("mydatasetid"); yield storage.save([{ "url": "http://mozilla.org", "title": "Mozilla", "description": "This is an example" }, { "url": "http://margaretleibovic.com", "title": "Margaret Leibovic", "description": "This is a second example" }, { "url": "http://nytimes.com", "title": "New York Times", "description": "Yet another example" }]); }).then(function(result) { dump("*** result - " + JSON.stringify(result)); }, function(error) { dump("*** error - " + JSON.stringify(error)); });
Attachment #8366973 - Flags: review?(lucasr.at.mozilla)
Assignee: nobody → margaret.leibovic
Blocks: lists
Comment on attachment 8366973 [details] [diff] [review] patch Review of attachment 8366973 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/home/DynamicPanel.java @@ -220,5 @@ > final ContentResolver cr = getContext().getContentResolver(); > > - // XXX: Use the test URI for static fake data > - final Uri fakeItemsUri = HomeItems.CONTENT_FAKE_URI.buildUpon(). > - appendQueryParameter(BrowserContract.PARAM_PROFILE, "default").build(); Note: SQLiteBridgeContentProvider gets the correct profile for us if it's not specified, so we don't need to add this param.
Attachment #8366973 - Flags: review?(lucasr.at.mozilla) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: