Camera: Fix crash during open and close camera

When we open camera for the second time after opening camera,
switching to camcorder and exit camcorder rapidly, crash will
be observed. It's due to the assertion of double open.
When app receives pause event, it should cancel the switch
animation, as we as it's listener.

Change-Id: Id351d3e5db63c54646d592b728a4624e3d6e1211
diff --git a/src/com/android/camera/ b/src/com/android/camera/
index 8924d11..8b89e5d 100644
--- a/src/com/android/camera/
+++ b/src/com/android/camera/
@@ -323,6 +323,9 @@
     public void onPause() {
+        if (mCameraSwitchAnimator != null && mCameraSwitchAnimator.isRunning()) {
+            mCameraSwitchAnimator.cancel();
+        }
         mPaused = true;