For #25808: Handle get(String) deprecation.

This commit is contained in:
mcarare 2022-07-06 15:23:07 +03:00 committed by mergify[bot]
parent a4b858e90f
commit 324b29cca7
1 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import android.os.StrictMode
import android.speech.RecognizerIntent
import androidx.appcompat.app.AppCompatActivity
import mozilla.components.support.locale.LocaleManager
import mozilla.components.support.utils.ext.getParcelableCompat
import mozilla.telemetry.glean.private.NoExtras
import org.mozilla.fenix.GleanMetrics.SearchWidget
import org.mozilla.fenix.HomeActivity
@ -42,7 +43,7 @@ class VoiceSearchActivity : AppCompatActivity() {
}
// 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()) {
// Don't reopen the speech recognizer
return