Skip to content

Commit

Permalink
Remove pixel for voice search error (#4029)
Browse files Browse the repository at this point in the history
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
The items in Bold are required
If your PR involves UI changes:
1. Upload screenshots or screencasts that illustrate the changes before
/ after
2. Add them under the UI changes section (feel free to add more columns
if needed)
If your PR does not involve UI changes, you can remove the **UI
changes** section

At a minimum, make sure your changes are tested in API 23 and one of the
more recent API levels available.
-->

Task/Issue URL:
https://app.asana.com/0/1205278999335242/1205319123637373/f




---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1206212313947171
  • Loading branch information
CrisBarreiro authored Dec 20, 2023
1 parent 0290807 commit 1bf98a2
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import com.duckduckgo.common.utils.plugins.pixel.PixelParamRemovalPlugin.PixelPa
import com.duckduckgo.common.utils.plugins.pixel.PixelParamRemovalPlugin.PixelParameter.APP_VERSION
import com.duckduckgo.common.utils.plugins.pixel.PixelParamRemovalPlugin.PixelParameter.ATB
import com.duckduckgo.di.scopes.AppScope
import com.duckduckgo.voice.impl.VoiceSearchPixelNames
import com.squareup.anvil.annotations.ContributesMultibinding
import javax.inject.Inject
import okhttp3.Interceptor
Expand Down Expand Up @@ -76,7 +75,6 @@ object PixelInterceptorPixelsRequiringDataCleaning : PixelParamRemovalPlugin {
return listOf(
AppPixelName.EMAIL_COPIED_TO_CLIPBOARD.pixelName to PixelParameter.removeAll(),
StatisticsPixelName.BROWSER_DAILY_ACTIVE_FEATURE_STATE.pixelName to PixelParameter.removeAll(),
VoiceSearchPixelNames.VOICE_SEARCH_ERROR.pixelName to PixelParameter.removeAll(),
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ class RealVoiceSearchActivityLauncher @Inject constructor(
}
} else {
if (code == VOICE_SEARCH_ERROR) {
pixel.fire(
pixel = VoiceSearchPixelNames.VOICE_SEARCH_ERROR,
parameters = mapOf(KEY_PARAM_SOURCE to _source.paramValueName, "error" to data),
)
activity.window?.decorView?.rootView?.let {
val snackbar = Snackbar.make(it, activity.getString(string.voiceSearchError), Snackbar.LENGTH_LONG)
snackbar.view.translationY =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ enum class VoiceSearchPixelNames(override val pixelName: String) : Pixel.PixelNa
VOICE_SEARCH_PRIVACY_DIALOG_REJECTED("m_voice_search_privacy_dialog_rejected"),
VOICE_SEARCH_STARTED("m_voice_search_started"),
VOICE_SEARCH_DONE("m_voice_search_done"),
VOICE_SEARCH_ERROR("m_voice_search_error"),
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class RealVoiceSearchActivityLauncherTest {
val lastKnownRequest = activityResultLauncherWrapper.lastKnownRequest as ActivityResultLauncherWrapper.Request.ResultFromVoiceSearch
lastKnownRequest.onResult(VoiceSearchActivity.VOICE_SEARCH_ERROR, "1")

verify(pixel).fire(VoiceSearchPixelNames.VOICE_SEARCH_ERROR, mapOf("source" to "browser", "error" to "1"))
assertNull(lastKnownEvent)
}

Expand Down

0 comments on commit 1bf98a2

Please sign in to comment.