Skip to content

Conversation

@shahzaibj
Copy link
Contributor

@shahzaibj shahzaibj commented Sep 28, 2025

Fixes AB#3387976

The previous fix seems to have addressed the issue only partially.
Previous fix: #2745

Basically what's happening is that even with that flag CCT will sometimes still launch the URL in browser and this is happening because we're setting the browser's pkg name explicitly on the intent which tells the OS that this MUST be opened in the browser.

Checked CCT logs and they print something like:

Launching in browser as Browser pkg was explicitly set on the Intent

Once we remove the explicit pkg name then OS finds the best possible app on the device to handle the intent. For an app link that's the the broker hosting app.

@shahzaibj shahzaibj self-assigned this Sep 28, 2025
Copilot AI review requested due to automatic review settings September 28, 2025 20:28
@shahzaibj shahzaibj requested a review from a team as a code owner September 28, 2025 20:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where app link redirects from Chrome Custom Tabs (CCT) were failing due to forced browser package preferences. The fix removes explicit package setting for browser intents to allow the system to properly handle app link redirects.

  • Removes forced browser package assignment in CustomTabsManager
  • Removes explicit package setting in SwitchBrowserActivity browser intent

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
CustomTabsManager.java Removes setPackage call that forced CCT to use specific browser package
SwitchBrowserActivity.kt Removes explicit package setting on browser intent to allow system routing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

@github-actions github-actions bot changed the title Fix for app link redirect from CCT due to forced browser preference Fix for app link redirect from CCT due to forced browser preference, Fixes AB#3387976 Sep 29, 2025
@shahzaibj shahzaibj requested a review from a team as a code owner September 29, 2025 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants