[Xperia Z3 Android Development] jjwrongjj:
Yes, edit this method in CameraDevice.smali to fix FC when switching from Main to Front Camera:

.method public declared-synchronized commitParameters()V

The only bug remain is switching Front Camera Mode.

06-18 22:12:35.277 21501 21501 E AndroidRuntime: Process: com.sonyericsson.android.camera, PID: 21501
06-18 22:12:35.277 21501 21501 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.sonyericsson.android.camera.parameter.Parameters.updateFocusParameters()' on a null object reference
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.parameter.ParameterManager.changeCapturingMode(ParameterManager.java:389)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.controller.CameraFunctions.changeCapturingMode(CameraFunctions.java:318)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.controller.StateTransitionController$AbstractViewFinder.handleChangeCapturingMode(StateTransitionController.java:1076)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.controller.ControllerMessageHandler.dispatch(ControllerMessageHandler.java:296)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.controller.ControllerMessageHandler.dispatchEvent(ControllerMessageHandler.java:170)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.controller.Executor.sendEvent(Executor.java:57)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.controller.Executor.sendEvent(Executor.java:71)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.ControllerManager.changeCapturingMode(ControllerManager.java:112)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.CameraActivity.changeCapturingMode(CameraActivity.java:2194)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.controller.StateTransitionController$2.onAnimationFinished(StateTransitionController.java:438)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.sonyericsson.android.camera.view.TransitionAnimationController$TransitionAnimatorListener.onAnimationEnd(TransitionAnimationController.java:215)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd(AnimatorSet.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.animation.ValueAnimator.endAnimation(ValueAnimator.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.animation.ValueAnimator$AnimationHandler$1.run(ValueAnimator.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.os.Looper.loop(Looper.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
06-18 22:12:35.277 21501 21501 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
06-18 22:12:35.279 1788 4382 D ActivityManager: New dropbox entry: com.sonyericsson.android.camera, system_app_crash, 9f513154-b7e4-4b9c-a91e-fa8ac4344f78
06-18 22:12:35.282 1788 4382 W ActivityManager: Force finishing activity com.sonyericsson.android.camera/.CameraActivity

I'm not a fan of Camera Mod because I don't use camera much. In attachment is the XA Camera Ported.