OSDN Git Service

Fix logspam
authorJohn Reck <jreck@google.com>
Tue, 5 Jun 2012 20:20:54 +0000 (13:20 -0700)
committerJohn Reck <jreck@google.com>
Tue, 5 Jun 2012 20:22:40 +0000 (13:22 -0700)
 Bug: 6508832

Change-Id: I3061917ae7eba31723c006b1d30d20b7134890b8

core/java/android/webkit/ZoomManager.java

index 1da59e4..8830119 100644 (file)
@@ -429,13 +429,12 @@ class ZoomManager {
             scale = getReadingLevelScale();
         }
 
-        if (mHardwareAccelerated) {
-            mInHWAcceleratedZoom = true;
-        }
-
         setZoomScale(scale, reflowText);
 
         if (oldScale != mActualScale) {
+            if (mHardwareAccelerated) {
+                mInHWAcceleratedZoom = true;
+            }
             // use mZoomPickerScale to see zoom preview first
             mZoomStart = SystemClock.uptimeMillis();
             mInvInitialZoomScale = 1.0f / oldScale;
@@ -467,6 +466,8 @@ class ZoomManager {
         if (mZoomScale == 0) {
             Log.w(LOGTAG, "A WebView is attempting to perform a fixed length "
                     + "zoom animation when no zoom is in progress");
+            // Now that we've logged about it, go ahead and just recover
+            mInHWAcceleratedZoom = false;
             return;
         }