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

Commit 5391d383 authored by Kevin Hufnagle's avatar Kevin Hufnagle
Browse files

docs: Can leave StrictMode enabled in prod

Google Play now checks StrictMode elements based on target SDK
version, so it's safe for apps to leave StrictMode checks enabled in
their production code.

Bug: 179525953
Change-Id: I5a68d4892d521f5e62c25f57621f934c39436008
Test: m ds-docs-java
Exempt-From-Owner-Approval: Docs-only change
parent 6053cc94
Loading
Loading
Loading
Loading
+13 −17
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@ import java.util.function.Consumer;
 *
 * <pre>
 * public void onCreate() {
 *     if (DEVELOPER_MODE) {
 *     StrictMode.setThreadPolicy(new {@link ThreadPolicy.Builder StrictMode.ThreadPolicy.Builder}()
 *             .detectDiskReads()
 *             .detectDiskWrites()
@@ -127,7 +126,6 @@ import java.util.function.Consumer;
 *             .penaltyLog()
 *             .penaltyDeath()
 *             .build());
 *     }
 *     super.onCreate();
 * }
 * </pre>
@@ -146,9 +144,7 @@ import java.util.function.Consumer;
 * <p class="note">StrictMode is not a security mechanism and is not guaranteed to find all disk or
 * network accesses. While it does propagate its state across process boundaries when doing {@link
 * android.os.Binder} calls, it's still ultimately a best effort mechanism. Notably, disk or network
 * access from JNI calls won't necessarily trigger it. Future versions of Android may catch more (or
 * fewer) operations, so you should never leave StrictMode enabled in applications distributed on
 * Google Play.
 * access from JNI calls won't necessarily trigger it.
 */
public final class StrictMode {
    private static final String TAG = "StrictMode";