The this
in synchronized(this)
inside the onPageFinished()
method refers to the WebViewClient
instance, while the this
in synchronized(this)
after wv.loadURL(URL)
refers to the Wait
instance.
Consider using the utilities in Android's java.util.concurrent package