Reset aspect ratio on pause

When resuming the app we do resize things but the old aspect
ratio is cached, thus skipping a reset of the transform matrices
because the app thinks it is already at the correct aspect ratio.
In certain cases (changing orientation when paused) this leads to
layout bugs.

Bug: 17304671
Change-Id: Ia171190b3c76dc05519bdf4d1947d9664d5fb604
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 104ef9b..f0998a0 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -2136,6 +2136,7 @@
                 (double) size.width() / size.height());
         Size original = mCameraSettings.getCurrentPreviewSize();
         if (!optimalSize.equals(original)) {
+            Log.v(TAG, "setting preview size");
             mCameraSettings.setPreviewSize(optimalSize);
 
             // Zoom related settings will be changed for different preview
@@ -2150,10 +2151,11 @@
         }
 
         if (optimalSize.width() != 0 && optimalSize.height() != 0) {
+            Log.v(TAG, "updating aspect ratio");
             mUI.updatePreviewAspectRatio((float) optimalSize.width()
                     / (float) optimalSize.height());
         }
-        Log.i(TAG, "Preview size is " + optimalSize);
+        Log.d(TAG, "Preview size is " + optimalSize);
     }
 
     private void updateParametersPictureQuality() {