Through the android market, for my app users are reporting a significant number of UnsupportedOperation Exceptions. The stack trace points to a drawPicture() call made from inside webview codes. I am indeed using webviews in my app.
I know that drawPicture() is not supported when HWA is turned on, but in this case the call is coming from inside a webview. Are there special steps I need to take to ensure the webview will not use this method?
Unfortunately I have not been able to reproduce the issue, but it is definitely being seen by users.
The stack trace:
java.lang.UnsupportedOperationException
at android.view.GLES20Canvas.drawPicture(GLES20Canvas.java:753)
at android.webkit.WebView.drawCoreAndCursorRing(WebView.java:4128)
at android.webkit.WebView.drawContent(WebView.java:3797)
at android.webkit.WebView.onDraw(WebView.java:3862)
at android.view.View.draw(View.java:9286)
at android.view.View.getDisplayList(View.java:8749)
at android.view.ViewGroup.drawChild(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
at android.view.View.getDisplayList(View.java:8747)
at android.view.ViewGroup.drawChild(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
at android.view.View.draw(View.java:9289)
at android.view.View.getDisplayList(View.java:8749)
at android.view.ViewGroup.drawChild(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
at android.view.View.getDisplayList(View.java:8747)
at android.view.ViewGroup.drawChild(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
at android.view.View.getDisplayList(View.java:8747)
at android.view.ViewGroup.drawChild(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
at android.view.View.draw(View.java:9289)
at android.widget.FrameLayout.draw(FrameLayout.java:419)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1923)
at android.view.View.getDisplayList(View.java:8749)
at android.view.ViewGroup.drawChild(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
at android.view.View.getDisplayList(View.java:8747)
at android.view.ViewGroup.drawChild(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
at android.view.View.draw(View.java:9289)
at android.view.View.getDisplayList(View.java:8749)
at android.view.ViewGroup.drawChild(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
at android.view.View.getDisplayList(View.java:8747)
at android.view.ViewGroup.drawChild(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
at android.view.View.getDisplayList(View.java:8747)
at android.view.ViewGroup.drawChild(ViewGroup.java:2554)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2189)
at android.view.View.draw(View.java:9289)
at android.widget.FrameLayout.draw(FrameLayout.java:419)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1923)
at android.view.View.getDisplayList(View.java:8749)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:609)
at android.view.ViewRoot.draw(ViewRoot.java:1600)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1416)
at android.view.ViewRoot.handleMessage(ViewRoot.java:2046)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
Are you using restorePicture? ( http://developer.android.com/reference/android/webkit/WebView.html#restorePicture(android.os.Bundle, java.io.File) )
That method is not supported with hardware acceleration (and the method is deprecated, so you should be getting off of it anyway). As a workaround you can set the webview to be a software layer until you load some other content.