Rafael Sanches

January 30, 2011

HTC sense ui breaks the way the WebView settings behave

Filed under: android — mufumbo @ 11:32 pm

I am “amused” to discover that HTC sense has changed even the way android breaks to access of a WebView from outside the UI thread.

Since I don’t own a phone with HTC sense, it took me months to understand this and I only fixed the issue thanks to a kind user who sent me logs.

For example, calling this outside from a UI thread works on the normal android SDK’s:

Instead, on HTC Sense phones it breaks here:

java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
 at android.os.Handler.(Handler.java:121)
 at com.htc.multitouch.MultiTouchDetector$MultiTouchHandler.(MultiTouchDetector.java:180)
 at com.htc.multitouch.MultiTouchDetector.(MultiTouchDetector.java:242)
 at android.webkit.WebView$HTCMultiTouch.fnCreateMultiTouchListener(WebView.java:11781)
 at android.webkit.WebView.enableMultiTouch(WebView.java:10893)
 at android.webkit.WebView.updateMultiTouchSupport(WebView.java:905)
 at android.webkit.WebSettings.setBuiltInZoomControls(WebSettings.java:474)

Now, I know know that anything that changes the UI shouldn’t be executed outside of the UI Thread, but still..

1 Comment »

  1. Hi admin

    I found your website is so creative, especially in Android Products part
    Very inspirative for me

    I hope you always update this helpfull website, so I can easily have enough nice informations about Android


    Comment by crus riga — September 28, 2011 @ 5:06 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: