WebView java.lang.SecurityException: No permission to modify given thread

无人久伴 提交于 2020-01-01 02:10:09

问题


I have an application that uses multiple WebViews. Nowhere do I set the priority of the render thread through the WebSettings though I still get the exception below.

So far it only seems to happen on android 4.0.4, which I haven't found the source code for.

Anyone run into this and/or knows a solution? Thanks!

java.lang.SecurityException: No permission to modify given thread
at android.os.Process.setThreadPriority(Native Method)
at android.webkit.WebViewCore$WebCoreThread$1.handleMessage(WebViewCore.java:712)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:789)
at java.lang.Thread.run(Thread.java:856)

回答1:


It's cyanogen's fault. https://github.com/CyanogenMod/android_frameworks_base/commit/b963f3c0c64560bcdb1596dd85fe9b0dad6d78c5#L1R712

I have a pile of crash reports on this issue, all from 4.0.4 on many different devices, all of them likely running some form of CM9 (most don't have official ICS releases yet).

I don't have time to yell at them, so hopefully someone else can bring it up in their bug tracker.



来源:https://stackoverflow.com/questions/11025182/webview-java-lang-securityexception-no-permission-to-modify-given-thread

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!