airbnb / airbnb/DeepLinkDispatch

DeepLinkProcessor overrides previous intent flags

Open
#198 1 comment 7 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
4.4k
Forks
414
PR merge metrics
No merged PRs in 30d

Description

I can see that the DeepLinkProcessor file has in its code, line 527:

`.addStatement("newIntent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT)")`

Shouldn't it be "addFlags" instead of "setFlags"? The setFlags overrides any other flag I could have previously added to an intent created in @DeepLink annotated method (ex. Intent.FLAG_ACTIVITY_CLEAR_TOP, Intent.FLAG_ACTIVITY_SINGLE_TOP, etc.) and this may cause navigation issues, or anyway override the navigation behaviour I've thought for a specific deep link (ex. I want an activity ran via deep link to start a new task and clear previous ones. Right now I can't).

Thanks

Contributor guide

Open the contributing guide

Research direction

Start with DeepLinkProcessor around line 527 and trace how the generated intent is configured for a deep link. Run the relevant Android/Kotlin tests, or add a focused regression test if the project has an appropriate test location; done means previously supplied intent flags are preserved while the deep-link behavior still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.