From 71afe8ed86449aeb3795cef48fe815fd23e388d4 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Mon, 9 Jul 2018 21:15:56 +0200 Subject: restart file observer when permisson are granted --- .../java/de/pixart/messenger/utils/ConversationsFileObserver.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/de/pixart/messenger/utils') diff --git a/src/main/java/de/pixart/messenger/utils/ConversationsFileObserver.java b/src/main/java/de/pixart/messenger/utils/ConversationsFileObserver.java index 72a01a13c..4e275df3f 100644 --- a/src/main/java/de/pixart/messenger/utils/ConversationsFileObserver.java +++ b/src/main/java/de/pixart/messenger/utils/ConversationsFileObserver.java @@ -80,6 +80,11 @@ public abstract class ConversationsFileObserver { abstract public void onEvent(int event, String path); + public void restartWatching() { + stopWatching(); + startWatching(); + } + private class SingleFileObserver extends FileObserver { private final String path; -- cgit v1.2.3