在android 4.4.2中 编译的eng版本经常出现红框的问题。
通过排查因为在frameworks/base/core/java/android/os/StrictMode.java文件中打开了设置选项
具体修改如下:
--- a/frameworks/base/core/java/android/os/StrictMode.java +++ b/frameworks/base/core/java/android/os/StrictMode.java @@ -951,9 +951,6 @@ public final class StrictMode { // Eng builds have flashes on all the time. The suppression property // overrides this, so we force the behavior only after the short-circuit // check above. - if (IS_ENG_BUILD) { - doFlashes = true; - } // Thread policy controls BlockGuard. int threadPolicyMask = StrictMode.DETECT_DISK_WRITE |
其中
private static final boolean IS_ENG_BUILD = "eng".equals(Build.TYPE);
去除eng版本强制doFlash 即可。
<p>版权声明:本文为博主原创文章,未经博主允许不得转载。</p>