From 2df5ba777a6ad271b1af6d9ef18d79e2aca5f105 Mon Sep 17 00:00:00 2001 From: Chad Brubaker Date: Mon, 11 Apr 2016 13:31:24 -0700 Subject: [PATCH] Document when usesCleartextTraffic is ignored. In N and above when using an Android Network Security Config the cleartext configuration from that is used and android:usesCleartextTraffic in the manifest is ignored. Bug:27596429 Change-Id: I50ec765cead6cfd6bbaec585723f99d72e0fd945 --- core/java/android/content/pm/ApplicationInfo.java | 3 +++ docs/html/guide/topics/manifest/application-element.jd | 2 ++ 2 files changed, 5 insertions(+) diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 104feb5dc7cd1..585d2a3c4b255 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -366,6 +366,9 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { * *

NOTE: {@code WebView} does not honor this flag. * + *

This flag is ignored on Android N and above if an Android Network Security Config is + * present. + * *

This flag comes from * {@link android.R.styleable#AndroidManifestApplication_usesCleartextTraffic * android:usesCleartextTraffic} of the <application> tag. diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd index 5600b5c5c4693..887b4eabe2b78 100644 --- a/docs/html/guide/topics/manifest/application-element.jd +++ b/docs/html/guide/topics/manifest/application-element.jd @@ -472,6 +472,8 @@ from {@link android.content.pm.ApplicationInfo#flags ApplicationInfo.flags} or {@link android.os.StrictMode.VmPolicy.Builder#detectCleartextNetwork() StrictMode.VmPolicy.Builder.detectCleartextNetwork()}.

This attribute was added in API level 23.

+ +

This flag is ignored on Android N and above if an Android Network Security Config is present.

{@code android:vmSafeMode}