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

Commit 545ebdef authored by Alex Klyubin's avatar Alex Klyubin Committed by Android (Google) Code Review
Browse files

Merge "Unhide public API about cleartext traffic policy."

parents 0f9d0fa1 7cb000ff
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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 {
+7 −0
Original line number Diff line number Diff line
@@ -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 {
+2 −3
Original line number Diff line number Diff line
@@ -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;

+3 −5
Original line number Diff line number Diff line
@@ -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
+13 −14
Original line number Diff line number Diff line
@@ -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" />
Loading