Mirror the preview for front-facing cameras. do not merge

Now overlay does ROT_90 before FLIP_V or FLIP_H. It should be FLIP_V
or FLIP_H first. The formula should be changed after overlay is fixed.

bug:3059865
Change-Id: Ie4366bf7f1fcac7383e8dfc74b1b865997bbbcc6
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index 8f0ed75..0dec2ab 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -108,6 +108,8 @@
                                        const sp<ICameraClient>& cameraClient,
                                        const sp<CameraHardwareInterface>& hardware,
                                        int cameraId,
+                                       int cameraFacing,
+                                       int mCameraOrientation,
                                        int clientPid);
                                 ~Client();
 
@@ -153,10 +155,14 @@
                                     const sp<IMemoryHeap>& heap,
                                     size_t offset, size_t size);
 
+        int                     getOrientation(int orientation, bool mirror);
+
         // these are initialized in the constructor.
         sp<CameraService>               mCameraService;  // immutable after constructor
         sp<ICameraClient>               mCameraClient;
         int                             mCameraId;       // immutable after constructor
+        int                             mCameraFacing;   // immutable after constructor
+        int                             mCameraOrientation;  // immutable after constructor
         pid_t                           mClientPid;
         sp<CameraHardwareInterface>     mHardware;       // cleared after disconnect()
         bool                            mUseOverlay;     // immutable after constructor