summaryrefslogtreecommitdiffstats
path: root/docs/html/guide
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/guide')
-rw-r--r--docs/html/guide/components/intents-common.jd6
-rw-r--r--docs/html/guide/components/intents-filters.jd4
-rw-r--r--docs/html/guide/topics/manifest/application-element.jd28
3 files changed, 32 insertions, 6 deletions
diff --git a/docs/html/guide/components/intents-common.jd b/docs/html/guide/components/intents-common.jd
index 964f075..167ebde 100644
--- a/docs/html/guide/components/intents-common.jd
+++ b/docs/html/guide/components/intents-common.jd
@@ -1018,7 +1018,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>
@@ -2053,7 +2053,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>
@@ -2164,7 +2164,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>
diff --git a/docs/html/guide/components/intents-filters.jd b/docs/html/guide/components/intents-filters.jd
index 3dec216..0759088 100644
--- a/docs/html/guide/components/intents-filters.jd
+++ b/docs/html/guide/components/intents-filters.jd
@@ -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) {
diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd
index b5af9c3..e63ba71 100644
--- a/docs/html/guide/topics/manifest/application-element.jd
+++ b/docs/html/guide/topics/manifest/application-element.jd
@@ -32,6 +32,7 @@ page.title=&lt;application&gt;
android:<a href="#testOnly">testOnly</a>=["true" | "false"]
android:<a href="#theme">theme</a>="<i>resource or theme</i>"
android:<a href="#uioptions">uiOptions</a>=["none" | "splitActionBarWhenNarrow"]
+ android:<a href="#usesCleartextTraffic">usesCleartextTraffic</a>=["true" | "false"]
android:<a href="#vmSafeMode">vmSafeMode</a>=["true" | "false"] &gt;
. . .
&lt;/application&gt;</pre></dd>
@@ -446,6 +447,33 @@ href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer guide.<
<p>This attribute was added in API level 14.</p>
</dd>
+<dt><a name="usesCleartextTraffic"></a>{@code android:usesCleartextTraffic}</dt>
+<dd>Indicates whether the app intends to use cleartext network traffic, such as cleartext HTTP.
+The default value is {@code "true"}.
+
+<p>When the attribute is set to {@code "false"}, platform components (for example, HTTP and FTP
+stacks, {@link android.app.DownloadManager}, {@link android.media.MediaPlayer}) will refuse the
+app's requests to use cleartext traffic. Third-party libraries are strongly encouraged to honor this
+setting as well. The key reason for avoiding cleartext traffic is the lack of confidentiality,
+authenticity, and protections against tampering: a network attacker can eavesdrop on transmitted
+data and also modify it without being detected.
+
+<p>This flag is honored on a best effort basis because it's impossible to prevent all cleartext
+traffic from Android applications given the level of access provided to them. For example, there's
+no expectation that the {@link java.net.Socket} API will honor this flag because it cannot
+determine whether its traffic is in cleartext. However, most network traffic from applications is
+handled by higher-level network stacks/components which can honor this flag by either reading it
+from {@link android.content.pm.ApplicationInfo#flags ApplicationInfo.flags} or
+{@link android.security.NetworkSecurityPolicy#isCleartextTrafficPermitted() NetworkSecurityPolicy.isCleartextTrafficPermitted()}.
+
+<p>NOTE: {@link android.webkit.WebView} does not honor this flag.
+
+<p>During app development, StrictMode can be used to identify any cleartext traffic from the app: see
+{@link android.os.StrictMode.VmPolicy.Builder#detectCleartextNetwork() StrictMode.VmPolicy.Builder.detectCleartextNetwork()}.
+
+<p>This attribute was added in API level 23.</p>
+</dd>
+
<dt><a name="vmSafeMode"></a>{@code android:vmSafeMode}</dt>
<dd>Indicates whether the app would like the virtual machine (VM) to operate
in safe mode. The default value is {@code "false"}.