<string name="failure">Неудача</string>
<string name="lasttry">Последнее обновление</string>
<string name="failtry">Неудачная попытка</string>
+ <string name="nocalendar">Нет календаря с именем</string>
<string name="autherror">Необходимо авторизоваться (через меню)</string>
<string name="myname">Женя</string>
<string name="timestamp">отметка</string>
private String calendar_name;
private String peer_name;
private String calendar_id;
+ private String nocalendar;
public PhoneLog(final Resources res, final PersistentStore store) {
super(res, store);
this.store = store;
+ nocalendar = res.getString(R.string.nocalendar);
calendar_name = store.get("calendar_name");
peer_name = store.get("peer_name");
calendar_id = store.get("calendar_id");
calendar_id = scanCalendars(calendar_name);
store.put("calendar_id", calendar_id);
}
- return scanEvents(calendar_id, peer_name);
+ if (calendar_id == null || calendar_id == "") {
+ return scanEvents(calendar_id, peer_name);
+ } else {
+ return nocalendar + " \"" +
+ calendar_name + "\"";
+ }
} catch (GoogleJsonResponseException e) {
Log.v(TAG, "GoogleJsonResponseException: " + e);
if (e.getResponse().getStatusCode() == 401) {