[core] Fix prefs watcher

This commit is contained in:
LoveSy 2021-02-18 03:10:09 +08:00 committed by tehcneko
parent e296d0fba9
commit b5305e8621
1 changed files with 1 additions and 2 deletions

View File

@ -201,8 +201,7 @@ public final class XSharedPreferences implements SharedPreferences {
Path path = mFile.toPath();
try {
if (sWatcher == null) {
// TODO
// sWatcher = new File(XposedInit.prefsBasePath).toPath().getFileSystem().newWatchService();
sWatcher = new File(serviceClient.getPrefsPath("")).toPath().getFileSystem().newWatchService();
if (BuildConfig.DEBUG) Log.d(TAG, "Created WatchService instance");
}
mWatchKey = path.getParent().register(sWatcher, StandardWatchEventKinds.ENTRY_CREATE,