tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit d130e467d87ef76a8e54d4b832299dcaaebb57b1
parent 65286773dfdfd75795f801b69367e22bff2cad17
Author: mike a. <mavduevskiy@mozilla.com>
Date:   Wed, 29 Oct 2025 09:53:34 +0000

Bug 1997021 - Add deeplink to app icon selection screen r=android-reviewers,twhite

Differential Revision: https://phabricator.services.mozilla.com/D270440

Diffstat:
Mmobile/android/fenix/app/messaging-fenix.fml.yaml | 1+
Mmobile/android/fenix/app/src/main/AndroidManifest.xml | 2++
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/GlobalDirections.kt | 4++++
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/intent/HomeDeepLinkIntentProcessor.kt | 1+
Mmobile/android/fenix/app/src/main/res/navigation/nav_graph.xml | 3+++
Mmobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/intent/HomeDeepLinkIntentProcessorTest.kt | 8++++++++
6 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/mobile/android/fenix/app/messaging-fenix.fml.yaml b/mobile/android/fenix/app/messaging-fenix.fml.yaml @@ -81,6 +81,7 @@ import: OPEN_SETTINGS_SEARCH_ENGINE: ://settings_search_engine OPEN_SETTINGS_TRACKING_PROTECTION: ://settings_tracking_protection OPEN_SETTINGS_WALLPAPERS: ://settings_wallpapers + OPEN_SETTINGS_APP_ICON: ://settings_app_icon OPEN_SETTINGS: ://settings OPEN_SHARE_SHEET: ://share_sheet TURN_ON_SYNC: ://turn_on_sync diff --git a/mobile/android/fenix/app/src/main/AndroidManifest.xml b/mobile/android/fenix/app/src/main/AndroidManifest.xml @@ -539,6 +539,8 @@ <data android:scheme="${deepLinkScheme}" android:host="settings_tracking_protection"/> <data android:scheme="${deepLinkScheme}" + android:host="settings_app_icon"/> + <data android:scheme="${deepLinkScheme}" android:host="share_sheet"/> <data android:scheme="${deepLinkScheme}" android:host="turn_on_sync"/> diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/GlobalDirections.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/GlobalDirections.kt @@ -64,4 +64,8 @@ enum class GlobalDirections(val navDirections: NavDirections, val destinationId: NavGraphDirections.actionGlobalPrivateBrowsingFragment(), R.id.privateBrowsingFragment, ), + SettingsAppIcon( + NavGraphDirections.actionGlobalAppIconSelectionFragment(), + R.id.appIconSelectionFragment, + ), } diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/intent/HomeDeepLinkIntentProcessor.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/intent/HomeDeepLinkIntentProcessor.kt @@ -74,6 +74,7 @@ class HomeDeepLinkIntentProcessor( "settings_wallpapers" -> GlobalDirections.WallpaperSettings "home_collections" -> GlobalDirections.Home "settings_private_browsing" -> GlobalDirections.SettingsPrivateBrowsing + "settings_app_icon" -> GlobalDirections.SettingsAppIcon else -> return } diff --git a/mobile/android/fenix/app/src/main/res/navigation/nav_graph.xml b/mobile/android/fenix/app/src/main/res/navigation/nav_graph.xml @@ -96,6 +96,9 @@ android:id="@+id/action_global_settingsFragment" app:destination="@id/settingsFragment" /> <action + android:id="@+id/action_global_appIconSelectionFragment" + app:destination="@id/appIconSelectionFragment" /> + <action android:id="@+id/action_global_homeSettingsFragment" app:destination="@id/homeSettingsFragment" /> <action diff --git a/mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/intent/HomeDeepLinkIntentProcessorTest.kt b/mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/intent/HomeDeepLinkIntentProcessorTest.kt @@ -307,6 +307,14 @@ class HomeDeepLinkIntentProcessorTest { verify { out wasNot Called } } + @Test + fun `process settings_app_icon deep link`() { + assertTrue(processorHome.process(testIntent("settings_app_icon"), navController, out, settings)) + + verify { navController.navigate(NavGraphDirections.actionGlobalAppIconSelectionFragment()) } + verify { out wasNot Called } + } + private fun testIntent(uri: String) = Intent("", "$DEEP_LINK_SCHEME://$uri".toUri()) private fun showAddSearchWidgetPrompt(activity: Activity) {