From dc5932a8121801f023389db8cf5c83b850cd158d Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Sat, 26 Sep 2026 18:26:22 -0400 Subject: [PATCH] feat(browser): name the browser the hand-off tile will open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Other browser" says what it is not. When the system will name a default, the tile now says "Open in Chrome" — which is also the answer to "where does this go?", the question the tile exists to answer. Knowing the name took a `` entry. Android 11+ package visibility answers `resolveActivity` with nothing for a scheme the manifest does not declare, so the app could see every payment scheme it had asked about and not https. One entry alongside those, read-only: it names the target, it does not change where anything goes. `defaultBrowserName` is null whenever a name would be a promise we cannot keep — no default set (the system resolves to its own picker, which would otherwise be labelled "Android System"), the only handler is Amethyst, or visibility still hides it. The tile falls back to "Open in browser" and the hand-off keeps going through a chooser either way, so a wrong answer here costs a label and never a mis-launch. Only the full-screen browser passes a name so far; the embedded tab still shows the generic label. Verified on an SM-T220: the tile reads "Open in Chrome", on one line. Co-Authored-By: Claude Opus 5 (1M context) --- amethyst/src/main/AndroidManifest.xml | 11 +++ .../composeResources/values/strings.xml | 1 + .../commons/browser/ui/pill/BrowserPill.kt | 9 ++- .../browser/ui/pill/BrowserPillModel.kt | 7 ++ .../amethyst/napplethost/DefaultBrowser.kt | 69 +++++++++++++++++++ .../napplethost/NappletBrowserActivity.kt | 1 + 6 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 nappletHost/src/main/kotlin/com/vitorpamplona/amethyst/napplethost/DefaultBrowser.kt diff --git a/amethyst/src/main/AndroidManifest.xml b/amethyst/src/main/AndroidManifest.xml index dd42a938dd..d2b9dabc65 100644 --- a/amethyst/src/main/AndroidManifest.xml +++ b/amethyst/src/main/AndroidManifest.xml @@ -17,6 +17,17 @@ + + + + + + +