For #25808: Handle get(String) deprecation.

fork
mcarare 2 years ago committed by mergify[bot]
parent a4b858e90f
commit 324b29cca7

@ -11,6 +11,7 @@ import android.os.StrictMode
import android.speech.RecognizerIntent import android.speech.RecognizerIntent
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import mozilla.components.support.locale.LocaleManager import mozilla.components.support.locale.LocaleManager
import mozilla.components.support.utils.ext.getParcelableCompat
import mozilla.telemetry.glean.private.NoExtras import mozilla.telemetry.glean.private.NoExtras
import org.mozilla.fenix.GleanMetrics.SearchWidget import org.mozilla.fenix.GleanMetrics.SearchWidget
import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.HomeActivity
@ -42,7 +43,7 @@ class VoiceSearchActivity : AppCompatActivity() {
} }
// Retrieve the previous intent from the saved state // Retrieve the previous intent from the saved state
previousIntent = savedInstanceState?.get(PREVIOUS_INTENT) as Intent? previousIntent = savedInstanceState?.getParcelableCompat(PREVIOUS_INTENT, Intent::class.java)
if (previousIntent.isForSpeechProcessing()) { if (previousIntent.isForSpeechProcessing()) {
// Don't reopen the speech recognizer // Don't reopen the speech recognizer
return return

Loading…
Cancel
Save