Closed Bug 1175532 Opened 5 years ago Closed 4 years ago

No visible action when choosing "Share" from Action Bar and Reader View toolbar


(Firefox for Android :: General, defect)

41 Branch
Not set



Firefox 42
Tracking Status
firefox40 --- unaffected
firefox41 --- unaffected
firefox42 + verified
fennec 42+ ---


(Reporter: TeoVermesan, Assigned: mcomella)


(Blocks 1 open bug)


(Keywords: regression)

Tested with:
Build: Firefox for Android 41.0a1 (2015-06-17)
Device: Alcatel One Touch (Android 4.1.2) and Nexus 4 (Android 5.1)

Steps to reproduce
1. Go to
2. Tap press-hold on a selected word such "software"
3. From action bar choose "Share"

Expected results:
- A screen is displayed with all shareable options - all apps that you can use to share the text. 

Actual results:
- The action bar is dismissed and the list with option is not displayed

- the same happens when choosing "Share" from reader view toolbar
tracking-fennec: --- → ?
[Tracking Requested - why for this release]: regression
(In reply to Mark Capella [:capella] from comment #1)
> Looks like this regressed here

That's a merge changeset... can we narrow this down to a specific bug?
Flags: needinfo?(markcapella)
Assignee: nobody → margaret.leibovic
Adding a tracking flag for FF41 and FF42 as this is a regression.
Regression window:
not affected build: 16-06
affected build: 17-06

tracking-fennec: ? → 41+
Going to guess this is another CATEGORY_BROWSABLE issue. CC'ing sebastian because he's also looked into this.
Duplicate of this bug: 1181830
We might need a hacky solution similar to bug 1100100. :\

NI self: this is probably my fault so it'd be efficient for me to look into.
Flags: needinfo?(michael.l.comella)
For the action bar, we share from GeckoApp.handleMessage [1]:

626         } else if ("Share:Text".equals(event)) {
627             String text = message.getString("text");
628             GeckoAppShell.openUriExternal(text, "text/plain", "", "", Intent.ACTION_SEND, "");

With openUriExternal, we put Category.BROWSABLE on the url so that's likely the issue.

Assignee: margaret.leibovic → michael.l.comella
Flags: needinfo?(michael.l.comella)
Commented out where we add Category.BROWSABLE in getOpenURIIntent so that's definitely the issue:
So here's a fun one [1]:

1215     private static Intent getOpenURIIntentInner(final Context context,  final String targetURI,
1216             final String mimeType, final String action, final String title) {
1218         if (action.equalsIgnoreCase(Intent.ACTION_SEND)) {
1219             Intent shareIntent = getShareIntent(context, targetURI, mimeType, title);
1220             return Intent.createChooser(shareIntent,
1221                                         context.getResources().getString(R.string.share_title)); 
1222         }

getShareIntent sets the intent's data field to the mimeType argument. However, without certain flags specified, Intent.createChooser does not copy that field into the new intent. To be correct, I manually inserted the mimeType ("text/plain") into the returned Intent and we don't match any applications.

Wes, it seems the use of explicit mimeTypes is very inconsistent - do you know when they're used explicitly and implicitly? So far it seems "file" schemes have used mimeTypes and nothing else has.

Flags: needinfo?(wjohnston)
As for the solution to this bug, I say we pass a flag into GeckoAppShell.openUriExternal to the effect of, "Don't add Category.BROWSABLE" until a better solution such as bug 1182140 can be reached.
Moved NI from comment 12 to bug 1182140 comment 1.
Flags: needinfo?(wjohnston)
Duplicate of this bug: 1183683
This should be fixed on 41 by bug 1182328 - NI self to verify.
tracking-fennec: 41+ → 42+
Flags: needinfo?(michael.l.comella)
(In reply to Michael Comella (:mcomella) from comment #16)
> This should be fixed on 41 by bug 1182328 - NI self to verify.

Fixed on the latest Aurora build [1].

Flags: needinfo?(michael.l.comella)
What's needed to fix this on 42?
Flags: needinfo?(michael.l.comella)
(In reply to :Margaret Leibovic from comment #18)
> What's needed to fix this on 42?

Ideally we fix bug 1182140 but I probably won't get to that by merge since I'm focusing on the pb changes. I'll just apply bug 1182328 here as well.
Flags: needinfo?(michael.l.comella)
The patches that are about to land are from bug 1182328 and were r+'d there.
changeset:  11ebe4ba54b5b74a3d05f264fc6095051089c702
user:       Michael Comella <>
date:       Fri Jul 10 16:40:00 2015 -0700
Bug 1175532 - Use Intent.parseUri for intent:// & android-app://. r=margaret

We now specify no flags to Intent.parseUri so it can accept and parse arbitrary

This patch is originally from bug 1182328 and r+'d there.

changeset:  3b696b49a755c6cb17f20fbbf5fc68c6302813c1
user:       Michael Comella <>
date:       Fri Jul 10 16:42:00 2015 -0700
Bug 1175532 - Only add CATEGORY_BROWSABLE to intent & android-app uris. r=margaret

This patch is originally from bug 1182328 and r+'d there.
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
When choosing "Share" from Action Bar, Context Menu, or Reader View toolbar, "Share via" options pop-up is displayed and works correctly.
Verified as fixed using:
Device: Samsung S5 (Android 4.4.2)
Build: Firefox for Android 42.0a1 (2015-08-09)
You need to log in before you can comment on or make changes to this bug.