Merge change Ib1424474 into eclair

* changes:
  Fix orientation change in the See Through wallpaper.
diff --git a/src/com/android/wallpaper/walkaround/WalkAroundWallpaper.java b/src/com/android/wallpaper/walkaround/WalkAroundWallpaper.java
index 932c0b8..94b900f 100644
--- a/src/com/android/wallpaper/walkaround/WalkAroundWallpaper.java
+++ b/src/com/android/wallpaper/walkaround/WalkAroundWallpaper.java
@@ -49,6 +49,23 @@
         super.onCreate();
     }
 
+    @Override
+    public void onConfigurationChanged(Configuration newConfig) {
+        super.onConfigurationChanged(newConfig);
+
+        if (mCamera != null) {
+            if (mCamera.previewEnabled()) {
+                boolean portrait = newConfig.orientation == Configuration.ORIENTATION_PORTRAIT;
+                final Camera.Parameters params = mCamera.getParameters();
+                params.set("orientation", portrait ? "portrait" : "landscape");
+                mCamera.setParameters(params);
+
+                if (mCamera.previewEnabled()) mCamera.stopPreview();
+                mCamera.startPreview();
+            }
+        }
+    }
+
     private void startCamera() {
         if (mCamera == null) {
             mCamera = Camera.open();
@@ -191,6 +208,7 @@
 
             params.set("orientation", portrait ? "portrait" : "landscape");
             mCamera.setParameters(params);
+
             mCamera.startPreview();
         }
     }