Android FileObserver passing undocumented event 32768
<p>I am using <a href="http://developer.android.com/reference/android/os/FileObserver.html" rel="nofollow">FileObserver</a> to observe a directory for changes. The process works fine 90% of the time, but occasionally it fails. </p>

<p>Here is a working example of logcat:</p>

<pre><code>04-23 21:12:03.873: V/ItemObserver(1663): Setting up new item observer for item 2
04-23 21:12:04.374: I/ItemObserver(1663): Received item event for item 2, event: 256, file: batch.get.47
04-23 21:12:07.866: I/ItemObserver(1663): Received item event for item 2, event: 512, file: batch.get.47
04-23 21:12:07.873: I/ItemObserver(1663): Received item event for item 2, event: 512, file: item.xml
04-23 21:12:07.883: I/ItemObserver(1663): Received item event for item 2, event: 256, file: item.xml
04-23 21:12:08.033: I/ItemObserver(1663): Received item event for item 2, event: 8, file: item.xml
</code></pre>

<p>Here is a failed example:</p>

<pre><code>04-23 22:08:09.403: V/ItemObserver(1751): Setting up new item observer for item 2
04-23 22:08:09.813: I/ItemObserver(1751): Received item event for item 2, event: 256, file: batch.get.52
04-23 22:08:09.954: I/ItemObserver(1751): Received item event for item 2, event: 32768, file: null
</code></pre>

<p>Once I get the 32768 event with a null file, everything stops. I've checked the source for FileObserver and searched for inotify 32768 and can't find where this is referenced anywhere.</p>

<p>The code to set up the observer is as follows:</p>

<pre><code>itemDirObserver = new FileObserver(getItemsCache().getProcessedItemDir(itemId).getPath(), 
FileObserver.CLOSE_WRITE | FileObserver.CREATE | FileObserver.DELETE) {
  @Override
  public void onEvent(int event, final String file) {
    itemDirChanged(event, file);
  }
};
itemDirObserver.startWatching();
</code></pre>

<p>The code for the logcat is:</p>

<pre><code>public synchronized void itemDirChanged(int event, String file) {
  Log.i(LOG, "Received item event for item " + itemId + ", event: " + event + ", file: " + file);
  switch (event) {
&lt;snip&gt;
</code></pre>

<p>Any idea what 32768 and null file signifies?</p>
