commit 44d9b560e234f75666c2d90c0cea51579b5aaebf
parent be8264d141aeb6d419ff178b2cc6ebf303d5f6d2
Author: mike a. <mavduevskiy@mozilla.com>
Date: Wed, 29 Oct 2025 09:56:58 +0000
Bug 1983768 - Disable app icon selection for <10 android versions r=android-reviewers,twhite
Differential Revision: https://phabricator.services.mozilla.com/D270457
Diffstat:
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt
@@ -4,6 +4,8 @@
package org.mozilla.fenix
+import android.os.Build
+
/**
* A single source for setting feature flags that are mostly based on build type.
*/
@@ -55,4 +57,12 @@ object FeatureFlags {
* Enables the private browsing mode redesign on the homepage.
*/
const val PRIVATE_BROWSING_MODE_REDESIGN = false
+
+ /**
+ * Enables the app icon selection feature.
+ * The implementation of the feature is based on changing activity aliases, and on versions of Android older than 10
+ * that also leads to removal of created shortcuts. We need to work out a good UX to avoid confusion and data loss.
+ * Tracking here: https://bugzilla.mozilla.org/show_bug.cgi?id=1983768
+ */
+ val APP_ICON_SELECTION = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
}
diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
@@ -470,7 +470,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
val appIconSelection by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_app_icon_selection_enabled),
- featureFlag = true,
+ featureFlag = FeatureFlags.APP_ICON_SELECTION,
default = { FxNimbus.features.appIconSelection.value().enabled },
)