public void addStateListener(StateListener listener){
  stateListeners.add(listener);
}

public void addStateListener ( StateListener listener ) { stateListeners . add ( listener ) ; }
add a listener to be notified of changes to the preview state , as well as camera errors .
