private void saveConfiguration(){
  final UartConfiguration configuration=mConfiguration;
  try {
    final Format format=new Format(new HyphenStyle());
    final Strategy strategy=new VisitorStrategy(new CommentVisitor());
    final Serializer serializer=new Persister(strategy,format);
    final StringWriter writer=new StringWriter();
    serializer.write(configuration,writer);
    final String xml=writer.toString();
    mDatabaseHelper.updateConfiguration(configuration.getName(),xml);
    mWearableSynchronizer.onConfigurationAddedOrEdited(mPreferences.getLong(PREFS_CONFIGURATION,0),configuration);
  }
 catch (  final Exception e) {
    Log.e(TAG,"Error while creating a new configuration",e);
  }
}

private void saveConfiguration ( ) { final UartConfiguration configuration = mConfiguration ; try { final Format format = new Format ( new HyphenStyle ( ) ) ; final Strategy strategy = new VisitorStrategy ( new CommentVisitor ( ) ) ; final Serializer serializer = new Persister ( strategy , format ) ; final StringWriter writer = new StringWriter ( ) ; serializer . write ( configuration , writer ) ; final String xml = writer . toString ( ) ; mDatabaseHelper . updateConfiguration ( configuration . getName ( ) , xml ) ; mWearableSynchronizer . onConfigurationAddedOrEdited ( mPreferences . getLong ( PREFS_CONFIGURATION , 0 ) , configuration ) ; } catch ( final Exception e ) { Log . e ( TAG , "Error while creating a new configuration" , e ) ; } }
saves the given configuration in the database .
