Closed Bug 707150 Opened 8 years ago Closed 8 years ago

Add mechanism to enable/disable Fennec's local bookmarks/history DB

Categories

(Firefox for Android :: General, defect, P1)

All
Android
defect

Tracking

()

VERIFIED FIXED
Firefox 12
Tracking Status
firefox11 --- fixed
firefox13 --- verified

People

(Reporter: lucasr, Assigned: lucasr)

References

Details

(Keywords: feature)

Attachments

(2 files)

No description provided.
Context: we've decided to ship Fennec using local DB by default. This bug is about deciding how we're going to expose the ability to use Android's DB to users.
Depends on: 708651
Guys, my initial plan is to add a checkbox prefs to switch Android DB on and off. The wording should be something like "Use bookmarks/history from Android" or "Use system's bookmarks/history". Not entirely happy the wording yet. What do you think?
Priority: -- → P5
Using a checkbox doesn't make it clear what the other option is, i.e. what happens if you don't "Use bookmarks/history from Android". Not using bookmarks at all or what?
(On Android, some checkboxes change their description when toggled, but it's often not clear whether it describes the current state or the action).

I'd suggest a dropdown menu, something like this:
  Bookmarks and History store:
  - Android (shared with other apps)
  - Firefox
(In reply to Steffen Wilberg from comment #3)
> Using a checkbox doesn't make it clear what the other option is, i.e. what
> happens if you don't "Use bookmarks/history from Android". Not using
> bookmarks at all or what?
> (On Android, some checkboxes change their description when toggled, but it's
> often not clear whether it describes the current state or the action).
> 
> I'd suggest a dropdown menu, something like this:
>   Bookmarks and History store:
>   - Android (shared with other apps)
>   - Firefox

I think this is a better direction. Still not sure we even want to enable using Android system for v1 (yeah I said it)
One-liner to enable local DB. This patch should only land once bug 708651 and bug 690901 are fixed. Otherwise Fennec will simply crash on when you run it for the first time with no existing profile.
Attachment #581374 - Flags: review?(blassey.bugs)
Attachment #581374 - Flags: review?(blassey.bugs) → review+
This is a high priority bug as it's about enabling a core feature for 1.0. The profile directory is now created in Java so we can enable local DB now.
Assignee: nobody → lucasr.at.mozilla
Priority: P5 → P1
Keywords: feature
The comparison "== 1" when IS_FOLDER is null is causing a NullPointerException somehow. This patch fixes a regression caused by the patch in bug 716811.
Attachment #587767 - Flags: review?(blassey.bugs)
Attachment #587767 - Flags: review?(blassey.bugs) → review+
Comment on attachment 587767 [details] [diff] [review]
Fix NullPointerException when getting IS_FOLDER

Fixes a ClassCastException and NullPointerException (caused by bug 716811). Adding bookmarks is broken without this patch. Small non-risky patch.
Attachment #587767 - Flags: approval-mozilla-aurora?
Comment on attachment 581374 [details] [diff] [review]
Enable local bookmarks/history database

Enables local DB for bookmarks and history. Hard requirement for 1.0 as Sync on native UI is only implemented for local DB (not for Android DB). Needs to be enabled as soon as possible for general testing.
Attachment #581374 - Flags: approval-mozilla-aurora?
Leaving this in the queue to watch for fallout tomorrow on m-c.
Blocks: 717396
Depends on: 716089
Duplicate of this bug: 717396
https://hg.mozilla.org/mozilla-central/rev/87b138f5e782
https://hg.mozilla.org/mozilla-central/rev/e897ce426615
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
What's the UI interaction here? Or is there none?
(In reply to Aaron Train [:aaronmt] from comment #15)
> What's the UI interaction here? Or is there none?

No UI interaction. However, one way to verify this is working is to do any set of operations that involve DB access:
- Add and remove bookmarks and see if it appears in awesomescreen's Bookmarks tab
- Access any webpage and see if it appears in awesomescreen's History tab
- Filter results in awesomescreen's search entry
- Clear history
- And so on.
Comment on attachment 581374 [details] [diff] [review]
Enable local bookmarks/history database

[Triage Comment]
Mobile only - approving for Aurora.
Attachment #581374 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #587767 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Verified fixed on:

Firefox 13.0a1 (2012-03-02)
20120302031112
http://hg.mozilla.org/mozilla-central/rev/3a7b9e61c263

--
Device: Samsung Galaxy S2
OS: Android 2.3.4
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.