Closed Bug 1355735 Opened 7 years ago Closed 7 years ago

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

Categories

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

55 Branch
All
Android
defect

Tracking

(firefox57 fixed)

VERIFIED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: JanH, Assigned: walkingice)

References

Details

Attachments

(1 file)

      No description provided.
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: nobody → walkingice0204
This issue is still reproducible with new CustomTab implementation. Setting the flag 57:affected.
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 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 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+
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)
Pushed by walkingice0204@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/cdd9f6610d88
Add util to pick name for default browser r=jwu
https://hg.mozilla.org/mozilla-central/rev/cdd9f6610d88
Status: NEW → RESOLVED
Closed: 7 years ago
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
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.