Commit f8dfd440 authored by Andrew Grieve's avatar Andrew Grieve Committed by Chromium LUCI CQ

Revert "Android: Disable detectUntaggedSockets StrictMode check."

This reverts commit 90c1d6e9.

Reason for revert: Should not add detectCleartextNetwork()

Original change's description:
> Android: Disable detectUntaggedSockets StrictMode check.
>
> We don't tag our sockets, and this caused logspam on start-up.
>
> Bug: 770792
> Change-Id: I23cc6494a7a3e61bcb8be761c877bf4a0345f921
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2600033
> Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org>
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#838953}

TBR=agrieve@chromium.org,pkotwicz@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I2e90528bbd41c580e647cb17e65efa4900f900f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 770792
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2600035Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#838962}
parent 5fbf167f
...@@ -105,30 +105,16 @@ public class ChromeStrictMode { ...@@ -105,30 +105,16 @@ public class ChromeStrictMode {
private static void turnOnDetection(StrictMode.ThreadPolicy.Builder threadPolicy, private static void turnOnDetection(StrictMode.ThreadPolicy.Builder threadPolicy,
StrictMode.VmPolicy.Builder vmPolicy) { StrictMode.VmPolicy.Builder vmPolicy) {
threadPolicy.detectAll(); threadPolicy.detectAll();
// Do not enable detectUntaggedSockets(). It does not support native (the vast majority
// of our sockets), and we have not bothered to tag our Java uses.
// https://crbug.com/770792
vmPolicy.detectActivityLeaks()
.detectLeakedClosableObjects()
.detectLeakedRegistrationObjects()
.detectLeakedSqlLiteObjects();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
// Introduced in M.
vmPolicy.detectCleartextNetwork();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// Introduced in O.
vmPolicy.detectContentUriWithoutPermission();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
// Introduced in Q.
vmPolicy.detectCredentialProtectedWhileLocked().detectImplicitDirectBoot();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
// File URI leak detection, has false positives when file URI intents are passed between vmPolicy.detectAll();
// Chrome activities in separate processes. See http://crbug.com/508282#c11. } else {
vmPolicy.detectFileUriExposure(); // Explicitly enable detection of all violations except file URI leaks, as that
// results in false positives when file URI intents are passed between Chrome
// activities in separate processes. See http://crbug.com/508282#c11.
vmPolicy.detectActivityLeaks()
.detectLeakedClosableObjects()
.detectLeakedRegistrationObjects()
.detectLeakedSqlLiteObjects();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment