private void restoreSmsInformation(){
  if (sSmsID == null) {
    sSmsID=mKeyValueHelper.getIntegerValue(KeyValueHelper.KEY_SMS_ID);
    if (sSmsID == null) {
      mKeyValueHelper.addKey(KeyValueHelper.KEY_SMS_ID,"0");
      mKeyValueHelper.addKey(KeyValueHelper.KEY_SINTENT,"0");
      mKeyValueHelper.addKey(KeyValueHelper.KEY_DINTENT,"0");
      sSmsID=0;
    }
    mSmsMap=Collections.synchronizedMap(new HashMap<Integer,Sms>());
    mSmsHelper.deleteOldSMS();
    Sms[] toAdd=mSmsHelper.getFullDatabase();
    for (    Sms s : toAdd) {
      mSmsMap.put(s.getID(),s);
    }
  }
}

private void restoreSmsInformation ( ) { if ( sSmsID == null ) { sSmsID = mKeyValueHelper . getIntegerValue ( KeyValueHelper . KEY_SMS_ID ) ; if ( sSmsID == null ) { mKeyValueHelper . addKey ( KeyValueHelper . KEY_SMS_ID , "0" ) ; mKeyValueHelper . addKey ( KeyValueHelper . KEY_SINTENT , "0" ) ; mKeyValueHelper . addKey ( KeyValueHelper . KEY_DINTENT , "0" ) ; sSmsID = 0 ; } mSmsMap = Collections . synchronizedMap ( new HashMap < Integer , Sms > ( ) ) ; mSmsHelper . deleteOldSMS ( ) ; Sms [ ] toAdd = mSmsHelper . getFullDatabase ( ) ; for ( Sms s : toAdd ) { mSmsMap . put ( s . getID ( ) , s ) ; } } }
restores the sms information from the database creates the smsmap object and fills it if there are any old sms from the database
