public static void callInMsg(String caller, String called) { String callerstr = "", calledstr = "";  Debug.msg("Caller: " + caller); Debug.msg("Called: " + called); if (!caller.equals("")) { Debug.msg("Searchin in local database ..."); Person callerperson = phonebook.findPerson(new PhoneNumber(caller)); if (callerperson != null) { if (callerperson.getFullname().equals("")) { callerstr = caller + "(" + callerperson.getFullname() + ")"; } else { callerstr = caller + "(" + callerperson.getFullname() + ")"; } Debug.msg("Found in local database: " + callerstr); } else { Debug .msg("Searchin on dasoertliche.de ..."); Person person = ReverseLookup .lookup(new PhoneNumber(caller)); if (!person.getFullname().equals("")) { callerstr = caller + "(" + person.getFullname() + ")"; Debug.msg("Found on dasoertliche.de: " + callerstr); } else { callerstr = caller; } }  } if (!called.equals("")) { Debug.msg("Searchin in local database ..."); Person calledperson = phonebook.findPerson(new PhoneNumber(called)); if (calledperson != null) { if (calledperson.getFullname().equals("")) { calledstr = called + "(" + calledperson.getFullname() + ")"; } else { calledstr = called + "(" + calledperson.getFullname() + ")"; } Debug.msg("Found in local database: " + calledstr); } else { Debug .msg("Searchin on dasoertliche.de ..."); Person person = ReverseLookup .lookup(new PhoneNumber(called)); if (!person.getFullname().equals("")) { calledstr = called + "(" + person.getFullname() + ")"; Debug.msg("Found on dasoertliche.de: " + calledstr); } else { calledstr = called; } }  }  switch (Integer.parseInt(JFritz.getProperty("option.popuptype", "1"))) { case 0: { break; } case 1: { CallMessageDlg msgDialog = new CallMessageDlg(); msgDialog.showMessage(callerstr, calledstr); break; } case 2: { if (callerstr.equals("")) { trayIcon.displayMessage(JFritz.PROGRAM_NAME, "Ankommender Telefonanruf\nan " + calledstr + "!", TrayIcon.INFO_MESSAGE_TYPE); } else { trayIcon.displayMessage(JFritz.PROGRAM_NAME, "Ankommender Telefonanruf\nvon " + callerstr + "\nan " + calledstr + "!", TrayIcon.INFO_MESSAGE_TYPE); } break; } }  if (JFritzUtils.parseBoolean(JFritz.getProperty("option.playSounds", "true"))) { }
public void callInMsg(String caller, String called) { callInMsg(caller, called, "");
	public static void callInMsg(String caller, String called) {		String callerstr = "", calledstr = "";				Debug.msg("Caller: " + caller);		Debug.msg("Called: " + called);		if (!caller.equals("")) {			Debug.msg("Searchin in local database ...");			Person callerperson = phonebook.findPerson(new PhoneNumber(caller));			if (callerperson != null) {				if (callerperson.getFullname().equals("")) {					callerstr = caller + "(" + callerperson.getFullname() + ")";									}				else {				callerstr = caller + "(" + callerperson.getFullname() + ")";				}				Debug.msg("Found in local database: "						+ callerstr);			} else {				Debug						.msg("Searchin on dasoertliche.de ...");				Person person = ReverseLookup						.lookup(new PhoneNumber(caller));				if (!person.getFullname().equals("")) {					callerstr = caller + "(" + person.getFullname() + ")";					Debug.msg("Found on dasoertliche.de: "							+ callerstr);				}				else {					callerstr = caller;				}			}		}		if (!called.equals("")) {			Debug.msg("Searchin in local database ...");			Person calledperson = phonebook.findPerson(new PhoneNumber(called));			if (calledperson != null) {				if (calledperson.getFullname().equals("")) {					calledstr = called + "(" + calledperson.getFullname() + ")";									}				else {				calledstr = called + "(" + calledperson.getFullname() + ")";				}				Debug.msg("Found in local database: "						+ calledstr);			} else {				Debug						.msg("Searchin on dasoertliche.de ...");				Person person = ReverseLookup						.lookup(new PhoneNumber(called));				if (!person.getFullname().equals("")) {					calledstr = called + "(" + person.getFullname() + ")";					Debug.msg("Found on dasoertliche.de: "							+ calledstr);				}				else {					calledstr = called;				}			}		}				switch (Integer.parseInt(JFritz.getProperty("option.popuptype", "1"))) {		case 0: { // No Popup			break;		}		case 1: {			CallMessageDlg msgDialog = new CallMessageDlg();			msgDialog.showMessage(callerstr, calledstr);			break;		}		case 2: {			if (callerstr.equals("")) {				trayIcon.displayMessage(JFritz.PROGRAM_NAME,						"Ankommender Telefonanruf\nan " + calledstr + "!",						TrayIcon.INFO_MESSAGE_TYPE);			} else {				trayIcon.displayMessage(JFritz.PROGRAM_NAME,						"Ankommender Telefonanruf\nvon " + callerstr + "\nan "								+ calledstr + "!", TrayIcon.INFO_MESSAGE_TYPE);			}			break;		}		}		if (JFritzUtils.parseBoolean(JFritz.getProperty("option.playSounds",				"true"))) {		}	}