Skip to content

Commit bc39afa

Browse files
committed
Update RegistrationIntentService.java
1 parent 6c2f1b8 commit bc39afa

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

messaging/src/android/java/com/google/firebase/messaging/cpp/RegistrationIntentService.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ private static void writeBufferToInternalStorage(Context context, byte[] buffer)
8686
sizeBuffer.putInt(buffer.length);
8787

8888
try (FileOutputStream lockFileStream = context.openFileOutput(MessageWriter.LOCK_FILE, 0);
89-
// Acquire lock. This prevents the C++ code from consuming and clearing the file while we
90-
// append to it.
91-
FileLock lock = lockFileStream.getChannel().lock();
92-
FileOutputStream outputStream =
93-
context.openFileOutput(MessageWriter.STORAGE_FILE, Context.MODE_APPEND)) {
89+
// Acquire lock. This prevents the C++ code from consuming and clearing the file while we
90+
// append to it.
91+
FileLock lock = lockFileStream.getChannel().lock();
92+
FileOutputStream outputStream =
93+
context.openFileOutput(MessageWriter.STORAGE_FILE, Context.MODE_APPEND)) {
9494
// We send both the buffer length and the buffer itself so that we can potentially
9595
// process more than one event in the case where they get queued up.
9696
outputStream.write(sizeBuffer.array());

0 commit comments

Comments
 (0)