public long generateNewPingId(){
  PreferenceStore prefs=getPreferenceStore();
  Random rnd=new Random();
  long id=rnd.nextLong();
synchronized (DdmsPreferenceStore.class) {
    prefs.setValue(PING_ID,id);
    try {
      prefs.save();
    }
 catch (    IOException e) {
    }
  }
  return id;
}

public long generateNewPingId ( ) { PreferenceStore prefs = getPreferenceStore ( ) ; Random rnd = new Random ( ) ; long id = rnd . nextLong ( ) ; synchronized ( DdmsPreferenceStore . class ) { prefs . setValue ( PING_ID , id ) ; try { prefs . save ( ) ; } catch ( IOException e ) { } } return id ; }
generates a new random ping id and saves it in the preference store .
