Merge "Unhide public API about cleartext traffic policy."

This commit is contained in:
Alex Klyubin
2015-03-27 15:23:03 +00:00
committed by Android (Google) Code Review
6 changed files with 33 additions and 22 deletions

View File

@@ -1361,6 +1361,7 @@ package android {
field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310
field public static final int useLevel = 16843167; // 0x101019f
field public static final int userVisible = 16843409; // 0x1010291
field public static final int usesCleartextTraffic = 16844009; // 0x10104e9
field public static final int value = 16842788; // 0x1010024
field public static final int valueFrom = 16843486; // 0x10102de
field public static final int valueTo = 16843487; // 0x10102df
@@ -8728,6 +8729,7 @@ package android.content.pm {
field public static final int FLAG_SYSTEM = 1; // 0x1
field public static final int FLAG_TEST_ONLY = 256; // 0x100
field public static final int FLAG_UPDATED_SYSTEM_APP = 128; // 0x80
field public static final int FLAG_USES_CLEARTEXT_TRAFFIC = 134217728; // 0x8000000
field public static final int FLAG_VM_SAFE_MODE = 16384; // 0x4000
field public java.lang.String backupAgentName;
field public java.lang.String className;
@@ -27770,6 +27772,11 @@ package android.security {
method public android.security.KeyStoreParameter.Builder setEncryptionRequired(boolean);
}
public class NetworkSecurityPolicy {
method public static android.security.NetworkSecurityPolicy getInstance();
method public boolean isCleartextTrafficPermitted();
}
}
package android.service.carrier {

View File

@@ -1436,6 +1436,7 @@ package android {
field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310
field public static final int useLevel = 16843167; // 0x101019f
field public static final int userVisible = 16843409; // 0x1010291
field public static final int usesCleartextTraffic = 16844009; // 0x10104e9
field public static final int value = 16842788; // 0x1010024
field public static final int valueFrom = 16843486; // 0x10102de
field public static final int valueTo = 16843487; // 0x10102df
@@ -8946,6 +8947,7 @@ package android.content.pm {
field public static final int FLAG_SYSTEM = 1; // 0x1
field public static final int FLAG_TEST_ONLY = 256; // 0x100
field public static final int FLAG_UPDATED_SYSTEM_APP = 128; // 0x80
field public static final int FLAG_USES_CLEARTEXT_TRAFFIC = 134217728; // 0x8000000
field public static final int FLAG_VM_SAFE_MODE = 16384; // 0x4000
field public java.lang.String backupAgentName;
field public java.lang.String className;
@@ -29643,6 +29645,11 @@ package android.security {
method public android.security.KeyStoreParameter.Builder setEncryptionRequired(boolean);
}
public class NetworkSecurityPolicy {
method public static android.security.NetworkSecurityPolicy getInstance();
method public boolean isCleartextTrafficPermitted();
}
}
package android.service.carrier {

View File

@@ -340,8 +340,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
* cleartext network traffic, in which case platform components (e.g., HTTP stacks,
* {@code WebView}, {@code MediaPlayer}) will refuse app's requests to use cleartext traffic.
* Third-party libraries are encouraged to honor this flag as well.
*
* @hide
*/
public static final int FLAG_USES_CLEARTEXT_TRAFFIC = 1<<27;
@@ -379,7 +377,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
* {@link #FLAG_LARGE_HEAP}, {@link #FLAG_STOPPED},
* {@link #FLAG_SUPPORTS_RTL}, {@link #FLAG_INSTALLED},
* {@link #FLAG_IS_DATA_ONLY}, {@link #FLAG_IS_GAME},
* {@link #FLAG_FULL_BACKUP_ONLY}, {@link #FLAG_MULTIARCH}.
* {@link #FLAG_FULL_BACKUP_ONLY}, {@link #FLAG_USES_CLEARTEXT_TRAFFIC},
* {@link #FLAG_MULTIARCH}.
*/
public int flags = 0;

View File

@@ -24,8 +24,6 @@ package android.security;
*
* <p>The policy currently consists of a single flag: whether cleartext network traffic is
* permitted. See {@link #isCleartextTrafficPermitted()}.
*
* @hide
*/
public class NetworkSecurityPolicy {
@@ -48,9 +46,9 @@ public class NetworkSecurityPolicy {
* without TLS or STARTTLS) is permitted for this process.
*
* <p>When cleartext network traffic is not permitted, the platform's components (e.g. HTTP and
* FTP stacks, {@code WebView}, {@code MediaPlayer}) will refuse this process's requests to use
* cleartext traffic. Third-party libraries are strongly encouraged to honor this setting as
* well.
* FTP stacks, {@link android.webkit.WebView}, {@link android.media.MediaPlayer}) will refuse
* this process's requests to use cleartext traffic. Third-party libraries are strongly
* encouraged to honor this setting as well.
*
* <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

View File

@@ -389,13 +389,12 @@
with the same {@link android.R.attr#taskAffinity} as it has. -->
<attr name="allowTaskReparenting" format="boolean" />
<!-- Declare that this application may use cleartext traffic (e.g., HTTP rather than HTTPS;
WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP without STARTTLS or TLS).
Defaults to true. If set to false {@code false}, the app declares that it does not
intend to use cleartext network traffic, in which case platform components (e.g.,
HTTP stacks, {@code WebView}, {@code MediaPlayer}) will refuse app's requests to use
cleartext traffic. Third-party libraries are encouraged to honor this flag as well.
@hide -->
<!-- Declare that this application may use cleartext traffic, such as HTTP rather than HTTPS;
WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP without STARTTLS or TLS.
Defaults to true. If set to false {@code false}, the application declares that it does not
intend to use cleartext network traffic, in which case platform components (e.g. HTTP
stacks, {@code WebView}, {@code MediaPlayer}) will refuse applications's requests to use
cleartext traffic. Third-party libraries are encouraged to honor this flag as well. -->
<attr name="usesCleartextTraffic" format="boolean" />
<!-- Declare that code from this application will need to be loaded into other
@@ -1164,13 +1163,13 @@
"com.google". -->
<attr name="requiredAccountType" format="string"/>
<attr name="isGame" />
<!-- Declare that this application may use cleartext traffic (e.g., HTTP rather than HTTPS;
WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP without STARTTLS or TLS).
Defaults to true. If set to false {@code false}, the app declares that it does not
intend to use cleartext network traffic, in which case platform components (e.g.,
HTTP stacks, {@code WebView}, {@code MediaPlayer}) will refuse app's requests to use
cleartext traffic. Third-party libraries are encouraged to honor this flag as well.
@hide -->
<!-- Declare that this application may use cleartext traffic, such as HTTP rather than
HTTPS; WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP without STARTTLS or
TLS). Defaults to true. If set to false {@code false}, the application declares that it
does not intend to use cleartext network traffic, in which case platform components
(e.g. HTTP stacks, {@code WebView}, {@code MediaPlayer}) will refuse applications's
requests to use cleartext traffic. Third-party libraries are encouraged to honor this
flag as well. -->
<attr name="usesCleartextTraffic" />
<attr name="multiArch" />
<attr name="extractNativeLibs" />

View File

@@ -2652,4 +2652,5 @@
<public type="attr" name="colorBackgroundFloating" />
<public type="attr" name="extractNativeLibs" />
<public type="attr" name="usesCleartextTraffic" />
</resources>