android: Avoid a ClosedWatchServiceException.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 16m40s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 16m40s
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