Solves the "not responding" problem. Should implement onDestroy() method
for the CameraActivity.