synchronized (mObserver) {
boolean done = false;
while (!done) {
try {
mObserver.wait(2000);
done = true;
} catch (InterruptedException e) {
}
}
Iterator<Map> it = mObserver.events.iterator();
while (it.hasNext()) {
Map map = it.next();
Log.i("FileObserverTest", "event: " + map.get("event").toString() + " path: " + map.get("path"));
}
mObserver.events.clear();
}