diff --git a/.experimenter.yaml b/.experimenter.yaml index e8d0a792f255..280988d4f716 100644 --- a/.experimenter.yaml +++ b/.experimenter.yaml @@ -33,8 +33,8 @@ messaging: type: string description: What should be displayed when a control message is selected. enum: - - show-none - show-next-message + - show-none styles: type: json description: "A map of styles to configure message appearance.\n" diff --git a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt index 06de15cb475a..b23e3026c33e 100644 --- a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt @@ -175,9 +175,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { listOf( HomeDeepLinkIntentProcessor(this), SpeechProcessingIntentProcessor(this, components.core.store), - StartSearchIntentProcessor( - unlockOrientationIfInPiPMode = { unlockOrientationIfInPiPMode() }, - components.core.store), + StartSearchIntentProcessor(), OpenBrowserIntentProcessor(this, ::getIntentSessionId), OpenSpecificTabIntentProcessor(this), DefaultBrowserIntentProcessor(this) diff --git a/app/src/main/java/org/mozilla/fenix/home/intent/StartSearchIntentProcessor.kt b/app/src/main/java/org/mozilla/fenix/home/intent/StartSearchIntentProcessor.kt index 28d5eeba1bd8..ca65f11c4d5a 100644 --- a/app/src/main/java/org/mozilla/fenix/home/intent/StartSearchIntentProcessor.kt +++ b/app/src/main/java/org/mozilla/fenix/home/intent/StartSearchIntentProcessor.kt @@ -7,8 +7,6 @@ package org.mozilla.fenix.home.intent import android.content.Intent import androidx.navigation.NavController import androidx.navigation.navOptions -import mozilla.components.browser.state.store.BrowserStore -import mozilla.components.feature.media.ext.findActiveMediaTab import mozilla.components.service.glean.private.NoExtras import org.mozilla.fenix.GleanMetrics.SearchWidget import org.mozilla.fenix.HomeActivity @@ -22,27 +20,19 @@ import org.mozilla.fenix.ext.nav * Tapping the private browsing mode launcher icon should also open to the search fragment. */ -class StartSearchIntentProcessor( - val unlockOrientationIfInPiPMode: ()->Unit, - val store: BrowserStore, - -) : HomeIntentProcessor { +class StartSearchIntentProcessor() : HomeIntentProcessor { override fun process(intent: Intent, navController: NavController, out: Intent): Boolean { val event = intent.extras?.getString(HomeActivity.OPEN_TO_SEARCH) return if (event != null) { - openSearch(event,navController,out) - if(store.state.findActiveMediaTab()?.id !=null){ - unlockOrientationIfInPiPMode() - } - return true + return openSearch(event,navController,out) } else { false } } - private fun openSearch(event: String,navController: NavController,out: Intent){ + private fun openSearch(event: String,navController: NavController,out: Intent):Boolean{ val source = when (event) { SEARCH_WIDGET -> { SearchWidget.newTabButton.record(NoExtras()) @@ -70,6 +60,7 @@ class StartSearchIntentProcessor( } navController.nav(null, it, options) } + return true } companion object {