2022-05-26 10:43:36.813 9571-9584/? 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.
at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1877)
at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:286)
at sun.nio.ch.FileChannelImpl.finalize(FileChannelImpl.java:175)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:289)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:276)
at java.lang.Daemons$Daemon.run(Daemons.java:137)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:237)
at sun.nio.ch.FileChannelImpl.<init>(FileChannelImpl.java:110)
at sun.nio.ch.FileChannelImpl.open(FileChannelImpl.java:128)
at java.io.FileOutputStream.getChannel(FileOutputStream.java:469)
at com.google.firebase.messaging.cpp.RegistrationIntentService.writeTokenToInternalStorage(SourceFile:6)
at com.google.firebase.messaging.cpp.RegistrationIntentService.onHandleIntent(SourceFile:3)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:78)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.os.HandlerThread.run(HandlerThread.java:67)
100% reproduce.
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
Steps to reproduce:
D/StrictModelogs100% reproduce.
Sample project that reproduces the bug: