Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ffa625a authored by Valentin Kravtsov's avatar Valentin Kravtsov
Browse files

Adding support for passing HTTP headers to a Browser

It is a prt of the following bug fix: http://b/issue?id=2478548

The CL adds the ability to pass HTTP headers to the Browser

Change-Id: Ibf0ad8f678fc5aeef4ac098e5dfbcaed9ada8600
parent 6aa61857
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.speech;

import android.os.Bundle;

import java.util.ArrayList;

/**
@@ -120,6 +122,21 @@ public class RecognizerResultsIntent {
    public static final String EXTRA_VOICE_SEARCH_RESULT_HTML_BASE_URLS =
            "android.speech.extras.VOICE_SEARCH_RESULT_HTML_BASE_URLS";

    /**
     * The key to an extra {@link ArrayList} of {@link Bundle}s that contains key/value pairs.
     * All the values and the keys are {@link String}s. Each key/value pair represents an extra HTTP
     * header. The keys can't be the standard HTTP headers as they are set by the WebView.
     *
     * A list of size 1 may be provided to apply the same HTTP headers to all html results. A list 
     * of the same size as {@link #EXTRA_VOICE_SEARCH_RESULT_STRINGS} may be provided to apply 
     * different HTTP headers to each different html result in the 
     * {@link #EXTRA_VOICE_SEARCH_RESULT_HTML} list.
     *
     * @hide not to be exposed immediately as the implementation details may change
     */
    public static final String EXTRA_VOICE_SEARCH_RESULT_HTTP_HEADERS =
            "android.speech.extras.EXTRA_VOICE_SEARCH_RESULT_HTTP_HEADERS";

    /**
     * The scheme used currently for html content in {@link #EXTRA_VOICE_SEARCH_RESULT_HTML}.
     *