Custom tabs: Menu says "Open in Android-System" if no default browser is set

VERIFIED FIXED in Firefox 57

Status

()

Firefox for Android
General
P1
normal
VERIFIED FIXED
a year ago
3 months ago

People

(Reporter: JanH, Assigned: walkingice)

Tracking

(Blocks: 1 bug)

55 Branch
Firefox 57
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

Comment hidden (empty)
I can confirm this behavior, seen it while testing CustomTabs. And today found another one, "Open in Open" on Yahnac and Chromer, Google+. 
Here is a screenshot: https://i.imgur.com/0BP31QB.png.
(Assignee)

Updated

a year ago
Assignee: nobody → walkingice0204
This issue is still reproducible with new CustomTab implementation. Setting the flag 57:affected.
status-firefox55: affected → ---
status-firefox57: --- → affected
Blocks: 1356346
Priority: -- → P1
Comment hidden (mozreview-request)

Comment 4

8 months ago
mozreview-review
Comment on attachment 8906493 [details]
Bug 1355735 - Add util to pick name for default browser

https://reviewboard.mozilla.org/r/178260/#review183166

::: mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java:373
(Diff revision 1)
>          final MenuItem openItem = geckoMenu.findItem(R.id.custom_tabs_menu_open_in);
>          if (openItem != null) {
> -            final Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://"));
> -            final ResolveInfo info = getPackageManager()
> -                    .resolveActivity(browserIntent, PackageManager.MATCH_DEFAULT_ONLY);
> -            final String name = info.loadLabel(getPackageManager()).toString();
> +            final ResolveInfo info = PackageUtil.getDefaultBrowser(this);
> +
> +            final String name = (info == null)
> +                    ? "..."

Should we use R.string.ellipsis(unicode \u2026 for horizontal ellipsis), instead of three dots?
Comment hidden (mozreview-request)
(Assignee)

Comment 6

8 months ago
mozreview-review-reply
Comment on attachment 8906493 [details]
Bug 1355735 - Add util to pick name for default browser

https://reviewboard.mozilla.org/r/178260/#review183166

> Should we use R.string.ellipsis(unicode \u2026 for horizontal ellipsis), instead of three dots?

yes this one is much better

Comment 7

8 months ago
mozreview-review
Comment on attachment 8906493 [details]
Bug 1355735 - Add util to pick name for default browser

https://reviewboard.mozilla.org/r/178260/#review183176
Attachment #8906493 - Flags: review?(topwu.tw) → review+

Comment 8

8 months ago
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s 04c4813230fd -d 629ebf9fa725: rebasing 419163:04c4813230fd "Bug 1355735 - Add util to pick name for default browser r=jwu" (tip)
merging mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
merging mobile/android/base/moz.build
warning: conflicts while merging mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Comment hidden (mozreview-request)

Comment 10

8 months ago
Pushed by walkingice0204@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/cdd9f6610d88
Add util to pick name for default browser r=jwu

Comment 11

8 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/cdd9f6610d88
Status: NEW → RESOLVED
Last Resolved: 8 months ago
status-firefox57: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Verified as fixed on latest Nightly 60.0a1, Beta 59.0b11 and Relese build 58.0.2. 
Device: Samsung Galaxy Note 4 (Android 5.0.1).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.