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

Commit 93bb5419 authored by Narayan Kamath's avatar Narayan Kamath Committed by Android (Google) Code Review
Browse files

Merge "Remove references to apache-http from various documents."

parents eb8320a2 56eb9897
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1027,7 +1027,7 @@ and include email details such as the recipient and subject using the extra keys
<dt><b>MIME Type</b></dt>
<dd>
  <dl>
    <dt>{@link org.apache.http.protocol.HTTP#PLAIN_TEXT_TYPE} ("text/plain")
    <dt><code>"text/plain"</code>
    <dt><code>"*/*"</code>
  </dl>
</dd>
@@ -2447,7 +2447,7 @@ details such as the phone number, subject, and message body using the extra keys
<dt><b>MIME Type</b></dt>
<dd>
  <dl>
    <dt>{@link org.apache.http.protocol.HTTP#PLAIN_TEXT_TYPE} (<code>"text/plain"</code>)
    <dt><code>"text/plain"</code>
    <dt><code>"image/*"</code>
    <dt><code>"video/*"</code>
  </dl>
@@ -2558,7 +2558,7 @@ and specify the web URL in the intent data.</p>
  <dt><b>MIME Type</b></dt>
  <dd>
    <dl>
      <dt>{@link org.apache.http.protocol.HTTP#PLAIN_TEXT_TYPE} (<code>"text/plain"</code>)
      <dt><code>"text/plain"</code>
      <dt><code>"text/html"</code>
      <dt><code>"application/xhtml+xml"</code>
      <dt><code>"application/vnd.wap.xhtml+xml"</code>
+1 −3
Original line number Diff line number Diff line
@@ -376,9 +376,7 @@ the intent.</p>
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
sendIntent.setType({@link
        org.apache.http.protocol.HTTP#PLAIN_TEXT_TYPE
        HTTP.PLAIN_TEXT_TYPE}); // "text/plain" MIME type
sendIntent.setType("text/plain");

// Verify that the intent will resolve to an activity
if (sendIntent.resolveActivity(getPackageManager()) != null) {
+4 −7
Original line number Diff line number Diff line
@@ -246,10 +246,8 @@ TrafficStats.tagSocket(outputSocket);
// Transfer data using socket
TrafficStats.untagSocket(outputSocket);</pre>

<p>Alternatively, the Apache {@link org.apache.http.client.HttpClient} and 
{@link java.net.URLConnection} APIs included in the platform
automatically tag sockets internally based on the active tag (as 
identified by 
<p>Alternatively, the {@link java.net.URLConnection} APIs included in the platform
automatically tag sockets internally based on the active tag (as identified by 
{@link android.net.TrafficStats#getThreadStatsTag getThreadStatsTag()}).
These APIs correctly tag/untag sockets when recycled through
keep-alive pools. In the following example,  
@@ -258,15 +256,14 @@ sets the active tag to be {@code 0xF00D}.
There can only be one active tag per thread. 
That is the value that will 
be returned by {@link android.net.TrafficStats#getThreadStatsTag getThreadStatsTag()}
and thus used by {@link org.apache.http.client.HttpClient}  
 to tag sockets. The {@code finally} statement 
and thus used by the HTTP client to tag sockets. The {@code finally} statement 
invokes 
{@link android.net.TrafficStats#clearThreadStatsTag clearThreadStatsTag()} 
to clear the tag.</p>

<pre>TrafficStats.setThreadStatsTag(0xF00D);
    try {
        // Make network request using HttpClient.execute()
        // Make network request using your http client.
    } finally {
        TrafficStats.clearThreadStatsTag();
}</pre>
+1 −2
Original line number Diff line number Diff line
@@ -52,8 +52,7 @@ android.net.SSLCertificateSocketFactory
android.net.SSLCertificateSocketFactory}. Rather than using this class, we
encourage app developers to use high-level methods for interacting with
cryptography. Most apps can use APIs like {@link
javax.net.ssl.HttpsURLConnection}, {@link org.apache.http.client.HttpClient},
and {@link android.net.http.AndroidHttpClient} without needing to set a custom
javax.net.ssl.HttpsURLConnection} without needing to set a custom
{@link javax.net.ssl.TrustManager} or create an {@link
android.net.SSLCertificateSocketFactory}.</p>

+2 −2
Original line number Diff line number Diff line
@@ -50,8 +50,8 @@ application manifest must include the following permissions:</p>
<h2 id="http-client">Choose an HTTP Client</h2>

<p>Most network-connected Android apps  use HTTP to send and receive  data.
Android includes two HTTP clients: {@link java.net.HttpURLConnection} and Apache
 {@link org.apache.http.client.HttpClient}. Both support HTTPS, streaming uploads and downloads,  configurable
Android includes two HTTP clients: {@link java.net.HttpURLConnection} and the Apache HTTP client.
Both support HTTPS, streaming uploads and downloads,  configurable
timeouts, IPv6, and connection pooling. We recommend using {@link
java.net.HttpURLConnection} for applications targeted at Gingerbread and higher. For
more discussion of this topic, see the blog post <a
Loading