diff options
| author | 2018-03-14 09:00:04 -0700 | |
|---|---|---|
| committer | 2018-03-14 09:45:52 -0700 | |
| commit | 0d285d5117068392fbba24cac86516ea4d845735 (patch) | |
| tree | 8aa1dbf09e5eeae36ea2ee7988fffec7f4c023d2 | |
| parent | 5f6980af6e988670bef921956815c644d1a9c7e8 (diff) | |
Fix cleartext default for the manifest value
If no network security config is set the default value of
cleartextTrafficPermitted comes from the legacy
android:cleartextTrafficPermitted, default this to false for apps
targeting P to track the network security config behavior as was
intended.
Bug: 74587672
Test: atest CtsNetSecPolicyUsesCleartextTrafficUnspecifiedTestCases
Change-Id: I6367723befa1b947063554c9c061bdfc5be3d116
| -rw-r--r-- | core/java/android/content/pm/PackageParser.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 5d5a9782884a..bc7540fabc19 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -3492,7 +3492,7 @@ public class PackageParser { if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_usesCleartextTraffic, - true)) { + owner.applicationInfo.targetSdkVersion < Build.VERSION_CODES.P)) { ai.flags |= ApplicationInfo.FLAG_USES_CLEARTEXT_TRAFFIC; } |