After enabling StrictMode I noticed this:
2021-05-08 11:09:42.854 14347-14773/com.myapp D/StrictMode: StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. Callsite: close
at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1929)
at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:305)
at sun.nio.fs.UnixDirectoryStream.finalize(UnixDirectoryStream.java:240)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278)
at java.lang.Daemons$Daemon.run(Daemons.java:139)
at java.lang.Thread.run(Thread.java:923)
2021-05-08 11:09:42.855 14347-14773/com.myapp D/StrictMode: StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. Callsite: close
at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1929)
at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:305)
at sun.nio.fs.UnixSecureDirectoryStream.finalize(UnixSecureDirectoryStream.java:580)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278)
at java.lang.Daemons$Daemon.run(Daemons.java:139)
at java.lang.Thread.run(Thread.java:923)
How to debug this?