forked from cory/tildefriends
android: Avoid a ClosedWatchServiceException.
This commit is contained in:
parent
a821d895c5
commit
195920e476
@ -99,7 +99,8 @@ public class TildeFriendsActivity extends Activity {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.w("tildefriends", "Watching for changes in: " + getFilesDir().toString());
|
Log.w("tildefriends", "Watching for changes in: " + getFilesDir().toString());
|
||||||
try (WatchService watcher = FileSystems.getDefault().newWatchService()) {
|
try {
|
||||||
|
WatchService watcher = FileSystems.getDefault().newWatchService();
|
||||||
Paths.get(getFilesDir().toString()).register(
|
Paths.get(getFilesDir().toString()).register(
|
||||||
watcher,
|
watcher,
|
||||||
StandardWatchEventKinds.ENTRY_CREATE,
|
StandardWatchEventKinds.ENTRY_CREATE,
|
||||||
|
Loading…
Reference in New Issue
Block a user