am fbad902a: am 80fa2cc8: Merge "Add android.speech.RecognizerIntent EXTRA_PREFER_OFFLINE to indicate whether to only use an offline speech recognition engine." into mnc-dev

* commit 'fbad902aad433f4eaa82192019fef1dcaba26d47':
  Add android.speech.RecognizerIntent EXTRA_PREFER_OFFLINE to indicate whether to only use an offline speech recognition engine.
diff --git a/api/current.txt b/api/current.txt
index 1117623..3ba9483 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -29201,6 +29201,7 @@
     field public static final java.lang.String EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE = "android.speech.extra.ONLY_RETURN_LANGUAGE_PREFERENCE";
     field public static final java.lang.String EXTRA_ORIGIN = "android.speech.extra.ORIGIN";
     field public static final java.lang.String EXTRA_PARTIAL_RESULTS = "android.speech.extra.PARTIAL_RESULTS";
+    field public static final java.lang.String EXTRA_PREFER_OFFLINE = "android.speech.extra.PREFER_OFFLINE";
     field public static final java.lang.String EXTRA_PROMPT = "android.speech.extra.PROMPT";
     field public static final java.lang.String EXTRA_RESULTS = "android.speech.extra.RESULTS";
     field public static final java.lang.String EXTRA_RESULTS_PENDINGINTENT = "android.speech.extra.RESULTS_PENDINGINTENT";
diff --git a/api/system-current.txt b/api/system-current.txt
index 7210666f..72e11b8 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -31306,6 +31306,7 @@
     field public static final java.lang.String EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE = "android.speech.extra.ONLY_RETURN_LANGUAGE_PREFERENCE";
     field public static final java.lang.String EXTRA_ORIGIN = "android.speech.extra.ORIGIN";
     field public static final java.lang.String EXTRA_PARTIAL_RESULTS = "android.speech.extra.PARTIAL_RESULTS";
+    field public static final java.lang.String EXTRA_PREFER_OFFLINE = "android.speech.extra.PREFER_OFFLINE";
     field public static final java.lang.String EXTRA_PROMPT = "android.speech.extra.PROMPT";
     field public static final java.lang.String EXTRA_RESULTS = "android.speech.extra.RESULTS";
     field public static final java.lang.String EXTRA_RESULTS_PENDINGINTENT = "android.speech.extra.RESULTS_PENDINGINTENT";
diff --git a/core/java/android/speech/RecognizerIntent.java b/core/java/android/speech/RecognizerIntent.java
index e991d84..ce94315c 100644
--- a/core/java/android/speech/RecognizerIntent.java
+++ b/core/java/android/speech/RecognizerIntent.java
@@ -403,4 +403,12 @@
      */
     public static final String EXTRA_SUPPORTED_LANGUAGES =
             "android.speech.extra.SUPPORTED_LANGUAGES";
+
+    /**
+     * Optional boolean, to be used with {@link #ACTION_RECOGNIZE_SPEECH},
+     * {@link #ACTION_VOICE_SEARCH_HANDS_FREE}, {@link #ACTION_WEB_SEARCH} to indicate whether to
+     * only use an offline speech recognition engine. The default is false, meaning that either
+     * network or offline recognition engines may be used.
+     */
+    public static final String EXTRA_PREFER_OFFLINE = "android.speech.extra.PREFER_OFFLINE";
 }