Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

fix: handle only valid F-Droid app links

Description

The issue reported that App Lounge couldn't open F-Droid link without a trailing slash.

This MR:

  • adds link handling for both with and without trailing slashes including localized and non-localized links
  • improves code to prevent App Lounge from claiming F-Droid URLs it cannot resolve, such as News, About sections from their website
  • keeps support for real package detail links so valid F-Droid apps (and available in CleanAPK) still open in App Lounge.

Screenshots

Tests

Use package: com.duckduckgo.mobile.android

Should open in App Lounge

Expected result:

  • Android can offer/open App Lounge
  • App Lounge lands on the app details page for com.duckduckgo.mobile.android

Should stay in browser

Expected result:

  • App Lounge must not claim the link
  • The browser should keep handling it

Optional adb commands

adb shell am start -a android.intent.action.VIEW -d "https://f-droid.org/packages/com.duckduckgo.mobile.android"
adb shell am start -a android.intent.action.VIEW -d "https://f-droid.org/en/packages/"
adb shell am start -a android.intent.action.VIEW -d "https://f-droid.org/en/packages/com.duckduckgo.mobile.android/stats"

Issues

https://gitlab.e.foundation/e/os/backlog/-/work_items/3938

10 commandments of code review

👪 ❤️ code review guidelines

Edited by Fahim M. Choudhury

Merge request reports

Loading