Hello may be a bug in the app camera or firmware, there are some solutions that we can try.
The first would be to enter the menu of applications to delete data and cache configuration of the camera, to do go to:
"Settings >> Applications >> all"
There shopped the camera app, and enter in the menu that appears you click on the button "delete data" then restart your Xperia and verify that the problem no longer follow.
If the problem of continuous camera can reset your xperia to factory defaults, so if you have not made any changes in your xperia, I guess You have not unlocked the bootloader or have you done your xperia ROOT?
If your smartphone does not have root or other changes can go ahead and restore your factory xperia values before doing so you must make a backup of all files and data from your smartphone with easy backup:
https://play.google.com/store/apps/details?id=com.mdroidapps.easybackup
Once you have made your backup, copy it to an SD or PC with your xperia folders that have your personal files, such as folders:
Bluetooth
DCIM
Downloads
Pictures
Ringtones
Music
Video
Whatsapp
After you back up and return to your factory settings xperia entering:
"Configuration >> Backup and restore >> restore factory settings"
With restoring all your files, settings and other personal data (stay as if you had just bought but with Lollipop installed) were eliminated. xD