Closed Bug 595218 Opened 13 years ago Closed 13 years ago

Badges on the same domain doesnt always reflect the right update


(Firefox for Android Graveyard :: General, defect)

Not set



Tracking Status
fennec 2.0b2+ ---


(Reporter: tchung, Assigned: mfinkle)


(Whiteboard: [Fennec2.0bTestday])


(4 files)

For example, is different than   As a user, i'd expect a badge telling me i have a new email on Gmail, but i would expect a different badge if there was an rss update on Reader.    

Currently, the badges for are for Gmail notifications, and it doesnt make sense when it shows up for Reader.

See screenshot

1) install 20100910 fennec nightly
2) log into gmail and google reader, and send yourself a new email
3) goto awesomescreen, and search "google"
4) Verify badging displays the new email notification for gmail, but also for (which i would have expected to notify me with new RSS feeds, not emails)

- sites with the same domain all share the same badging.   But it doesnt always make sense to do that.

- should badge new RSS feeds, not email (that's what gmail is for)
as expected, the same badging also showed up for my other google sites (,,
I was thinking about this problem. I think we need to add an extra level of URL filtering. We might need some regex test to help narrow down the "hits". Hopefully we can keep the domain filter as a quick way to avoid regex tests on every URL (those might be slow).

However, we do need a test that could tell the difference between google mail and google reader (and google docs ....)

Another feature we might want to add is only badging the first URL match. Applying the same badge to 20 URLs in the results list doesn't look nice.
tracking-fennec: --- → ?
tracking-fennec: ? → 2.0b2+
Assignee: nobody → mark.finkle
Attached patch patchSplinter Review
This patch does a few things:
* Stop using effective TLD because it was not specific enough. Too many URLs were matching.
* Use partial URL match that has to match from the beginning of the URL and the match must be exact. I could have used a regex to skip "http" vs "https", but that could have caused other mis-matches, so I left it as an exact partial match, from start of the URL.
* Did some rename of the currentURL -> itemURL and itemHost -> itemURI and remoteHost -> remoteURI, since we were not using host anymore. Also moving itemURI out of inner for-loop might increase speed too.

The result is much better - only the right gmail matches for me. I wonder if this is broken for foreign locales?

We could also add a feature to only match the first hit in the results list.
Attachment #482639 - Flags: review?(21)
Comment on attachment 482639 [details] [diff] [review]

Code looks good, works for me since does not exist.
Attachment #482639 - Flags: review?(21) → review+
Closed: 13 years ago
Resolution: --- → FIXED
The badging isnt working on android nexus one: Mozilla/5.0 (Android; Linux armv71; rv:2.0b8pre) Gecko/20101015 Firefox/4.0b8pre Fennec/4.0b2pre    

See screenshots for maemo vs android.

I'll await your comments for android before reopening the bug
User error.  i wasnt signed into gmail on android.  

Verified fix on Mozilla/5.0 (Android; Linux
armv71; rv:2.0b8pre) Gecko/20101015 Firefox/4.0b8pre Fennec/4.0b2pre
You need to log in before you can comment on or make changes to this bug.