private static List<EventLog.Event> readNewEvents(final CondomCore.CondomEvent type) throws IOException {
		final List<EventLog.Event> events = new ArrayList<>();
		EventLog.readEvents(new int[] { EVENT_TAG_MARK, "Condom".hashCode() + type.ordinal() }, events);
		if (events.isEmpty()) return Collections.emptyList();
		for (int i = events.size() - 1; i >= 0; i --) {
			final EventLog.Event event = events.get(i);
			if (event.getTag() == EVENT_TAG_MARK) {
				EventLog.writeEvent(EVENT_TAG_MARK);
				return events.subList(i + 1, events.size());
			}
		}
		EventLog.writeEvent(EVENT_TAG_MARK);
		return events;
	}
Miscellaneous test cases

Created by Oasis on 2017/4/10.
library/src/androidTest/java/com/oasisfeng/condom/CondomMiscTest.java