Page MenuHomePhabricator

[Android] Use pathAdvancedPattern in intent filter
Open, Needs TriagePublic

Description

There is a new parameter called pathAdvancedPattern that we can use in our intent filter to filter out unwanted URLs from being handled by it. This parameter can now be a fully-fledged regex, which makes it much more powerful (albeit only supported on API 31+).

This can help us filter out things like:

  • Special: pages, which we are currently bouncing out to an external browser explicitly.
  • Any kind of "return" url that is part of a Web flow, e.g. an editing workflow where the user logs in and "returns" to editing. There are likely url-parameters in this flow that could be built into this new regex.

Again, this is technically only available on API 31+ (Android 12), so we'll still need to keep some of our old logic for "handling" unwanted urls, but this change will still cover the vast majority of installs.