Fix rotation bug for animated thumbnail shown after capture.

Bug: 11420737

Change-Id: I55b90137b362d0b3b98aba34114537e0f6107b8c
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index bedd0bb..ffb19d4 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -153,11 +153,11 @@
             Bitmap bitmap = CameraUtil.downSample(mData, DOWN_SAMPLE_FACTOR);
             if (mOrientation != 0 || mMirror) {
                 Matrix m = new Matrix();
-                m.preRotate(mOrientation);
                 if (mMirror) {
                     // Flip horizontally
                     m.setScale(-1f, 1f);
                 }
+                m.preRotate(mOrientation);
                 return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), m,
                         false);
             }