Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
For #1216: Remove feature flag for voice search
Browse files Browse the repository at this point in the history
  • Loading branch information
sblatz authored and ekager committed Jun 1, 2020
1 parent ef40710 commit 82facbf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
5 changes: 0 additions & 5 deletions app/src/main/java/org/mozilla/fenix/FeatureFlags.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ object FeatureFlags {
*/
val tabTray = Config.channel.isNightlyOrDebug

/**
* Enables new voice search feature
*/
val voiceSearch = Config.channel.isNightlyOrDebug

/**
* Allows search widget CFR to be displayed.
* This is a placeholder for the experimentation framework determining cohorts.
Expand Down
6 changes: 1 addition & 5 deletions app/src/main/java/org/mozilla/fenix/search/SearchFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import mozilla.components.support.ktx.android.content.isPermissionGranted
import mozilla.components.support.ktx.android.view.hideKeyboard
import mozilla.components.ui.autocomplete.InlineAutocompleteEditText
import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.components.StoreProvider
Expand Down Expand Up @@ -148,10 +147,7 @@ class SearchFragment : Fragment(), UserInteractionHandler {
BrowserToolbar.Button(
ContextCompat.getDrawable(requireContext(), R.drawable.ic_microphone)!!,
requireContext().getString(R.string.voice_search_content_description),
visible = {
requireContext().settings().shouldShowVoiceSearch &&
FeatureFlags.voiceSearch && speechIsAvailable()
},
visible = { requireContext().settings().shouldShowVoiceSearch && speechIsAvailable() },
listener = ::launchVoiceSearch
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.preference.CheckBoxPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.SwitchPreference
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.ext.settings
Expand Down Expand Up @@ -63,7 +62,6 @@ class SearchEngineFragment : PreferenceFragmentCompat() {

val showVoiceSearchPreference =
findPreference<SwitchPreference>(getPreferenceKey(R.string.pref_key_show_voice_search))?.apply {
isVisible = FeatureFlags.voiceSearch
isChecked = context.settings().shouldShowVoiceSearch
}

Expand Down

0 comments on commit 82facbf

Please sign in to comment.