Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Bug] Can't set as default browser on Android 5 #5972

Closed
3 tasks
sblatz opened this issue Oct 11, 2019 · 7 comments
Closed
3 tasks

[Bug] Can't set as default browser on Android 5 #5972

sblatz opened this issue Oct 11, 2019 · 7 comments
Assignees
Labels
🐞 bug Crashes, Something isn't working, .. E3 Estimation Point: average, 2 - 3 days Feature:FennecTransition Feature:PrivateBrowsing P2 Upcoming release wontfix

Comments

@sblatz
Copy link
Contributor

sblatz commented Oct 11, 2019

Acceptance Criteria

  • Set as default always should work on Android 5
  • Contact SUMO with the results of what we decided so they can update the Private Browsing Mode article to explain if this doesn't work on Android 5
  • If this goes past the E3 timebox, then highlight it

Details

On Android 5, when I press "always" to launch links in Fenix or Private Fenix, the preference is not remembered.

This is the root cause of #5870.

I did a bit of investigation, and we could set the default on Preview v2.0. I believe adding the activity-alias for "always open links in private mode" silently breaks things on Android 5.

The issue can be seen below.

set as default 2019-10-11 14_38_05

┆Issue is synchronized with this Jira Task

@liuche
Copy link
Contributor

liuche commented Oct 15, 2019

We first want to test taking out the activity-alias, and see if this is actually the problem.

Questions:

  • How many Fennec users are on Android 5?
  • Is this broken on all versions of 5?

Some options:

  • Have a separate manifest that disables the activity-alias for Android 5 (and disabling the Private Mode launcher for those users)

@boek boek added the needs:sumo Mozilla Suport - suport.mozilla.org label Oct 15, 2019
@sblatz sblatz added Feature:FennecTransition Feature:PrivateBrowsing P2 Upcoming release and removed needs:sumo Mozilla Suport - suport.mozilla.org labels Oct 15, 2019
@boek boek added this to Prioritized Bug Backlog in Fenix Sprint Kanban Oct 15, 2019
@liuche liuche added the E3 Estimation Point: average, 2 - 3 days label Oct 15, 2019
boek added a commit to boek/fenix that referenced this issue Nov 16, 2019
@boek boek self-assigned this Nov 16, 2019
@boek boek moved this from Prioritized Bug Backlog to In Dev Review in Fenix Sprint Kanban Nov 16, 2019
boek added a commit to boek/fenix that referenced this issue Nov 20, 2019
@athomasmoz athomasmoz added this to Polish Bugs to Triage in Feature Polish Nov 22, 2019
@mcarare mcarare moved this from Polish Bugs to Triage to In progress in Feature Polish Nov 25, 2019
@boek
Copy link
Contributor

boek commented Nov 26, 2019

This feature doesn't work on Android 5. The fix was to remove it until we set the minimum Android version to 6 or above.

@boek boek added the eng:qa:needed QA Needed label Nov 26, 2019
@project-bot project-bot bot moved this from In Dev Review to Ready for QA in Fenix Sprint Kanban Nov 26, 2019
boek added a commit to boek/fenix that referenced this issue Nov 26, 2019
@boek boek moved this from In progress to Ready for QA in Feature Polish Nov 26, 2019
@AndiAJ
Copy link
Collaborator

AndiAJ commented Nov 27, 2019

Hi @boek , I've just checked this issue on the latest Nightly Build #13310607 from 11/27 using the following devices:
• LG Nexus 4 (Android 5.1.1)
• Asus Nexus 7 (Android 5.1.1)

► Have only Fenix installed (Chrome disabled) ✔️
Fenix is set as the default browser without any other actions, and work properly
20191127_152904

► Having Chrome installed and afterwards install Fenix ❌
Seems that Chrome is set as default browser.
Can't actually disable it (Settings>Apps>Chrome>Clear defaults) the "Clear defaults" button seems to be disabled.
The only workaround is to disable Chrome and to have only Fenix installed.
20191127_154628

► Having only Firefox and Fenix installed (Chrome disabled) ❌
Firefox is set as default browser.
Can't disable it (Settings>Apps>Chrome>Clear defaults) the "Clear defaults" button seems to be disabled.
The only workaround is to uninstall Firefox and to have only Fenix installed.
20191127_160441

► Having Chrome, Firefox & Fenix installed ❌
Chrome is set as default browser.
As per the above scenarios, I can't "Clear defaults" so the only workaround is to disable it.
After disabling Chrome, the default browser is Firefox, and again the "Clear defaults" button is disabled.
Fenix is set as the default browser app automatically only after uninstalling Firefox.
20191127_164931

Please review and let me know how should we proceed.

@liuche
Copy link
Contributor

liuche commented Dec 20, 2019

Wait, since the PB mode activity-alias was removed, does this mean this is a separate regression, unrelated to PB mode? @sblatz

@kevinslashslash
Copy link

Sorry if this is the wrong ticket to post in.
My understanding is part of the root issue is a UX problem with setting the default browser on Android 5 and 6 because they did not have a screen in system settings.
An alternative approach, as done in Nova Launcher Settings > Set Default Home, is to invalidate the currently set one and then fire an intent so the user picks the default browser again.
Android invalidates the default intent handler when resolving the intent if the list of possible handlers has changed. So an app can:
Have a disabled activity/activity-alias that handles the default browser intent
Enable that component
Use packagemanager to resolve the default, it should give back the intent chooser
Disable that component
Start activity for the default intent, it'll show the intent chooser and let the user pick their default. Alternatively, the setting could just be "Clear default browser" and the preference could show the currently set browser app then change to "Not set" and the user will be prompted next time they open a link.

Using this approach Firefox on Android 5 and 6 could have a Default Browser option in settings, which is handy, and also fixes the UX issue of where to put the "Always open in private tabs" checkbox.

I'd be happy to do a pull request for this if it sounds like a good approach.

@sblatz
Copy link
Contributor Author

sblatz commented Dec 30, 2019

@liuche Yeah, this seems like some weird interaction happening with "Clear defaults"? I don't believe it should be working like this. It seems to be a separate regression from the activity-alias.

@stale
Copy link

stale bot commented Feb 5, 2021

See: #17373 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 5, 2021
@stale stale bot closed this as completed Feb 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Crashes, Something isn't working, .. E3 Estimation Point: average, 2 - 3 days Feature:FennecTransition Feature:PrivateBrowsing P2 Upcoming release wontfix
Projects
Sawyer's Features
  
Private Mode
Development

No branches or pull requests

5 participants