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
|
||||
public void run() {
|
||||
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(
|
||||
watcher,
|
||||
StandardWatchEventKinds.ENTRY_CREATE,
|
||||
|
Loading…
Reference in New Issue
Block a user