Do not update the progress if it is the same as the last given progress.

This commit is contained in:
Leon Scroggins
2009-11-04 14:02:03 -08:00
parent 0d55daffc3
commit 3613385fbc

View File

@@ -1016,10 +1016,10 @@ class CallbackProxy extends Handler {
public void onProgressChanged(int newProgress) {
// Synchronize so that mLatestProgress is up-to-date.
synchronized (this) {
mLatestProgress = newProgress;
if (mWebChromeClient == null) {
if (mWebChromeClient == null || mLatestProgress == newProgress) {
return;
}
mLatestProgress = newProgress;
if (!mProgressUpdatePending) {
sendEmptyMessage(PROGRESS);
mProgressUpdatePending = true;