Implement CustomTabsService.mayLaunchUrl()

RESOLVED FIXED in Firefox 53

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: droeh, Assigned: droeh)

Tracking

(Blocks 1 bug)

unspecified
Firefox 53
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment)

We should open speculative connections for (a limited number of) urls supplied by mayLaunchUrl in GeckoCustomTabsService.
Oh, this would be awesome.
This opens a speculative connection for the supplied url and up to 50 additional urls given in the list of other likely urls.
Attachment #8813727 - Flags: review?(snorp)
Comment on attachment 8813727 [details] [diff] [review]
Implement mayLaunchUrl()

Review of attachment 8813727 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good with a couple nits

::: mobile/android/base/java/org/mozilla/gecko/customtabs/GeckoCustomTabsService.java
@@ +67,5 @@
> +            return true;
> +        }
> +
> +        for (int i = 0; i < list.size() && i < MAX_SPECULATIVE_URLS; i++) {
> +            Bundle temp = list.get(i);

I prefer names like 'item' or something instead of temp

@@ +69,5 @@
> +
> +        for (int i = 0; i < list.size() && i < MAX_SPECULATIVE_URLS; i++) {
> +            Bundle temp = list.get(i);
> +            if (temp == null) {
> +                break;

We probably want 'continue' instead, right? There could be other valid items in the list.

@@ +74,5 @@
> +            }
> +
> +            Uri listUri = temp.getParcelable(KEY_URL);
> +            if (listUri == null) {
> +                break;

Same re: continue above
Attachment #8813727 - Flags: review?(snorp) → review+
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5d426f771592
Open speculative connections for URLs supplied to GeckoCustomTabsService.mayLaunchUrl() r=snorp
https://hg.mozilla.org/mozilla-central/rev/5d426f771592
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
You need to log in before you can comment on or make changes to this bug.