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

Commit 0edf204a authored by Adrian Roos's avatar Adrian Roos
Browse files

StrictMode: Don't flash on eng unless opted in

With automated reporting of violations this is just an annoyance
that drives developers towards userdebug.

Old behavior is still available via:
  adb shell setprop persist.sys.strictmode.visual true

Change-Id: I44d571463c7900f87072fc3521c5314545a91497
Test: manual
parent 0d4e74d5
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -1462,7 +1462,7 @@ public final class StrictMode {

        if (Build.IS_USER || DISABLE || SystemProperties.getBoolean(DISABLE_PROPERTY, false)) {
            // Detect nothing extra
        } else if (Build.IS_USERDEBUG) {
        } else if (Build.IS_USERDEBUG || Build.IS_ENG) {
            // Detect everything in bundled apps
            if (isBundledSystemApp(ai)) {
                builder.detectAll();
@@ -1470,14 +1470,9 @@ public final class StrictMode {
                if (SystemProperties.getBoolean(VISUAL_PROPERTY, false)) {
                    builder.penaltyFlashScreen();
                }
            }
        } else if (Build.IS_ENG) {
            // Detect everything in bundled apps
            if (isBundledSystemApp(ai)) {
                builder.detectAll();
                builder.penaltyDropBox();
                if (Build.IS_ENG) {
                    builder.penaltyLog();
                builder.penaltyFlashScreen();
                }
            }
        }