Closed Bug 1117746 Opened 5 years ago Closed 5 years ago

Share asset is intermittently missing from recent nightlies

Categories

(Firefox for Android :: General, defect)

Other
Android
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 37
Tracking Status
firefox34 --- unaffected
firefox35 --- unaffected
firefox36 --- unaffected
firefox37 --- verified
fennec 37+ ---

People

(Reporter: pwd.mozilla, Assigned: mfinkle)

References

Details

(Keywords: regression, reproducible)

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Android; Mobile; rv:37.0) Gecko/37.0 Firefox/37.0
Build ID: 20150104030205

Steps to reproduce:

Not sure if anyone else has seen it but I'll grab a screenshot when it happens again.
Went to another app, returned via recent apps and it's gone. 

Android 5.0 BTW
I can reproduce this on latest Nightly (05-01-2014) on Alcatel One Touch (Android 4.1.2)
Scenarios:
1. 
With a clean profile, open Firefox and open the menu.
2. 
-Go to a website
-Open the menu => instead of the share icon, there is a blank space
-Close the page and open the menu => the share icon reappears
-Reopen the page and choose gmail from the share option list => the gmail shortcut appears near the blank space
-Tap the blank space, the share option list is opened and choose twitter => the two shortcuts appear next the blank space
Status: UNCONFIRMED → NEW
Ever confirmed: true
Regression window:
1.mozilla-central:
good build: 31-12-2014
bad build: 01-01-2015
pushlog:http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=88037f94b7d7&tochange=3c296aa11c51

2.inbound:
good build: 1420057797
bad build: 1420059539
pushlog: http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=be2eca32172a&tochange=6294a0c2ce96
I'm looking into this.
Attached patch menuitem-action-visibility v0.1 (obsolete) — Splinter Review
GeckoMenuItem that are "Actions" appear either on the ActionBar or the main menu (as ActionBar-ish items). These Views are not normal MenuItem Views and GeckoMenu.onItemChanged handles their visibility uniquely. If the View and the State get out of sync, we can get a situation where the Action is not visible.

Causing the visibility to alter states, like opening a page where Share is allowed, causes the Action View to become visible.

This patch allows Actions to always trigger onItemChanged when setting visibility, as long as we are not in a batch. This fixes the issue for me.
Assignee: nobody → mark.finkle
Attachment #8544010 - Flags: review?(rnewman)
Now with a comment
Attachment #8544010 - Attachment is obsolete: true
Attachment #8544010 - Flags: review?(rnewman)
Attachment #8544012 - Flags: review?(rnewman)
Duplicate of this bug: 1117822
tracking-fennec: --- → ?
Comment on attachment 8544012 [details] [diff] [review]
menuitem-action-visibility v0.2

Review of attachment 8544012 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/menu/GeckoMenuItem.java
@@ +445,5 @@
>      @Override
>      public MenuItem setVisible(boolean visible) {
> +        // Action views are not normal menu items and visibility can get out
> +        // of sync unless we dispatch whenever required.
> +        if (mActionEnum > 0 || mVisible != visible) {

Use isActionItem() instead of checking mActionEnum directly.

(ProGuard will inline it, so no perf worries.)
Attachment #8544012 - Flags: review?(rnewman) → review+
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/c98966220fd6
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
Verified as fixed in Firefox for Android 37.0a1 (2015-01-06)
Device: Motorola Razr (Android 4.1.2)
Status: RESOLVED → VERIFIED
tracking-fennec: ? → 37+
You need to log in before you can comment on or make changes to this bug.